All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* autodetect TEA5767
@ 2008-04-14  1:47 Dmitri Belimov
  2008-04-14 20:28 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitri Belimov @ 2008-04-14  1:47 UTC (permalink / raw
  To: video4linux-list

Hi All.

I write some drivers of TV tuners for Linux from Beholder company. I have contract with this company
and of course have all information about products under NDA.

Now I rework v4l code for Beholder Columbus PCMCIA TVtuner. IR remote control add, it works well.

But tea5767 driver can`t detect a FM chip.

saa7130/34: v4l2 driver version 0.2.14 loaded
saa7133[0]: found at 0000:07:00.0, rev: 209, irq: 17, latency: 64, mmio: 0x38000000
saa7133[0]: subsystem: 0000:5201, board: Beholder BeholdTV Columbus TVFM [card=128,autodetected]
saa7133[0]: board init: gpio is ac000
saa7133[0]/core: hwinit1
saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [pre-init]
input: saa7134 IR (Beholder BeholdTV C as /class/input/input9
saa7133[0]: i2c xfer: < f5 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 8f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < e3 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 5b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 20 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 84 >
saa7133[0]: i2c xfer: < 84 00 >
saa7133[0]: i2c xfer: < 85 =8f =8e =8e =8e =8e =8e =8e =8e >
saa7133[0]: i2c xfer: < 84 1f >
saa7133[0]: i2c xfer: < 85 =8e >
saa7133[0]: i2c xfer: < 84 2f >
saa7133[0]: i2c xfer: < 85 =8e >
saa7133[0]: i2c xfer: < 84 01 02 >
saa7133[0]: i2c xfer: < 84 00 00 >
saa7133[0]: i2c xfer: < 84 07 >
saa7133[0]: i2c xfer: < 85 =8e >
saa7133[0]: i2c xfer: < 84 00 d6 30 >
tuner' 1-0042: chip found @ 0x84 (saa7133[0])
tda9887 1-0042: creating new instance
tda9887 1-0042: tda988[5/6/7] found
saa7133[0]: i2c xfer: < 84 00 c0 00 00 >
tuner' i2c attach [addr=0x42,client=tda9887]
saa7133[0]: i2c xfer: < 86 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 94 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 96 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < c0 >
saa7133[0]: i2c xfer: < c1 =84 =ac =2c =10 =00 =bc =bc >
Returned more than 5 bytes. It is not a TEA5767
tuner' 1-0060: chip found @ 0xc0 (saa7133[0])
tuner' i2c attach [addr=0x60,client=(tuner unset)]
saa7133[0]: i2c xfer: < c1 =04 >
tuner-simple 1-0060: creating new instance
tuner-simple 1-0060: type set to 12 (Alps TSBE5)
saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
saa7133[0]: i2c xfer: < c2 >
tuner' 1-0061: chip found @ 0xc2 (saa7133[0])
tuner' i2c attach [addr=0x61,client=(tuner unset)]
saa7133[0]: i2c xfer: < c4 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < c6 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < c8 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < ca ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < cc ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < ce ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d0 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d2 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d4 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d6 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d8 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < da ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < dc ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < de ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < a0 00 >
saa7133[0]: i2c xfer: < a1 =00 =00 =01 =52 =54 =20 =00 =00 =00 =00 =00 =00 =00 =00 =00 =01 =ff 
=ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
=ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
=ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
=ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
=ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
=ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff
 =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
=42 =54 =56 =30 =35 =30 =30 =ff =ff =ff =ff =ff =ff =ff =ff =ff >
saa7133[0]: i2c eeprom 00: 00 00 01 52 54 20 00 00 00 00 00 00 00 00 00 01
saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom f0: 42 54 56 30 35 30 30 ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c xfer: < 01 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 03 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 05 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 07 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 09 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 0b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 0d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 0f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 11 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 13 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 15 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 17 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 19 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 1b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 1d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 1f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 21 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 23 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 25 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 27 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 29 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 2b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 2d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 2f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 31 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 33 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 35 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 37 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 39 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 3b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 3d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 3f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 41 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 43 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 45 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 47 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 49 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 4b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 4d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 4f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 51 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 53 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 55 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 57 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 59 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 5b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 5d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 5f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 61 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 63 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 65 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 67 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 69 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 6b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 6d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 6f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 71 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 73 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 75 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 77 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 79 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 7b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 7d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 7f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 81 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 83 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 85 >
saa7133[0]: i2c scan: found device @ 0x84  [???]
saa7133[0]: i2c xfer: < 87 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 89 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 8b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 8d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 8f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 91 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 93 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 95 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 97 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 99 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 9b ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 9d ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < 9f ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < a1 >
saa7133[0]: i2c scan: found device @ 0xa0  [eeprom]
saa7133[0]: i2c xfer: < a3 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < a5 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < a7 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < a9 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < ab ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < ad ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < af ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < b1 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < b3 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < b5 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < b7 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < b9 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < bb ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < bd ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < bf ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < c1 >
saa7133[0]: i2c scan: found device @ 0xc0  [tuner (analog)]
saa7133[0]: i2c xfer: < c3 >
saa7133[0]: i2c scan: found device @ 0xc2  [???]
saa7133[0]: i2c xfer: < c5 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < c7 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < c9 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < cb ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < cd ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < cf ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d1 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d3 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d5 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d7 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < d9 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < db ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < dd ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < df ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < e1 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < e3 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < e5 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < e7 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < e9 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < eb ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < ed ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < ef ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < f1 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < f3 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < f5 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < f7 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < f9 ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < fb ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < fd ERROR: NO_DEVICE
saa7133[0]: i2c xfer: < ff ERROR: NO_DEVICE
saa7133[0]/core: hwinit2
saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
saa7133[0]: registered device video0 [v4l2]
saa7133[0]: registered device vbi0
saa7133[0]: registered device radio0
saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
saa7133[0]: i2c xfer: < 84 00 e0 00 00 >
saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
saa7133[0]: i2c xfer: < 84 00 e0 00 00 >
saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
saa7133[0]: i2c xfer: < 84 00 e0 00 00 >
saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8000 [Radio]
saa7133[0]: i2c xfer: < c0 07 ac 88 a4 >
saa7133[0]: i2c xfer: < 84 ERROR: NO_DEVICE
tda9887 1-0042: i2c i/o error: rc == -5 (should be 4)
saa7134 ALSA driver for DMA sound loaded
saa7133[0]/alsa: saa7133[0] at 0x38000000 irq 17 registered as card -1

Notice message about FM is

saa7133[0]: i2c xfer: < c0 >
saa7133[0]: i2c xfer: < c1 =84 =ac =2c =10 =00 =bc =bc >
Returned more than 5 bytes. It is not a TEA5767

How to I can determine what happens???

With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: autodetect TEA5767
  2008-04-14  1:47 autodetect TEA5767 Dmitri Belimov
@ 2008-04-14 20:28 ` Mauro Carvalho Chehab
       [not found]   ` <20080415125059.3e065997@glory.loctelecom.ru>
  0 siblings, 1 reply; 28+ messages in thread
From: Mauro Carvalho Chehab @ 2008-04-14 20:28 UTC (permalink / raw
  To: Dmitri Belimov; +Cc: video4linux-list

On Mon, 14 Apr 2008 11:47:46 +1000
Dmitri Belimov <d.belimov@gmail.com> wrote:

> Hi All.
> 
> I write some drivers of TV tuners for Linux from Beholder company. I have contract with this company
> and of course have all information about products under NDA.
> 
> Now I rework v4l code for Beholder Columbus PCMCIA TVtuner. IR remote control add, it works well.
> 
> But tea5767 driver can`t detect a FM chip.
> 
> saa7130/34: v4l2 driver version 0.2.14 loaded
> saa7133[0]: found at 0000:07:00.0, rev: 209, irq: 17, latency: 64, mmio: 0x38000000
> saa7133[0]: subsystem: 0000:5201, board: Beholder BeholdTV Columbus TVFM [card=128,autodetected]
> saa7133[0]: board init: gpio is ac000
> saa7133[0]/core: hwinit1
> saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [pre-init]
> input: saa7134 IR (Beholder BeholdTV C as /class/input/input9
> saa7133[0]: i2c xfer: < f5 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 8f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < e3 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 5b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 20 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 84 >
> saa7133[0]: i2c xfer: < 84 00 >
> saa7133[0]: i2c xfer: < 85 =8f =8e =8e =8e =8e =8e =8e =8e >
> saa7133[0]: i2c xfer: < 84 1f >
> saa7133[0]: i2c xfer: < 85 =8e >
> saa7133[0]: i2c xfer: < 84 2f >
> saa7133[0]: i2c xfer: < 85 =8e >
> saa7133[0]: i2c xfer: < 84 01 02 >
> saa7133[0]: i2c xfer: < 84 00 00 >
> saa7133[0]: i2c xfer: < 84 07 >
> saa7133[0]: i2c xfer: < 85 =8e >
> saa7133[0]: i2c xfer: < 84 00 d6 30 >
> tuner' 1-0042: chip found @ 0x84 (saa7133[0])
> tda9887 1-0042: creating new instance
> tda9887 1-0042: tda988[5/6/7] found
> saa7133[0]: i2c xfer: < 84 00 c0 00 00 >
> tuner' i2c attach [addr=0x42,client=tda9887]
> saa7133[0]: i2c xfer: < 86 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 94 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 96 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < c0 >
> saa7133[0]: i2c xfer: < c1 =84 =ac =2c =10 =00 =bc =bc >
> Returned more than 5 bytes. It is not a TEA5767
> tuner' 1-0060: chip found @ 0xc0 (saa7133[0])
> tuner' i2c attach [addr=0x60,client=(tuner unset)]
> saa7133[0]: i2c xfer: < c1 =04 >
> tuner-simple 1-0060: creating new instance
> tuner-simple 1-0060: type set to 12 (Alps TSBE5)
> saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
> saa7133[0]: i2c xfer: < c2 >
> tuner' 1-0061: chip found @ 0xc2 (saa7133[0])
> tuner' i2c attach [addr=0x61,client=(tuner unset)]
> saa7133[0]: i2c xfer: < c4 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < c6 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < c8 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < ca ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < cc ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < ce ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d0 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d2 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d4 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d6 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d8 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < da ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < dc ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < de ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < a0 00 >
> saa7133[0]: i2c xfer: < a1 =00 =00 =01 =52 =54 =20 =00 =00 =00 =00 =00 =00 =00 =00 =00 =01 =ff 
> =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
> =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
> =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
> =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
> =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
> =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff
>  =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff =ff 
> =42 =54 =56 =30 =35 =30 =30 =ff =ff =ff =ff =ff =ff =ff =ff =ff >
> saa7133[0]: i2c eeprom 00: 00 00 01 52 54 20 00 00 00 00 00 00 00 00 00 01
> saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c eeprom f0: 42 54 56 30 35 30 30 ff ff ff ff ff ff ff ff ff
> saa7133[0]: i2c xfer: < 01 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 03 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 05 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 07 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 09 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 0b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 0d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 0f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 11 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 13 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 15 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 17 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 19 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 1b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 1d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 1f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 21 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 23 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 25 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 27 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 29 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 2b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 2d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 2f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 31 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 33 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 35 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 37 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 39 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 3b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 3d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 3f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 41 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 43 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 45 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 47 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 49 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 4b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 4d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 4f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 51 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 53 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 55 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 57 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 59 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 5b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 5d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 5f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 61 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 63 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 65 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 67 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 69 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 6b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 6d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 6f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 71 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 73 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 75 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 77 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 79 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 7b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 7d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 7f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 81 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 83 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 85 >
> saa7133[0]: i2c scan: found device @ 0x84  [???]
> saa7133[0]: i2c xfer: < 87 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 89 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 8b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 8d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 8f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 91 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 93 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 95 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 97 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 99 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 9b ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 9d ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < 9f ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < a1 >
> saa7133[0]: i2c scan: found device @ 0xa0  [eeprom]
> saa7133[0]: i2c xfer: < a3 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < a5 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < a7 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < a9 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < ab ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < ad ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < af ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < b1 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < b3 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < b5 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < b7 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < b9 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < bb ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < bd ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < bf ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < c1 >
> saa7133[0]: i2c scan: found device @ 0xc0  [tuner (analog)]
> saa7133[0]: i2c xfer: < c3 >
> saa7133[0]: i2c scan: found device @ 0xc2  [???]
> saa7133[0]: i2c xfer: < c5 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < c7 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < c9 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < cb ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < cd ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < cf ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d1 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d3 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d5 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d7 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < d9 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < db ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < dd ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < df ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < e1 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < e3 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < e5 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < e7 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < e9 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < eb ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < ed ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < ef ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < f1 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < f3 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < f5 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < f7 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < f9 ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < fb ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < fd ERROR: NO_DEVICE
> saa7133[0]: i2c xfer: < ff ERROR: NO_DEVICE
> saa7133[0]/core: hwinit2
> saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
> saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
> saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
> saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
> saa7133[0]: registered device video0 [v4l2]
> saa7133[0]: registered device vbi0
> saa7133[0]: registered device radio0
> saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
> saa7133[0]: i2c xfer: < 84 00 e0 00 00 >
> saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
> saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
> saa7133[0]: i2c xfer: < 84 00 e0 00 00 >
> saa7133[0]: i2c xfer: < c0 1b 6f 8e 08 >
> saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8004 [Television]
> saa7133[0]: i2c xfer: < 84 00 e0 00 00 >
> saa7133[0]: gpio: mode=0x00a8004 in=0x0004000 out=0x00a8000 [Radio]
> saa7133[0]: i2c xfer: < c0 07 ac 88 a4 >
> saa7133[0]: i2c xfer: < 84 ERROR: NO_DEVICE
> tda9887 1-0042: i2c i/o error: rc == -5 (should be 4)
> saa7134 ALSA driver for DMA sound loaded
> saa7133[0]/alsa: saa7133[0] at 0x38000000 irq 17 registered as card -1
> 
> Notice message about FM is
> 
> saa7133[0]: i2c xfer: < c0 >
> saa7133[0]: i2c xfer: < c1 =84 =ac =2c =10 =00 =bc =bc >
> Returned more than 5 bytes. It is not a TEA5767
> 
> How to I can determine what happens???

Autodetection is receiving more bytes than expected. This device sends just 5
bytes, even if you ask for more. So, autodetection code is considering that
your tuner is not a tea5767. You may try to take a look at tea5767
autodetection routine, and remove this check.

Cheers,
Mauro

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Beholder TV/FM cards
       [not found]                         ` <Pine.LNX.4.64.0804232237450.31358@bombadil.infradead.org>
@ 2008-05-05  1:22                           ` Dmitri Belimov
  2008-05-05  3:20                           ` Dmitri Belimov
  2008-05-12 10:11                           ` Beholder card M6 with MPEG2 coder Dmitri Belimov
  2 siblings, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-05  1:22 UTC (permalink / raw
  To: Mauro Carvalho Chehab; +Cc: video4linux-list

Hi

A few days modules crashed after I installed Columbus PCMCIA card.
kernel 2.6.24
v4l last

It happens after update 2 week a go.

dmesg:

pccard: CardBus card inserted into slot 0
tveeprom: no version for "struct_module" found: kernel tainted.
Linux video capture interface: v2.00
saa7130/34: v4l2 driver version 0.2.14 loaded
PCI: Enabling device 0000:07:00.0 (0000 -> 0002)
ACPI: PCI Interrupt 0000:07:00.0[A] -> GSI 17 (level, low) -> IRQ 16
saa7133[0]: found at 0000:07:00.0, rev: 209, irq: 16, latency: 0, mmio: 0x38000000
PCI: Setting latency timer of device 0000:07:00.0 to 64
saa7133[0]: subsystem: 0000:5201, board: Beholder BeholdTV Columbus TVFM [card=128,autodetected]
saa7133[0]: board init: gpio is 8000
input: saa7134 IR (Beholder BeholdTV C as /class/input/input8
saa7133[0]: i2c eeprom 00: 00 00 01 52 54 20 00 00 00 00 00 00 00 00 00 01
saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom f0: 42 54 56 30 35 30 30 ff ff ff ff ff ff ff ff ff
TUNER: Unable to find symbol tda829x_probe()
------------[ cut here ]------------
kernel BUG at kernel/module.c:761!
invalid opcode: 0000 [#1] SMP 
Modules linked in: tuner(F) saa7134(F) videodev(F) v4l1_compat(F) compat_ioctl32(F) v4l2_common(F) videobuf_dma_sg(F) videobuf_core(F) ir_kbd_i2c(F) ir_common(F) tveeprom(F) xt_tcpudp i915 rfcomm l2cap bluetooth irtty_sir sir_dev iptable_filter ip_tables x_tables lp arc4 ecb blkcipher ieee80211_crypt_wep nls_utf8 nls_cp437 vfat fat drm ppdev sr_mod scsi_mod snd_intel8x0m snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event ipw2200 snd_seq snd_timer snd_seq_device ieee80211 ieee80211_crypt container video output i2c_i801 yenta_socket rsrc_nonstatic snd battery asus_acpi intel_agp ac button irda parport_pc i2c_core pcspkr psmouse soundcore evdev agpgart crc_ccitt parport snd_page_alloc rtc ext3 jbd mbcache ide_cd cdrom ide_disk usbhid piix b44 generic ide_core ssb pcmcia pcmcia_core firmware_class mii ehci_hcd uhci_hcd usbcore thermal processor fan

Pid: 4396, comm: modprobe Tainted: GF       (2.6.24 #1)
EIP: 0060:[<c013a052>] EFLAGS: 00010246 CPU: 0
EIP is at __symbol_put+0x1b/0x2c
EAX: 00000000 EBX: cb1d8a00 ECX: 00000000 EDX: 00000000
ESI: cb278800 EDI: e04f9640 EBP: cb1d8a00 ESP: cd845dd4
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process modprobe (pid: 4396, ti=cd844000 task=cb0c5000 task.ti=cd844000)
Stack: 00000001 cd845de8 e0024060 e04f5c3c e04f7ef6 df3b3cc0 cd845e34 c0321424 
       00001b20 df00ca00 c0193377 c144cc90 df00ca00 dcaa8610 c016f1ce dcaa8610 
       00000014 cb1d8a00 00000042 e04f9640 de56d140 e04b12d9 00000042 de56d170 
Call Trace:
 [<e04f5c3c>] tuner_probe+0x23b/0x4ac [tuner]
 [<c0193377>] sysfs_ilookup_test+0x0/0xd
 [<c016f1ce>] ifind+0x28/0x7b
 [<e04b12d9>] v4l2_i2c_attach+0x40/0x69 [v4l2_common]
 [<e04f5654>] v4l2_i2c_drv_attach_legacy+0x1e/0x21 [tuner]
 [<e04f5a01>] tuner_probe+0x0/0x4ac [tuner]
 [<e015899a>] i2c_probe_address+0xe3/0x126 [i2c_core]
 [<e0159740>] i2c_probe+0x14f/0x15b [i2c_core]
 [<e04f5636>] v4l2_i2c_drv_attach_legacy+0x0/0x21 [tuner]
 [<c021c60e>] bus_add_driver+0x133/0x197
 [<e04f5636>] v4l2_i2c_drv_attach_legacy+0x0/0x21 [tuner]
 [<e01593ed>] i2c_register_driver+0x9b/0xcb [i2c_core]
 [<e035106a>] v4l2_i2c_drv_init+0x6a/0xc5 [tuner]
 [<c013b771>] sys_init_module+0x15db/0x16f3
 [<c014d8fa>] vma_prio_tree_insert+0x17/0x2a
 [<e015817e>] i2c_master_send+0x0/0x41 [i2c_core]
 [<c0103d62>] sysenter_past_esp+0x5f/0x85
 [<c012007b>] vprintk+0x182/0x2c4
 =======================
Code: 3a 02 75 0b 8b 82 08 02 00 00 e9 76 0a fe ff c3 83 ec 0c 8d 4c 24 04 8d 54 24 08 c7 04 24 01 00 00 00 e8 a0 f8 ff ff 85 c0 75 04 <0f> 0b eb fe 8b 44 24 08 e8 b1 ff ff ff 83 c4 0c c3 57 89 c7 56 
EIP: [<c013a052>] __symbol_put+0x1b/0x2c SS:ESP 0068:cd845dd4
---[ end trace 3c34494d3738b35a ]---
saa7133[0]: registered device video0 [v4l2]
saa7133[0]: registered device vbi0
saa7133[0]: registered device radio0

I think saa7134 can`t found tda8290.ko module for loading.
TUNER: Unable to find symbol tda829x_probe()

in .myconfig
CONFIG_MEDIA_TUNER_TDA8290	:= m

But this module didn`t build after make.

With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Beholder TV/FM cards
       [not found]                         ` <Pine.LNX.4.64.0804232237450.31358@bombadil.infradead.org>
  2008-05-05  1:22                           ` Beholder TV/FM cards Dmitri Belimov
@ 2008-05-05  3:20                           ` Dmitri Belimov
  2008-05-12 10:11                           ` Beholder card M6 with MPEG2 coder Dmitri Belimov
  2 siblings, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-05  3:20 UTC (permalink / raw
  To: Mauro Carvalho Chehab; +Cc: video4linux-list

Hi 

Sorry my previouse report. I found what happens.
My local mercuri didn`t update correctly.
When I make fresh hg clone all works well.

With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Beholder card M6 with MPEG2 coder
       [not found]                         ` <Pine.LNX.4.64.0804232237450.31358@bombadil.infradead.org>
  2008-05-05  1:22                           ` Beholder TV/FM cards Dmitri Belimov
  2008-05-05  3:20                           ` Dmitri Belimov
@ 2008-05-12 10:11                           ` Dmitri Belimov
  2008-05-13 22:52                             ` hermann pitton
  2 siblings, 1 reply; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-12 10:11 UTC (permalink / raw
  To: Mauro Carvalho Chehab; +Cc: video4linux-list

Hi 

Now I start support MPEG2 coder in Beholder M6 card.
I have few questions:
1. Befor start MPEG2 stream need configure the saa7134 chip. How to I can make it correctly?
2. Where I can read more about it??

With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-05-12 10:11                           ` Beholder card M6 with MPEG2 coder Dmitri Belimov
@ 2008-05-13 22:52                             ` hermann pitton
  2008-05-20  5:24                               ` Dmitri Belimov
  0 siblings, 1 reply; 28+ messages in thread
From: hermann pitton @ 2008-05-13 22:52 UTC (permalink / raw
  To: Dmitri Belimov, Mauro Carvalho Chehab, Hartmut Hackmann; +Cc: video4linux-list

Hi,

Am Montag, den 12.05.2008, 20:11 +1000 schrieb Dmitri Belimov:
> Hi 
> 
> Now I start support MPEG2 coder in Beholder M6 card.
> I have few questions:
> 1. Befor start MPEG2 stream need configure the saa7134 chip. How to I can make it correctly?
> 2. Where I can read more about it??
> 
> With my best regards, Dmitry.
> 

Dmitry, there is some bug on saa7134-empress after ioctl2 conversion
with recent stuff. I  have only a not yet supported card and can't help
much.

To send the M6 extra patch with the empress encoder enabled was not much
helpful in this situation to track down latest working status, if it was
never tested.

However, there is some thread on the linux-dvb ML with Frederic Cand
involved and he seems to have that latest working status now with a
known supported card before ioctl2 conversion. On mine format setup
fails for all known previously working and it needs more work on it.

On recent, my latest report was that the ioctls seem to come through
again. In fact, given that the empress pci device was dev/video1 out of
three and the empress got /dev/video4 then, I was only able to
control /dev/video2 from empress /dev/video4 successfully for all, but
not for set standard and channel, which never worked for my card so far.

The assumption, to let /dev/video2 to the empress, assigning video_nr
0,1,3,4 to the other cards would resolve that problem, now turns out to
be wrong.

Even lining up minors takes free /dev/video2 now for the empress device,
it is still associated with /dev/video3 of a different card.

The bug is in within lining up minors and assigning correctly from pci
dev to empress dev.

Putting the card now back into another machine as the last of four, the
previously reported bug becomes visible again, which happens on
empress_querycap.

Don't know when I'll have time for it again, so I leave at least the
oops again, which in my case is not the end of the latter ...

BTW, we still have the already reported other bugs.

The users can't set the tuner type anymore. Since almost all older cards
with can tuners and not global silicon tuners, need to set the tuner
type independently from what is in the card's entry hard coded for only
one TV standard, it is not a minor issue.

The users can't force PAL and SECAM subnorms anymore.
This will hit at least all PAL_BG NICAM users, lots of countries in
Europe, since this often ends up in PAL_I detection there and at least
SECAM_L will lose against SECAM_DK again I would expect.

Cheers,
Hermann

oops with qv4l2 on empress /dev/video4

> saa7133[2]: registered device vbi2
> saa7134[3]: setting pci latency timer to 64
> saa7134[3]: found at 0000:01:0a.0, rev: 1, irq: 16, latency: 64, mmio: 0xe8003000
> saa7134[3]: subsystem: 16be:5000, board: EMPRESS [card=4,insmod option]
> saa7134[3]: board init: gpio is 820000
> tuner' 5-0043: chip found @ 0x86 (saa7134[3])
> tda9887 5-0043: creating new instance
> tda9887 5-0043: tda988[5/6/7] found
> tuner' 5-0061: chip found @ 0xc2 (saa7134[3])
> saa7134[3]: i2c eeprom 00: be 16 00 50 54 20 1c 00 43 43 a9 1c 55 d2 b2 92
> saa7134[3]: i2c eeprom 10: 00 ff 86 0f ff 20 ff 00 01 50 32 79 01 3c ca 50
> saa7134[3]: i2c eeprom 20: 01 40 01 02 02 03 01 00 06 ff 00 6c 02 51 96 2b
> saa7134[3]: i2c eeprom 30: a7 58 7a 1f 03 8e 84 5e da 7a 04 b3 05 87 b2 3c
> saa7134[3]: i2c eeprom 40: ff 1d 00 c2 86 10 01 01 00 00 fd 79 44 9f c2 8f
> saa7134[3]: i2c eeprom 50: ff ff ff ff ff ff 06 06 0f 00 0f 00 0f 00 0f 00
> saa7134[3]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7134[3]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7134[3]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7134[3]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7134[3]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7134[3]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7134[3]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7134[3]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7134[3]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> saa7134[3]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> tuner-simple 5-0061: creating new instance
> tuner-simple 5-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner)
> saa6752hs 5-0020: saa6752hs: chip found @ 0x40
> saa7134[3]: registered device video3 [v4l2]
> saa7134[3]: registered device vbi3
> saa7134[3]: registered device radio2
> DVB: registering new adapter (saa7133[0])
> DVB: registering frontend 0 (Philips TDA10046H DVB-T)...
> tda1004x: setting up plls for 48MHz sampling clock
> tda1004x: found firmware revision 29 -- ok
> DVB: registering new adapter (saa7133[1])
> DVB: registering frontend 1 (Philips TDA10046H DVB-T)...
> tda1004x: setting up plls for 48MHz sampling clock
> tda1004x: found firmware revision 29 -- ok
> DVB: registering new adapter (saa7133[2])
> DVB: registering frontend 2 (Philips TDA10046H DVB-T)...
> tda1004x: setting up plls for 48MHz sampling clock
> tda1004x: found firmware revision 26 -- ok
> saa7134[3]/empress: saa7134[3]: empress_init
> saa7134[3]: registered device video4 [mpeg]
> saa7134[3]/empress: no video signal
> saa7134[3]/empress: no video signal
> saa7134[3]/empress: no video signal
> saa7134[3]/empress: video signal acquired
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: video signal acquired
> saa7134[3]/empress: no video signal
> saa7134[3]/empress: no video signal
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: open minor=4
> saa7134[3]/empress: no video signal
> saa7134[3]/empress: no video signal
> saa7134[3]/empress: video signal acquired
> saa7134[3]/empress: open minor=4
> BUG: unable to handle kernel NULL pointer dereference at 00000000
> IP: [<c01d893a>] strlen+0x8/0x11
> *pde = 189ef067 *pte = 00000000
> Oops: 0000 [#1] PREEMPT
> Modules linked in: saa7134_empress tda1004x saa7134_dvb saa6752hs tuner_simple tuner_types tda9887 videobuf_dvb dvb_core tda827x tda8290 tuner saa7134 videodev v4l1_compat compat_ioctl32 v4l2_common videobuf_dma_sg videobuf_core ir_kbd_i2c ir_common tveeprom sit tunnel4 rfcomm l2cap bluetooth autofs4 fuse sunrpc ipt_REJECT iptable_filter ip_tables xt_tcpudp ip6t_ipv6header ip6t_REJECT ip6table_filter ip6_tables x_tables ipv6 dm_mirror dm_multipath dm_mod snd_intel8x0 floppy snd_ac97_codec ac97_bus snd_seq_dummy 3c59x snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device pcspkr mii snd_pcm_oss snd_mixer_oss snd_pcm i2c_nforce2 snd_timer i2c_core snd soundcore snd_page_alloc button pata_acpi pata_amd libata sd_mod scsi_mod dock ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: tda827x]
> 
> Pid: 25352, comm: qv4l2 Not tainted (2.6.25 #4)
> EIP: 0060:[<c01d893a>] EFLAGS: 00010246 CPU: 0
> EIP is at strlen+0x8/0x11
> EAX: 00000000 EBX: 00000020 ECX: ffffffff EDX: 00000000
> ESI: 00000000 EDI: 00000000 EBP: d89d1edc ESP: d89d1de4
>  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
> Process qv4l2 (pid: 25352, ti=d89d0000 task=f6e90cb0 task.ti=d89d0000)
> Stack: d89d1f34 c01d7049 c0116a51 d89d1ecc f8a4a4e4 d89d1f34 efbe8400 f8a8a4d4
>        f8a8a4a5 00000000 f89d6c3d 80685600 d881f5e0 00000001 efb42000 c042cf44
>        c011b667 00000000 00000202 c0168c66 f739000b f7390005 00000101 00000000
> Call Trace:
>  [<c01d7049>] strlcpy+0x14/0x5f
>  [<c0116a51>] __wake_up_common+0x2d/0x52
>  [<f8a8a4d4>] empress_querycap+0x2f/0x5f [saa7134_empress]
>  [<f8a8a4a5>] empress_querycap+0x0/0x5f [saa7134_empress]
>  [<f89d6c3d>] __video_do_ioctl+0x4d0/0x2d74 [videodev]
>  [<c011b667>] wake_up_klogd+0x2b/0x2d
>  [<c0168c66>] __link_path_walk+0xb15/0xc21
>  [<c016ef05>] dput+0x15/0xfc
>  [<c0173169>] mntput_no_expire+0x11/0x7f
>  [<c0168dfd>] path_walk+0x8b/0x93
>  [<c011bd13>] printk+0x14/0x18
>  [<f89d978e>] video_ioctl2+0x16d/0x233 [videodev]
>  [<f89d9619>] video_open+0x138/0x140 [videodev]
>  [<c016ac53>] vfs_ioctl+0x47/0x5d
>  [<c016aebd>] do_vfs_ioctl+0x254/0x26b
>  [<c013e382>] audit_syscall_exit+0x2a0/0x2bc
>  [<c016af15>] sys_ioctl+0x41/0x58
>  [<c0104786>] syscall_call+0x7/0xb
>  =======================
> Code: eb 04 19 c0 0c 01 5e 5f c3 56 89 c6 89 d0 88 c4 ac 38 e0 74 09 84 c0 75 f7 be 01 00 00 00 89 f0 48 5e c3 57 83 c9 ff 89 c7 31 c0 <f2> ae f7 d1 49 5f 89 c8 c3 57 89 c7 89 d0 31 d2 85 c9 74 0c f2
> EIP: [<c01d893a>] strlen+0x8/0x11 SS:ESP 0068:d89d1de4
> ---[ end trace 4ac505a5bbed981f ]---






--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-05-13 22:52                             ` hermann pitton
@ 2008-05-20  5:24                               ` Dmitri Belimov
  2008-05-21  0:52                                 ` hermann pitton
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-20  5:24 UTC (permalink / raw
  To: hermann pitton; +Cc: video4linux-list, Mauro Carvalho Chehab

Hi 

Kernel 2.6.25 vanilla + v4l latest

I try

./v4l2-ctl -d /dev/video0 -D
Driver Info:
	Driver name   : saa7134
	Card type     : Beholder BeholdTV M6 / BeholdTV
	Bus info      : PCI:0000:02:00.0
	Driver version: 526
	Capabilities  : 0x05010015
		Video Capture
		Video Overlay
		VBI Capture
		Tuner
		Read/Write
		Streaming

./v4l2-ctl -d /dev/radio0 -D		
Driver Info:
	Driver name   : saa7134
	Card type     : Beholder BeholdTV M6 / BeholdTV
	Bus info      : PCI:0000:02:00.0
	Driver version: 526
	Capabilities  : 0x00010000
		Tuner

./v4l2-ctl -d /dev/video1 -D		
Driver Info:
	Driver name   : saa7134
	Card type     : Proteus Pro [philips reference 
	Bus info      : PCI:<NULL>
	Driver version: 526
	Capabilities  : 0x05000001
		Video Capture
		Read/Write
		Streaming

Incorrect data in querycap syscall. After this patch, Information is good:

diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c	Tue May 20 09:07:56 2008 +1000
@@ -172,12 +172,16 @@ static int empress_querycap(struct file 
 static int empress_querycap(struct file *file, void  *priv,
 					struct v4l2_capability *cap)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;

 	strcpy(cap->driver, "saa7134");
 	strlcpy(cap->card, saa7134_boards[dev->board].name,
 		sizeof(cap->card));

./v4l2-ctl -d /dev/video0 -D
Driver Info:
	Driver name   : saa7134
	Card type     : Beholder BeholdTV M6 / BeholdTV
	Bus info      : PCI:0000:02:00.0
	Driver version: 526
	Capabilities  : 0x05010015
		Video Capture
		Video Overlay
		VBI Capture
		Tuner
		Read/Write
		Streaming
		
./v4l2-ctl -d /dev/radio0 -D		
Driver Info:
	Driver name   : saa7134
	Card type     : Beholder BeholdTV M6 / BeholdTV
	Bus info      : PCI:0000:02:00.0
	Driver version: 526
	Capabilities  : 0x00010000
		Tuner

./v4l2-ctl -d /dev/video1 -D		
Driver Info:
	Driver name   : saa7134
	Card type     : Beholder BeholdTV M6 / BeholdTV
	Bus info      : PCI:0000:02:00.0
	Driver version: 526
	Capabilities  : 0x05000001
		Video Capture
		Read/Write
		Streaming

What you think about it? Bad data structure?? Or my patch is right??

With my best regards, Dmitry.

> Am Montag, den 12.05.2008, 20:11 +1000 schrieb Dmitri Belimov:
> > Hi 
> > 
> > Now I start support MPEG2 coder in Beholder M6 card.
> > I have few questions:
> > 1. Befor start MPEG2 stream need configure the saa7134 chip. How to
> > I can make it correctly? 2. Where I can read more about it??
> > 
> > With my best regards, Dmitry.
> > 
> 
> Dmitry, there is some bug on saa7134-empress after ioctl2 conversion
> with recent stuff. I  have only a not yet supported card and can't
> help much.
> 
> To send the M6 extra patch with the empress encoder enabled was not
> much helpful in this situation to track down latest working status,
> if it was never tested.
> 
> However, there is some thread on the linux-dvb ML with Frederic Cand
> involved and he seems to have that latest working status now with a
> known supported card before ioctl2 conversion. On mine format setup
> fails for all known previously working and it needs more work on it.
> 
> On recent, my latest report was that the ioctls seem to come through
> again. In fact, given that the empress pci device was dev/video1 out
> of three and the empress got /dev/video4 then, I was only able to
> control /dev/video2 from empress /dev/video4 successfully for all, but
> not for set standard and channel, which never worked for my card so
> far.
> 
> The assumption, to let /dev/video2 to the empress, assigning video_nr
> 0,1,3,4 to the other cards would resolve that problem, now turns out
> to be wrong.
> 
> Even lining up minors takes free /dev/video2 now for the empress
> device, it is still associated with /dev/video3 of a different card.
> 
> The bug is in within lining up minors and assigning correctly from pci
> dev to empress dev.
> 
> Putting the card now back into another machine as the last of four,
> the previously reported bug becomes visible again, which happens on
> empress_querycap.
> 
> Don't know when I'll have time for it again, so I leave at least the
> oops again, which in my case is not the end of the latter ...
> 
> BTW, we still have the already reported other bugs.
> 
> The users can't set the tuner type anymore. Since almost all older
> cards with can tuners and not global silicon tuners, need to set the
> tuner type independently from what is in the card's entry hard coded
> for only one TV standard, it is not a minor issue.
> 
> The users can't force PAL and SECAM subnorms anymore.
> This will hit at least all PAL_BG NICAM users, lots of countries in
> Europe, since this often ends up in PAL_I detection there and at least
> SECAM_L will lose against SECAM_DK again I would expect.
> 
> Cheers,
> Hermann
> 
> oops with qv4l2 on empress /dev/video4
> 
> > saa7133[2]: registered device vbi2
> > saa7134[3]: setting pci latency timer to 64
> > saa7134[3]: found at 0000:01:0a.0, rev: 1, irq: 16, latency: 64,
> > mmio: 0xe8003000 saa7134[3]: subsystem: 16be:5000, board: EMPRESS
> > [card=4,insmod option] saa7134[3]: board init: gpio is 820000
> > tuner' 5-0043: chip found @ 0x86 (saa7134[3])
> > tda9887 5-0043: creating new instance
> > tda9887 5-0043: tda988[5/6/7] found
> > tuner' 5-0061: chip found @ 0xc2 (saa7134[3])
> > saa7134[3]: i2c eeprom 00: be 16 00 50 54 20 1c 00 43 43 a9 1c 55
> > d2 b2 92 saa7134[3]: i2c eeprom 10: 00 ff 86 0f ff 20 ff 00 01 50
> > 32 79 01 3c ca 50 saa7134[3]: i2c eeprom 20: 01 40 01 02 02 03 01
> > 00 06 ff 00 6c 02 51 96 2b saa7134[3]: i2c eeprom 30: a7 58 7a 1f
> > 03 8e 84 5e da 7a 04 b3 05 87 b2 3c saa7134[3]: i2c eeprom 40: ff
> > 1d 00 c2 86 10 01 01 00 00 fd 79 44 9f c2 8f saa7134[3]: i2c eeprom
> > 50: ff ff ff ff ff ff 06 06 0f 00 0f 00 0f 00 0f 00 saa7134[3]: i2c
> > eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> > saa7134[3]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff
> > ff ff ff saa7134[3]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff
> > ff ff ff ff ff ff saa7134[3]: i2c eeprom 90: ff ff ff ff ff ff ff
> > ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom a0: ff ff ff ff
> > ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom b0: ff
> > ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom
> > c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c
> > eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> > saa7134[3]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff
> > ff ff ff saa7134[3]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff
> > ff ff ff ff ff ff tuner-simple 5-0061: creating new instance
> > tuner-simple 5-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid
> > Tuner) saa6752hs 5-0020: saa6752hs: chip found @ 0x40 saa7134[3]:
> > registered device video3 [v4l2] saa7134[3]: registered device vbi3
> > saa7134[3]: registered device radio2 DVB: registering new adapter
> > (saa7133[0]) DVB: registering frontend 0 (Philips TDA10046H
> > DVB-T)... tda1004x: setting up plls for 48MHz sampling clock
> > tda1004x: found firmware revision 29 -- ok
> > DVB: registering new adapter (saa7133[1])
> > DVB: registering frontend 1 (Philips TDA10046H DVB-T)...
> > tda1004x: setting up plls for 48MHz sampling clock
> > tda1004x: found firmware revision 29 -- ok
> > DVB: registering new adapter (saa7133[2])
> > DVB: registering frontend 2 (Philips TDA10046H DVB-T)...
> > tda1004x: setting up plls for 48MHz sampling clock
> > tda1004x: found firmware revision 26 -- ok
> > saa7134[3]/empress: saa7134[3]: empress_init
> > saa7134[3]: registered device video4 [mpeg]
> > saa7134[3]/empress: no video signal
> > saa7134[3]/empress: no video signal
> > saa7134[3]/empress: no video signal
> > saa7134[3]/empress: video signal acquired
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: video signal acquired
> > saa7134[3]/empress: no video signal
> > saa7134[3]/empress: no video signal
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: open minor=4
> > saa7134[3]/empress: no video signal
> > saa7134[3]/empress: no video signal
> > saa7134[3]/empress: video signal acquired
> > saa7134[3]/empress: open minor=4
> > BUG: unable to handle kernel NULL pointer dereference at 00000000
> > IP: [<c01d893a>] strlen+0x8/0x11
> > *pde = 189ef067 *pte = 00000000
> > Oops: 0000 [#1] PREEMPT
> > Modules linked in: saa7134_empress tda1004x saa7134_dvb saa6752hs
> > tuner_simple tuner_types tda9887 videobuf_dvb dvb_core tda827x
> > tda8290 tuner saa7134 videodev v4l1_compat compat_ioctl32
> > v4l2_common videobuf_dma_sg videobuf_core ir_kbd_i2c ir_common
> > tveeprom sit tunnel4 rfcomm l2cap bluetooth autofs4 fuse sunrpc
> > ipt_REJECT iptable_filter ip_tables xt_tcpudp ip6t_ipv6header
> > ip6t_REJECT ip6table_filter ip6_tables x_tables ipv6 dm_mirror
> > dm_multipath dm_mod snd_intel8x0 floppy snd_ac97_codec ac97_bus
> > snd_seq_dummy 3c59x snd_seq_oss snd_seq_midi_event snd_seq
> > snd_seq_device pcspkr mii snd_pcm_oss snd_mixer_oss snd_pcm
> > i2c_nforce2 snd_timer i2c_core snd soundcore snd_page_alloc button
> > pata_acpi pata_amd libata sd_mod scsi_mod dock ext3 jbd uhci_hcd
> > ohci_hcd ehci_hcd [last unloaded: tda827x]
> > 
> > Pid: 25352, comm: qv4l2 Not tainted (2.6.25 #4)
> > EIP: 0060:[<c01d893a>] EFLAGS: 00010246 CPU: 0
> > EIP is at strlen+0x8/0x11
> > EAX: 00000000 EBX: 00000020 ECX: ffffffff EDX: 00000000
> > ESI: 00000000 EDI: 00000000 EBP: d89d1edc ESP: d89d1de4
> >  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
> > Process qv4l2 (pid: 25352, ti=d89d0000 task=f6e90cb0
> > task.ti=d89d0000) Stack: d89d1f34 c01d7049 c0116a51 d89d1ecc
> > f8a4a4e4 d89d1f34 efbe8400 f8a8a4d4 f8a8a4a5 00000000 f89d6c3d
> > 80685600 d881f5e0 00000001 efb42000 c042cf44 c011b667 00000000
> > 00000202 c0168c66 f739000b f7390005 00000101 00000000 Call Trace:
> >  [<c01d7049>] strlcpy+0x14/0x5f
> >  [<c0116a51>] __wake_up_common+0x2d/0x52
> >  [<f8a8a4d4>] empress_querycap+0x2f/0x5f [saa7134_empress]
> >  [<f8a8a4a5>] empress_querycap+0x0/0x5f [saa7134_empress]
> >  [<f89d6c3d>] __video_do_ioctl+0x4d0/0x2d74 [videodev]
> >  [<c011b667>] wake_up_klogd+0x2b/0x2d
> >  [<c0168c66>] __link_path_walk+0xb15/0xc21
> >  [<c016ef05>] dput+0x15/0xfc
> >  [<c0173169>] mntput_no_expire+0x11/0x7f
> >  [<c0168dfd>] path_walk+0x8b/0x93
> >  [<c011bd13>] printk+0x14/0x18
> >  [<f89d978e>] video_ioctl2+0x16d/0x233 [videodev]
> >  [<f89d9619>] video_open+0x138/0x140 [videodev]
> >  [<c016ac53>] vfs_ioctl+0x47/0x5d
> >  [<c016aebd>] do_vfs_ioctl+0x254/0x26b
> >  [<c013e382>] audit_syscall_exit+0x2a0/0x2bc
> >  [<c016af15>] sys_ioctl+0x41/0x58
> >  [<c0104786>] syscall_call+0x7/0xb
> >  =======================
> > Code: eb 04 19 c0 0c 01 5e 5f c3 56 89 c6 89 d0 88 c4 ac 38 e0 74
> > 09 84 c0 75 f7 be 01 00 00 00 89 f0 48 5e c3 57 83 c9 ff 89 c7 31
> > c0 <f2> ae f7 d1 49 5f 89 c8 c3 57 89 c7 89 d0 31 d2 85 c9 74 0c f2
> > EIP: [<c01d893a>] strlen+0x8/0x11 SS:ESP 0068:d89d1de4 ---[ end
> > trace 4ac505a5bbed981f ]---
> 
> 
> 
> 
> 
> 

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-05-20  5:24                               ` Dmitri Belimov
@ 2008-05-21  0:52                                 ` hermann pitton
  2008-05-21  1:20                                   ` [PATCH] saa7134_empress Dmitri Belimov
                                                     ` (8 more replies)
  0 siblings, 9 replies; 28+ messages in thread
From: hermann pitton @ 2008-05-21  0:52 UTC (permalink / raw
  To: Dmitri Belimov; +Cc: video4linux-list, Mauro Carvalho Chehab

Hi Dmitri,

Am Dienstag, den 20.05.2008, 15:24 +1000 schrieb Dmitri Belimov:
> Hi 
> 
> Kernel 2.6.25 vanilla + v4l latest
> 
> I try
> 
> ./v4l2-ctl -d /dev/video0 -D
> Driver Info:
> 	Driver name   : saa7134
> 	Card type     : Beholder BeholdTV M6 / BeholdTV
> 	Bus info      : PCI:0000:02:00.0
> 	Driver version: 526
> 	Capabilities  : 0x05010015
> 		Video Capture
> 		Video Overlay
> 		VBI Capture
> 		Tuner
> 		Read/Write
> 		Streaming
> 
> ./v4l2-ctl -d /dev/radio0 -D		
> Driver Info:
> 	Driver name   : saa7134
> 	Card type     : Beholder BeholdTV M6 / BeholdTV
> 	Bus info      : PCI:0000:02:00.0
> 	Driver version: 526
> 	Capabilities  : 0x00010000
> 		Tuner
> 
> ./v4l2-ctl -d /dev/video1 -D		
> Driver Info:
> 	Driver name   : saa7134
> 	Card type     : Proteus Pro [philips reference 
> 	Bus info      : PCI:<NULL>
> 	Driver version: 526
> 	Capabilities  : 0x05000001
> 		Video Capture
> 		Read/Write
> 		Streaming
> 
> Incorrect data in querycap syscall. After this patch, Information is good:
> 
> diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-empress.c
> --- a/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 14 23:14:04 2008 +0000
> +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c	Tue May 20 09:07:56 2008 +1000
> @@ -172,12 +172,16 @@ static int empress_querycap(struct file 
>  static int empress_querycap(struct file *file, void  *priv,
>  					struct v4l2_capability *cap)
>  {
> -	struct saa7134_fh *fh = priv;
> -	struct saa7134_dev *dev = fh->dev;
> +	struct saa7134_dev *dev = file->private_data;
> 
>  	strcpy(cap->driver, "saa7134");
>  	strlcpy(cap->card, saa7134_boards[dev->board].name,
>  		sizeof(cap->card));
> 
> ./v4l2-ctl -d /dev/video0 -D
> Driver Info:
> 	Driver name   : saa7134
> 	Card type     : Beholder BeholdTV M6 / BeholdTV
> 	Bus info      : PCI:0000:02:00.0
> 	Driver version: 526
> 	Capabilities  : 0x05010015
> 		Video Capture
> 		Video Overlay
> 		VBI Capture
> 		Tuner
> 		Read/Write
> 		Streaming
> 		
> ./v4l2-ctl -d /dev/radio0 -D		
> Driver Info:
> 	Driver name   : saa7134
> 	Card type     : Beholder BeholdTV M6 / BeholdTV
> 	Bus info      : PCI:0000:02:00.0
> 	Driver version: 526
> 	Capabilities  : 0x00010000
> 		Tuner
> 
> ./v4l2-ctl -d /dev/video1 -D		
> Driver Info:
> 	Driver name   : saa7134
> 	Card type     : Beholder BeholdTV M6 / BeholdTV
> 	Bus info      : PCI:0000:02:00.0
> 	Driver version: 526
> 	Capabilities  : 0x05000001
> 		Video Capture
> 		Read/Write
> 		Streaming
> 
> What you think about it? Bad data structure?? Or my patch is right??
> 
> With my best regards, Dmitry.

no time at all on it yet, but I confirm that you are in the center of
the trouble and that empress device and pci device are in sync after
your patch. Mauro might review it, if some time for it, since he did the
ioctl2 conversion, but he would need a Signed-off-by line from you, if
we come through with the rest too that way.

Trying ioctls using qv4l2, which works on older versions for me, except
for setting TV standard and channel from the empress device, we see the
next oops coming from saa7134-tvaudio now on my saa7134 device. (there
is some little empress code, saa7134 and saa7135/saa7131e are different
for audio)

Frederic on the known previously working empress saa7134 device on the
dvb LM seems to be quite happy with the snapshot i pointed too. So if
your card has no further setup problems, mine has, you might try that
snapshot too to escape the swamps.

Cheers,
Hermann

saa7134[3]/empress: open minor=4
BUG: unable to handle kernel NULL pointer dereference at 00000026
IP: [<f8a37ae0>] :saa7134:saa7134_tvaudio_setvolume+0x8/0x38
*pde = 2139f067 *pte = 00000000 
Oops: 0000 [#3] PREEMPT 
Modules linked in: saa7134_empress tda1004x saa7134_dvb saa6752hs tuner_simple tuner_types tda9887 videobuf_dvb dvb_core tda827x tda8290 tuner saa7134 videodev v4l1_compat compat_ioctl32 v4l2_common videobuf_dma_sg videobuf_core ir_kbd_i2c ir_common tveeprom rfcomm l2cap bluetooth autofs4 fuse sunrpc ipt_REJECT iptable_filter ip_tables xt_tcpudp ip6t_ipv6header ip6t_REJECT ip6table_filter ip6_tables x_tables ipv6 dm_mirror dm_multipath dm_mod snd_intel8x0 snd_ac97_codec ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq floppy snd_seq_device 3c59x mii snd_pcm_oss pcspkr snd_mixer_oss snd_pcm i2c_nforce2 snd_timer i2c_core snd soundcore snd_page_alloc button pata_acpi pata_amd libata sd_mod scsi_mod dock ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: tda827x]

Pid: 8901, comm: qv4l2 Tainted: G      D  (2.6.25 #4)
EIP: 0060:[<f8a37ae0>] EFLAGS: 00010246 CPU: 0
EIP is at saa7134_tvaudio_setvolume+0x8/0x38 [saa7134]
EAX: 00000000 EBX: f8a524e4 ECX: f8a524e4 EDX: 00000000
ESI: e1183ecc EDI: f8a3d598 EBP: e117d000 ESP: e1183dec
 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process qv4l2 (pid: 8901, ti=e1182000 task=eee80e70 task.ti=e1182000)
Stack: f8a3aa6f 00000000 000022c5 00000000 e13a80a0 00000000 00000000 eee7e800 
       f89be4fd c008561c f6d86be0 fffffff5 e117d000 00000001 fffffff5 00000000 
       e1183e88 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
Call Trace:
 [<f8a3aa6f>] saa7134_s_ctrl+0x1ab/0x2c5 [saa7134]
 [<f89be4fd>] __video_do_ioctl+0x1d90/0x2d74 [videodev]
 [<c028e312>] sock_aio_read+0xea/0xf8
 [<f89bf78e>] video_ioctl2+0x16d/0x233 [videodev]
 [<c0160822>] do_sync_read+0xbe/0xfd
 [<c0116f84>] update_curr+0x3d/0x52
 [<c0118309>] task_tick_fair+0x12/0x47
 [<c016ac53>] vfs_ioctl+0x47/0x5d
 [<c016aebd>] do_vfs_ioctl+0x254/0x26b
 [<c013e382>] audit_syscall_exit+0x2a0/0x2bc
 [<c016af15>] sys_ioctl+0x41/0x58
 [<c0104786>] syscall_call+0x7/0xb
 =======================
Code: 1e 8b 83 3c 06 00 00 e8 1e 06 6e c7 eb 11 c7 83 38 06 00 00 00 00 00 00 89 d8 e8 51 ff ff ff 5b 31 c0 c3 89 c1 8b 80 08 01 00 00 <66> 81 78 26 34 71 75 27 8b 81 14 01 00 00 83 e2 1f 88 90 63 01 
EIP: [<f8a37ae0>] saa7134_tvaudio_setvolume+0x8/0x38 [saa7134] SS:ESP 0068:e1183dec
---[ end trace 78912b44dc09e952 ]---




> 
> > Am Montag, den 12.05.2008, 20:11 +1000 schrieb Dmitri Belimov:
> > > Hi 
> > > 
> > > Now I start support MPEG2 coder in Beholder M6 card.
> > > I have few questions:
> > > 1. Befor start MPEG2 stream need configure the saa7134 chip. How to
> > > I can make it correctly? 2. Where I can read more about it??
> > > 
> > > With my best regards, Dmitry.
> > > 
> > 
> > Dmitry, there is some bug on saa7134-empress after ioctl2 conversion
> > with recent stuff. I  have only a not yet supported card and can't
> > help much.
> > 
> > To send the M6 extra patch with the empress encoder enabled was not
> > much helpful in this situation to track down latest working status,
> > if it was never tested.
> > 
> > However, there is some thread on the linux-dvb ML with Frederic Cand
> > involved and he seems to have that latest working status now with a
> > known supported card before ioctl2 conversion. On mine format setup
> > fails for all known previously working and it needs more work on it.
> > 
> > On recent, my latest report was that the ioctls seem to come through
> > again. In fact, given that the empress pci device was dev/video1 out
> > of three and the empress got /dev/video4 then, I was only able to
> > control /dev/video2 from empress /dev/video4 successfully for all, but
> > not for set standard and channel, which never worked for my card so
> > far.
> > 
> > The assumption, to let /dev/video2 to the empress, assigning video_nr
> > 0,1,3,4 to the other cards would resolve that problem, now turns out
> > to be wrong.
> > 
> > Even lining up minors takes free /dev/video2 now for the empress
> > device, it is still associated with /dev/video3 of a different card.
> > 
> > The bug is in within lining up minors and assigning correctly from pci
> > dev to empress dev.
> > 
> > Putting the card now back into another machine as the last of four,
> > the previously reported bug becomes visible again, which happens on
> > empress_querycap.
> > 
> > Don't know when I'll have time for it again, so I leave at least the
> > oops again, which in my case is not the end of the latter ...
> > 
> > BTW, we still have the already reported other bugs.
> > 
> > The users can't set the tuner type anymore. Since almost all older
> > cards with can tuners and not global silicon tuners, need to set the
> > tuner type independently from what is in the card's entry hard coded
> > for only one TV standard, it is not a minor issue.
> > 
> > The users can't force PAL and SECAM subnorms anymore.
> > This will hit at least all PAL_BG NICAM users, lots of countries in
> > Europe, since this often ends up in PAL_I detection there and at least
> > SECAM_L will lose against SECAM_DK again I would expect.
> > 
> > Cheers,
> > Hermann
> > 
> > oops with qv4l2 on empress /dev/video4
> > 
> > > saa7133[2]: registered device vbi2
> > > saa7134[3]: setting pci latency timer to 64
> > > saa7134[3]: found at 0000:01:0a.0, rev: 1, irq: 16, latency: 64,
> > > mmio: 0xe8003000 saa7134[3]: subsystem: 16be:5000, board: EMPRESS
> > > [card=4,insmod option] saa7134[3]: board init: gpio is 820000
> > > tuner' 5-0043: chip found @ 0x86 (saa7134[3])
> > > tda9887 5-0043: creating new instance
> > > tda9887 5-0043: tda988[5/6/7] found
> > > tuner' 5-0061: chip found @ 0xc2 (saa7134[3])
> > > saa7134[3]: i2c eeprom 00: be 16 00 50 54 20 1c 00 43 43 a9 1c 55
> > > d2 b2 92 saa7134[3]: i2c eeprom 10: 00 ff 86 0f ff 20 ff 00 01 50
> > > 32 79 01 3c ca 50 saa7134[3]: i2c eeprom 20: 01 40 01 02 02 03 01
> > > 00 06 ff 00 6c 02 51 96 2b saa7134[3]: i2c eeprom 30: a7 58 7a 1f
> > > 03 8e 84 5e da 7a 04 b3 05 87 b2 3c saa7134[3]: i2c eeprom 40: ff
> > > 1d 00 c2 86 10 01 01 00 00 fd 79 44 9f c2 8f saa7134[3]: i2c eeprom
> > > 50: ff ff ff ff ff ff 06 06 0f 00 0f 00 0f 00 0f 00 saa7134[3]: i2c
> > > eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> > > saa7134[3]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff
> > > ff ff ff saa7134[3]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff
> > > ff ff ff ff ff ff saa7134[3]: i2c eeprom 90: ff ff ff ff ff ff ff
> > > ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom a0: ff ff ff ff
> > > ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom b0: ff
> > > ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom
> > > c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c
> > > eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> > > saa7134[3]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff
> > > ff ff ff saa7134[3]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff
> > > ff ff ff ff ff ff tuner-simple 5-0061: creating new instance
> > > tuner-simple 5-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid
> > > Tuner) saa6752hs 5-0020: saa6752hs: chip found @ 0x40 saa7134[3]:
> > > registered device video3 [v4l2] saa7134[3]: registered device vbi3
> > > saa7134[3]: registered device radio2 DVB: registering new adapter
> > > (saa7133[0]) DVB: registering frontend 0 (Philips TDA10046H
> > > DVB-T)... tda1004x: setting up plls for 48MHz sampling clock
> > > tda1004x: found firmware revision 29 -- ok
> > > DVB: registering new adapter (saa7133[1])
> > > DVB: registering frontend 1 (Philips TDA10046H DVB-T)...
> > > tda1004x: setting up plls for 48MHz sampling clock
> > > tda1004x: found firmware revision 29 -- ok
> > > DVB: registering new adapter (saa7133[2])
> > > DVB: registering frontend 2 (Philips TDA10046H DVB-T)...
> > > tda1004x: setting up plls for 48MHz sampling clock
> > > tda1004x: found firmware revision 26 -- ok
> > > saa7134[3]/empress: saa7134[3]: empress_init
> > > saa7134[3]: registered device video4 [mpeg]
> > > saa7134[3]/empress: no video signal
> > > saa7134[3]/empress: no video signal
> > > saa7134[3]/empress: no video signal
> > > saa7134[3]/empress: video signal acquired
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: video signal acquired
> > > saa7134[3]/empress: no video signal
> > > saa7134[3]/empress: no video signal
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: open minor=4
> > > saa7134[3]/empress: no video signal
> > > saa7134[3]/empress: no video signal
> > > saa7134[3]/empress: video signal acquired
> > > saa7134[3]/empress: open minor=4
> > > BUG: unable to handle kernel NULL pointer dereference at 00000000
> > > IP: [<c01d893a>] strlen+0x8/0x11
> > > *pde = 189ef067 *pte = 00000000
> > > Oops: 0000 [#1] PREEMPT
> > > Modules linked in: saa7134_empress tda1004x saa7134_dvb saa6752hs
> > > tuner_simple tuner_types tda9887 videobuf_dvb dvb_core tda827x
> > > tda8290 tuner saa7134 videodev v4l1_compat compat_ioctl32
> > > v4l2_common videobuf_dma_sg videobuf_core ir_kbd_i2c ir_common
> > > tveeprom sit tunnel4 rfcomm l2cap bluetooth autofs4 fuse sunrpc
> > > ipt_REJECT iptable_filter ip_tables xt_tcpudp ip6t_ipv6header
> > > ip6t_REJECT ip6table_filter ip6_tables x_tables ipv6 dm_mirror
> > > dm_multipath dm_mod snd_intel8x0 floppy snd_ac97_codec ac97_bus
> > > snd_seq_dummy 3c59x snd_seq_oss snd_seq_midi_event snd_seq
> > > snd_seq_device pcspkr mii snd_pcm_oss snd_mixer_oss snd_pcm
> > > i2c_nforce2 snd_timer i2c_core snd soundcore snd_page_alloc button
> > > pata_acpi pata_amd libata sd_mod scsi_mod dock ext3 jbd uhci_hcd
> > > ohci_hcd ehci_hcd [last unloaded: tda827x]
> > > 
> > > Pid: 25352, comm: qv4l2 Not tainted (2.6.25 #4)
> > > EIP: 0060:[<c01d893a>] EFLAGS: 00010246 CPU: 0
> > > EIP is at strlen+0x8/0x11
> > > EAX: 00000000 EBX: 00000020 ECX: ffffffff EDX: 00000000
> > > ESI: 00000000 EDI: 00000000 EBP: d89d1edc ESP: d89d1de4
> > >  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
> > > Process qv4l2 (pid: 25352, ti=d89d0000 task=f6e90cb0
> > > task.ti=d89d0000) Stack: d89d1f34 c01d7049 c0116a51 d89d1ecc
> > > f8a4a4e4 d89d1f34 efbe8400 f8a8a4d4 f8a8a4a5 00000000 f89d6c3d
> > > 80685600 d881f5e0 00000001 efb42000 c042cf44 c011b667 00000000
> > > 00000202 c0168c66 f739000b f7390005 00000101 00000000 Call Trace:
> > >  [<c01d7049>] strlcpy+0x14/0x5f
> > >  [<c0116a51>] __wake_up_common+0x2d/0x52
> > >  [<f8a8a4d4>] empress_querycap+0x2f/0x5f [saa7134_empress]
> > >  [<f8a8a4a5>] empress_querycap+0x0/0x5f [saa7134_empress]
> > >  [<f89d6c3d>] __video_do_ioctl+0x4d0/0x2d74 [videodev]
> > >  [<c011b667>] wake_up_klogd+0x2b/0x2d
> > >  [<c0168c66>] __link_path_walk+0xb15/0xc21
> > >  [<c016ef05>] dput+0x15/0xfc
> > >  [<c0173169>] mntput_no_expire+0x11/0x7f
> > >  [<c0168dfd>] path_walk+0x8b/0x93
> > >  [<c011bd13>] printk+0x14/0x18
> > >  [<f89d978e>] video_ioctl2+0x16d/0x233 [videodev]
> > >  [<f89d9619>] video_open+0x138/0x140 [videodev]
> > >  [<c016ac53>] vfs_ioctl+0x47/0x5d
> > >  [<c016aebd>] do_vfs_ioctl+0x254/0x26b
> > >  [<c013e382>] audit_syscall_exit+0x2a0/0x2bc
> > >  [<c016af15>] sys_ioctl+0x41/0x58
> > >  [<c0104786>] syscall_call+0x7/0xb
> > >  =======================
> > > Code: eb 04 19 c0 0c 01 5e 5f c3 56 89 c6 89 d0 88 c4 ac 38 e0 74
> > > 09 84 c0 75 f7 be 01 00 00 00 89 f0 48 5e c3 57 83 c9 ff 89 c7 31
> > > c0 <f2> ae f7 d1 49 5f 89 c8 c3 57 89 c7 89 d0 31 d2 85 c9 74 0c f2
> > > EIP: [<c01d893a>] strlen+0x8/0x11 SS:ESP 0068:d89d1de4 ---[ end
> > > trace 4ac505a5bbed981f ]---
> > 
> > 
> > 
> > 
> > 
> > 

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH] saa7134_empress
  2008-05-21  0:52                                 ` hermann pitton
@ 2008-05-21  1:20                                   ` Dmitri Belimov
  2008-05-21  1:31                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
                                                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-21  1:20 UTC (permalink / raw
  To: hermann pitton; +Cc: video4linux-list, Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

Hi All

This is patch for fix data structure in querycap syscall.

diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 21 05:12:37 2008 +1000
@@ -172,8 +172,7 @@ static int empress_querycap(struct file 
 static int empress_querycap(struct file *file, void  *priv,
 					struct v4l2_capability *cap)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	strcpy(cap->driver, "saa7134");
 	strlcpy(cap->card, saa7134_boards[dev->board].name,

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

With my best regards, Dmitry.

[-- Attachment #2: beholder_empress_01.diff --]
[-- Type: text/x-patch, Size: 691 bytes --]

diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 21 05:12:37 2008 +1000
@@ -172,8 +172,7 @@ static int empress_querycap(struct file 
 static int empress_querycap(struct file *file, void  *priv,
 					struct v4l2_capability *cap)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	strcpy(cap->driver, "saa7134");
 	strlcpy(cap->card, saa7134_boards[dev->board].name,

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-05-21  0:52                                 ` hermann pitton
  2008-05-21  1:20                                   ` [PATCH] saa7134_empress Dmitri Belimov
@ 2008-05-21  1:31                                   ` Dmitri Belimov
  2008-05-21  3:16                                   ` [PATCH] I2S on for MPEG of saa7134_empress Dmitri Belimov
                                                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-21  1:31 UTC (permalink / raw
  To: hermann pitton; +Cc: video4linux-list, Mauro Carvalho Chehab

Hi


> no time at all on it yet, but I confirm that you are in the center of
> the trouble and that empress device and pci device are in sync after
> your patch. Mauro might review it, if some time for it, since he did
> the ioctl2 conversion, but he would need a Signed-off-by line from
> you, if we come through with the rest too that way.

Ok. I patch was send.

> Trying ioctls using qv4l2, which works on older versions for me,
> except for setting TV standard and channel from the empress device,
> we see the next oops coming from saa7134-tvaudio now on my saa7134
> device. (there is some little empress code, saa7134 and
> saa7135/saa7131e are different for audio)

This structure used in many functions added by Mauro.

struct saa7134_fh *fh = priv;
struct saa7134_dev *dev = fh->dev;

empress_g_fmt_cap
empress_s_fmt_cap
empress_reqbufs
empress_querybuf
and other

It is correct for this functions?? 

> Frederic on the known previously working empress saa7134 device on the
> dvb LM seems to be quite happy with the snapshot i pointed too. So if
> your card has no further setup problems, mine has, you might try that
> snapshot too to escape the swamps.

I read from /dev/video1 only 0x00 bytes.
For send data from saa7134 to MPEG chip need configure saa7134 output port for video and audio.
I try it now.

With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH] I2S on for MPEG of saa7134_empress
  2008-05-21  0:52                                 ` hermann pitton
  2008-05-21  1:20                                   ` [PATCH] saa7134_empress Dmitri Belimov
  2008-05-21  1:31                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
@ 2008-05-21  3:16                                   ` Dmitri Belimov
  2008-05-21 16:17                                     ` Gert Vervoort
  2008-05-23  3:18                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
                                                     ` (5 subsequent siblings)
  8 siblings, 1 reply; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-21  3:16 UTC (permalink / raw
  To: hermann pitton; +Cc: video4linux-list, Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 2232 bytes --]

Hi All

Rework saa7134_enable_i2s function. Add vendor specific data.
Add definition for I2S audio output control register.

diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-tvaudio.c
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed May 21 06:45:52 2008 +1000
@@ -928,13 +928,25 @@ void saa7134_enable_i2s(struct saa7134_d
 
 	if (!card_is_empress(dev))
 		return;
-	i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
-
-	/* enable I2S audio output for the mpeg encoder */
-	saa_writeb(SAA7134_I2S_OUTPUT_SELECT,  0x80);
-	saa_writeb(SAA7134_I2S_OUTPUT_FORMAT,  i2s_format);
-	saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,   0x0F);
-	saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x01);
+
+	switch (dev->board) {
+	case SAA7134_BOARD_BEHOLD_M6:
+	    /* configure GPIO for out audio */
+	    saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000);
+	    /* Set I2S format  */
+	    saa_writeb(SAA7134_I2S_AUDIO_CONTROL,  0x00);
+	    /* Start I2S */
+	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x11);
+	    break;
+	default:
+	    i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
+
+	    /* enable I2S audio output for the mpeg encoder */
+	    saa_writeb(SAA7134_I2S_OUTPUT_SELECT,  0x80);
+	    saa_writeb(SAA7134_I2S_OUTPUT_FORMAT,  i2s_format);
+	    saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,   0x0F);
+	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x01);
+	}
 }
 
 int saa7134_tvaudio_rx2mode(u32 rx)
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-reg.h
--- a/linux/drivers/media/video/saa7134/saa7134-reg.h	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-reg.h	Wed May 21 06:04:49 2008 +1000
@@ -353,6 +353,7 @@
 
 /* I2S output */
 #define SAA7134_I2S_AUDIO_OUTPUT                0x1c0
+#define SAA7134_I2S_AUDIO_CONTROL               0x591
 
 /* test modes */
 #define SAA7134_SPECIAL_MODE                    0x1d0

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

P.S. After this patch I have some data from /dev/video1. Mplayer mpeg_test02.dat
I can see gray screen with blinked color squares. May be audio data?

With my best regards, Dmitry.

[-- Attachment #2: beholder_empress_02.diff --]
[-- Type: text/x-patch, Size: 1925 bytes --]

diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-tvaudio.c
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed May 21 06:45:52 2008 +1000
@@ -928,13 +928,25 @@ void saa7134_enable_i2s(struct saa7134_d
 
 	if (!card_is_empress(dev))
 		return;
-	i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
-
-	/* enable I2S audio output for the mpeg encoder */
-	saa_writeb(SAA7134_I2S_OUTPUT_SELECT,  0x80);
-	saa_writeb(SAA7134_I2S_OUTPUT_FORMAT,  i2s_format);
-	saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,   0x0F);
-	saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x01);
+
+	switch (dev->board) {
+	case SAA7134_BOARD_BEHOLD_M6:
+	    /* configure GPIO for out audio */
+	    saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000);
+	    /* Set I2S format  */
+	    saa_writeb(SAA7134_I2S_AUDIO_CONTROL,  0x00);
+	    /* Start I2S */
+	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x11);
+	    break;
+	default:
+	    i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
+
+	    /* enable I2S audio output for the mpeg encoder */
+	    saa_writeb(SAA7134_I2S_OUTPUT_SELECT,  0x80);
+	    saa_writeb(SAA7134_I2S_OUTPUT_FORMAT,  i2s_format);
+	    saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,   0x0F);
+	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x01);
+	}
 }
 
 int saa7134_tvaudio_rx2mode(u32 rx)
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-reg.h
--- a/linux/drivers/media/video/saa7134/saa7134-reg.h	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-reg.h	Wed May 21 06:04:49 2008 +1000
@@ -353,6 +353,7 @@
 
 /* I2S output */
 #define SAA7134_I2S_AUDIO_OUTPUT                0x1c0
+#define SAA7134_I2S_AUDIO_CONTROL               0x591
 
 /* test modes */
 #define SAA7134_SPECIAL_MODE                    0x1d0

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH] I2S on for MPEG of saa7134_empress
  2008-05-21  3:16                                   ` [PATCH] I2S on for MPEG of saa7134_empress Dmitri Belimov
@ 2008-05-21 16:17                                     ` Gert Vervoort
  2008-05-21 23:24                                       ` Dmitri Belimov
  0 siblings, 1 reply; 28+ messages in thread
From: Gert Vervoort @ 2008-05-21 16:17 UTC (permalink / raw
  To: Dmitri Belimov; +Cc: video4linux-list, Mauro Carvalho Chehab

Dmitri Belimov wrote:
> Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
>
> P.S. After this patch I have some data from /dev/video1. Mplayer mpeg_test02.dat
> I can see gray screen with blinked color squares. May be audio data?
>
>   
If the board has the SAA6752 directly connected to the SAA7134 TS port, 
then on /dev/video1 there should be MPEG-2 transport stream packets 
(check for 188 byte packets starting with 0x47).
If I remember correctly for the original TS capture code of the SAA7134 
driver, if the SAA6752 was not properly enabled or there was no video 
signal, no data was available on the /dev/video1.
At that time I used an user space I2C program to configure the encoder, 
currently there is a module called  saa6752hs which I suppose does these 
settings.
 
   Gert


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH] I2S on for MPEG of saa7134_empress
  2008-05-21 16:17                                     ` Gert Vervoort
@ 2008-05-21 23:24                                       ` Dmitri Belimov
  2008-05-22 21:11                                         ` hermann pitton
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-21 23:24 UTC (permalink / raw
  To: Gert Vervoort; +Cc: video4linux-list, Mauro Carvalho Chehab

Hi Gert

> Dmitri Belimov wrote:
> > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > <d.belimov@gmail.com>
> >
> > P.S. After this patch I have some data from /dev/video1. Mplayer
> > mpeg_test02.dat I can see gray screen with blinked color squares.
> > May be audio data?
> >
> >   
> If the board has the SAA6752 directly connected to the SAA7134 TS
> port, then on /dev/video1 there should be MPEG-2 transport stream
> packets (check for 188 byte packets starting with 0x47).

I check data. First 4 bytes in data packet is 0x80 0x80 0x80 0x80.

I add initialization video_out for my card and right data for 
SAA7134_VIDEO_PORT_CTRL*

in new data file i have more data but first 4 bytes is 0x89 0x89 0x89 0x89.

I can send you tared data files if you want.
Last changes not sended to mailling list.

> If I remember correctly for the original TS capture code of the
> SAA7134 driver, if the SAA6752 was not properly enabled or there was
> no video signal, no data was available on the /dev/video1.
> At that time I used an user space I2C program to configure the
> encoder, currently there is a module called  saa6752hs which I
> suppose does these settings.

Can you send me this programm??

With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH] I2S on for MPEG of saa7134_empress
  2008-05-21 23:24                                       ` Dmitri Belimov
@ 2008-05-22 21:11                                         ` hermann pitton
  0 siblings, 0 replies; 28+ messages in thread
From: hermann pitton @ 2008-05-22 21:11 UTC (permalink / raw
  To: Dmitri Belimov, Hartmut Hackmann
  Cc: video4linux-list, Gert Vervoort, Mauro Carvalho Chehab


Am Donnerstag, den 22.05.2008, 09:24 +1000 schrieb Dmitri Belimov:
> Hi Gert
> 
> > Dmitri Belimov wrote:
> > > Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
> > > <d.belimov@gmail.com>
> > >
> > > P.S. After this patch I have some data from /dev/video1. Mplayer
> > > mpeg_test02.dat I can see gray screen with blinked color squares.
> > > May be audio data?
> > >
> > >   
> > If the board has the SAA6752 directly connected to the SAA7134 TS
> > port, then on /dev/video1 there should be MPEG-2 transport stream
> > packets (check for 188 byte packets starting with 0x47).
> 
> I check data. First 4 bytes in data packet is 0x80 0x80 0x80 0x80.
> 
> I add initialization video_out for my card and right data for 
> SAA7134_VIDEO_PORT_CTRL*
> 
> in new data file i have more data but first 4 bytes is 0x89 0x89 0x89 0x89.
> 
> I can send you tared data files if you want.
> Last changes not sended to mailling list.
> 
> > If I remember correctly for the original TS capture code of the
> > SAA7134 driver, if the SAA6752 was not properly enabled or there was
> > no video signal, no data was available on the /dev/video1.
> > At that time I used an user space I2C program to configure the
> > encoder, currently there is a module called  saa6752hs which I
> > suppose does these settings.
> 
> Can you send me this programm??
> 
> With my best regards, Dmitry.

Is there anything known about switching the host mode if DVB and a
encoder is on the same board with a single saa7134 PCI bridge?

We have great progress on some other first class solutions with some
hints we got.

Maybe some reference design?
It is hard to believe, that it comes from elsewhere out of nothing.

There is not any high preference on it, but given that such solutions
have been available long before other competitors came up with something
similarly functional, to have it in GNU/Linux would be a pleasure and
also is some sort of credit/thanks to those who cared about it.

Thanks,
Hermann


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-05-21  0:52                                 ` hermann pitton
                                                     ` (2 preceding siblings ...)
  2008-05-21  3:16                                   ` [PATCH] I2S on for MPEG of saa7134_empress Dmitri Belimov
@ 2008-05-23  3:18                                   ` Dmitri Belimov
  2008-05-28  4:47                                   ` Dmitri Belimov
                                                     ` (4 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-23  3:18 UTC (permalink / raw
  To: hermann pitton; +Cc: video4linux-list, Mauro Carvalho Chehab

Hi All

I found some bugs by design:

1. saa7134-ts hardcoded only to parallel TS stream, but it may be serial ts, parallel ps. Need add more config information into a TV cards descriptions.
2. syscall buffer_prepare run 32  again when I set correct value for buffers = 32 and for ts_nr_packets=312. But each start of this function configure TS to start. It is not correct. TS must be start after buffer_prepare. and TS must be stop before buffer_release (my mean). How to i can make it?

With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-05-21  0:52                                 ` hermann pitton
                                                     ` (3 preceding siblings ...)
  2008-05-23  3:18                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
@ 2008-05-28  4:47                                   ` Dmitri Belimov
  2008-06-10 10:56                                   ` [PATCH] New for I2S on for MPEG of saa7134_empress Dmitri Belimov
                                                     ` (3 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-05-28  4:47 UTC (permalink / raw
  To: hermann pitton; +Cc: video4linux-list, Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 20552 bytes --]

Hi All

This is my test patch for MPEG2 encoder.
I removed start TS in each buffer_prepare function. Made ts_start and ts_stop functions.
Rework I2S initialization to more correct. More correct defines fo M6 family.

Now workflow is:
1. Start videoport (when module loaded)
2. Start audioport (when module loaded)
3. Reset TS cache, set DMA, start TS (when read /dev/video1)

But when I try read from /dev/video1 I received segfailt in function 
saa7134_ts_start -> saa7134_set_dmabits(dev) -> assert_spin_locked(&dev->slock)

Anybody can help me solve this problem????

Linux video capture interface: v2.00
saa7130/34: v4l2 driver version 0.2.14 loaded
saa7133[0]: found at 0000:02:00.0, rev: 240, irq: 16, latency: 32, mmio: 0xe0002000
saa7133[0]: subsystem: 5ace:6193, board: Beholder BeholdTV M6 Extra [card=144,autodetected]
saa7133[0]: board init: gpio is c040000
saa6752hs 0-0020: saa6752hs: chip found @ 0x40
input: BeholdTV as /class/input/input7
ir-kbd-i2c: BeholdTV detected at i2c-0/0-002d/ir0 [saa7133[0]]
saa7133[0]: i2c eeprom 00: ce 5a 93 61 54 20 00 00 00 00 00 00 00 00 00 01
saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
saa7133[0]: i2c eeprom f0: 42 54 56 30 30 30 30 ff ff ff ff ff ff ff ff ff
Manufacturer ID= 0x20, Chip ID = 2020. It is not a TEA5761
tuner' 0-0043: chip found @ 0x86 (saa7133[0])
tda9887 0-0043: creating new instance
tda9887 0-0043: tda988[5/6/7] found
All bytes are equal. It is not a TEA5767
tuner' 0-0060: chip found @ 0xc0 (saa7133[0])
tuner-simple 0-0060: creating new instance
tuner-simple 0-0060: type set to 38 (Philips PAL/SECAM multi (FM1216ME MK3))
saa7133[0]: registered device video0 [v4l2]
saa7133[0]: registered device vbi0
saa7133[0]: registered device radio0
saa7133[0]: registered device video1 [mpeg]
saa7134 ALSA driver for DMA sound loaded
saa7133[0]/alsa: saa7133[0] at 0xe0002000 irq 16 registered as card -1
DEBUG: saa7134_ts_start()
 packets = 312, buffs = 32
------------[ cut here ]------------
kernel BUG at /home/dimon/work/beholder/linux/kernel/v4l-dvb/v4l/saa7134-core.c:479!
invalid opcode: 0000 [#1] SMP 
Modules linked in: saa7134_alsa(F) saa7134_empress tuner_simple(F) tuner_types tea5767(F) tda9887(F) tda8290(F) tea5761(F) tuner(F) saa7134(F) videodev v4l1_compat v4l2_common(F) videobuf_dma_sg videobuf_core ir_kbd_i2c(F) ir_common tveeprom(F) xt_tcpudp ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack iptable_filter ip_tables x_tables ppdev lp ac battery nls_utf8 nls_cp437 vfat fat loop snd_cmipci snd_pcm_oss snd_mixer_oss snd_pcm saa6752hs(F) snd_page_alloc snd_opl3_lib snd_hwdep snd_mpu401_uart snd_seq_dummy parport_pc parport snd_seq_oss snd_seq_midi snd_seq_midi_event snd_seq floppy rtc snd_timer pcspkr psmouse snd_rawmidi snd_seq_device i2c_i801 snd soundcore compat_ioctl32 i2c_core button intel_agp agpgart evdev ext3 jbd mbcache ide_cd_mod cdrom ide_disk piix ide_core ehci_hcd uhci_hcd 8139too 8139cp mii usbcore thermal processor fan [last unloaded: ir_common]

Pid: 6681, comm: cat Tainted: GF        (2.6.25 #1)
EIP: 0060:[<d0963f86>] EFLAGS: 00010246 CPU: 0
EIP is at saa7134_set_dmabits+0x18/0x1e2 [saa7134]
EAX: 0000003b EBX: c03ab000 ECX: d0812000 EDX: 0000003b
ESI: c03ab000 EDI: 00001000 EBP: 0804e000 ESP: c615df3c
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process cat (pid: 6681, ti=c615c000 task=c0650920 task.ti=c615c000)
Stack: 0804e000 00000000 c03ab000 00001000 0804e000 d0965b8a d096ec47 00000138 
       00000020 d096ec2c c03ab000 cfbd8080 d09213e3 cfbd8080 0804e000 d09213bf 
       00001000 c0159167 c615dfa0 cfbd8080 fffffff7 0804e000 c615c000 c015955a 
Call Trace:
 [<d0965b8a>] saa7134_ts_start+0x8c/0x10e [saa7134]
 [<d09213e3>] ts_read+0x24/0x4b [saa7134_empress]
 [<d09213bf>] ts_read+0x0/0x4b [saa7134_empress]
 [<c0159167>] vfs_read+0x81/0xf4
 [<c015955a>] sys_read+0x3c/0x63
 [<c01036a6>] sysenter_past_esp+0x5f/0x85
 =======================
Code: 83 c4 14 c7 44 24 10 29 df 96 d0 5b 5e 5f e9 3b 82 7b ef 55 57 56 53 89 c3 83 ec 04 8b 40 18 0f b6 d4 25 ff 00 00 00 39 c2 75 04 <0f> 0b eb fe 83 bb a4 06 00 00 00 0f 85 b1 01 00 00 8b 83 b0 05 
EIP: [<d0963f86>] saa7134_set_dmabits+0x18/0x1e2 [saa7134] SS:ESP 0068:c615df3c
---[ end trace 78f2b1dfcb9f215d ]---
DEBUG: saa7134_ts_stop()


diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa6752hs.c
--- a/linux/drivers/media/video/saa7134/saa6752hs.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c	Wed May 28 02:50:47 2008 +1000
@@ -506,6 +506,14 @@ static int saa6752hs_init(struct i2c_cli
 	buf[1] = 0x05;
 	i2c_master_send(client,buf,2);
 
+/* FIXME start: Vendor specific patch for Beholder M6 */
+   /* Set leading null byte for TS */
+   buf[0] = 0xF6;
+   buf[1] = 0x00;
+   buf[2] = 0x01;
+   i2c_master_send(client,buf,3);
+/* FIXME stop */
+
 	/* compute PAT */
 	memcpy(localPAT, PAT, sizeof(PAT));
 	localPAT[17] = 0xe0 | ((h->params.ts_pid_pmt >> 8) & 0x0f);
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Wed May 28 02:50:47 2008 +1000
@@ -3979,7 +3979,8 @@ struct saa7134_board saa7134_boards[] = 
 	[SAA7134_BOARD_BEHOLD_M6] = {
 		/* Igor Kuznetsov <igk@igk.ru> */
 		/* Andrey Melnikoff <temnota@kmv.ru> */
-		.name           = "Beholder BeholdTV M6 / BeholdTV M6 Extra",
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M6",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
 		.radio_type     = UNSET,
@@ -4005,6 +4006,83 @@ struct saa7134_board saa7134_boards[] = 
 			.amux = LINE2,
 		},
 		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = ( SET_T_CODE_POLARITY_NON_INVERTED |
+		                    SET_CLOCK_NOT_DELAYED |
+				    SET_CLOCK_INVERTED |
+				    SET_VSYNC_OFF ),
+	},
+	[SAA7134_BOARD_BEHOLD_M63] = {
+		/* Igor Kuznetsov <igk@igk.ru> */
+		/* Andrey Melnikoff <temnota@kmv.ru> */
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M63",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tda9887_conf   = TDA9887_PRESENT,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		},{
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		},{
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		}},
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+		},
+		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = ( SET_T_CODE_POLARITY_NON_INVERTED |
+		                    SET_CLOCK_NOT_DELAYED |
+				    SET_CLOCK_INVERTED |
+				    SET_VSYNC_OFF ),
+	},
+	[SAA7134_BOARD_BEHOLD_M6_EXTRA] = {
+		/* Igor Kuznetsov <igk@igk.ru> */
+		/* Andrey Melnikoff <temnota@kmv.ru> */
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M6 Extra",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,  /* FIXME: Must be PHILIPS_FM1216ME_MK5*/
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tda9887_conf   = TDA9887_PRESENT,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		},{
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		},{
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		}},
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+		},
+		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = ( SET_T_CODE_POLARITY_NON_INVERTED |
+		                    SET_CLOCK_NOT_DELAYED |
+				    SET_CLOCK_INVERTED |
+				    SET_VSYNC_OFF ),
 	},
 	[SAA7134_BOARD_TWINHAN_DTV_DVB_3056] = {
 		.name           = "Twinhan Hybrid DTV-DVB 3056 PCI",
@@ -5272,13 +5350,13 @@ struct pci_device_id saa7134_pci_tbl[] =
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
 		.subvendor    = 0x5ace,
 		.subdevice    = 0x6193,
-		.driver_data  = SAA7134_BOARD_BEHOLD_M6,
+		.driver_data  = SAA7134_BOARD_BEHOLD_M6_EXTRA,
 	}, {
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
 		.subvendor    = 0x5ace,
 		.subdevice    = 0x6191,
-		.driver_data  = SAA7134_BOARD_BEHOLD_M6,
+		.driver_data  = SAA7134_BOARD_BEHOLD_M63,
 	},{
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
@@ -5702,6 +5780,8 @@ int saa7134_board_init1(struct saa7134_d
 	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
 	case SAA7134_BOARD_BEHOLD_607_9FM:
 	case SAA7134_BOARD_BEHOLD_M6:
+	case SAA7134_BOARD_BEHOLD_M63:
+	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
 		dev->has_remote = SAA7134_REMOTE_I2C;
 		break;
 	case SAA7134_BOARD_AVERMEDIA_A169_B:
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 28 05:28:56 2008 +1000
@@ -64,9 +64,9 @@ static void ts_reset_encoder(struct saa7
 		return;
 
 	saa_writeb(SAA7134_SPECIAL_MODE, 0x00);
-	msleep(10);
+	msleep(16);
 	saa_writeb(SAA7134_SPECIAL_MODE, 0x01);
-	msleep(100);
+	msleep(32);
 	dev->empress_started = 0;
 }
 
@@ -126,6 +126,9 @@ static int ts_release(struct inode *inod
 	/* stop the encoder */
 	ts_reset_encoder(dev);
 
+	/* stop TS */
+	saa7134_ts_stop(dev);
+
 	/* Mute audio */
 	saa_writeb(SAA7134_AUDIO_MUTE_CTRL,
 		saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6));
@@ -140,6 +143,9 @@ ts_read(struct file *file, char __user *
 
 	if (!dev->empress_started)
 		ts_init_encoder(dev);
+
+	/* start TS */
+	saa7134_ts_start(dev);
 
 	return videobuf_read_stream(&dev->empress_tsq,
 				    data, count, ppos, 0,
@@ -172,8 +178,7 @@ static int empress_querycap(struct file 
 static int empress_querycap(struct file *file, void  *priv,
 					struct v4l2_capability *cap)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	strcpy(cap->driver, "saa7134");
 	strlcpy(cap->card, saa7134_boards[dev->board].name,
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c	Wed May 28 02:50:48 2008 +1000
@@ -541,6 +541,8 @@ void saa7134_set_i2c_ir(struct saa7134_d
 		break;
 	case SAA7134_BOARD_BEHOLD_607_9FM:
 	case SAA7134_BOARD_BEHOLD_M6:
+	case SAA7134_BOARD_BEHOLD_M63:
+	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
 	case SAA7134_BOARD_BEHOLD_H6:
 		snprintf(ir->c.name, sizeof(ir->c.name), "BeholdTV");
 		ir->get_key   = get_key_beholdm6xx;
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-reg.h
--- a/linux/drivers/media/video/saa7134/saa7134-reg.h	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-reg.h	Wed May 28 02:50:48 2008 +1000
@@ -368,6 +368,7 @@
 #define SAA7135_DSP_RWCLEAR			0x586
 #define SAA7135_DSP_RWCLEAR_RERR		    1
 
+#define SAA7133_I2S_AUDIO_CONTROL               0x591
 /* ------------------------------------------------------------------ */
 /*
  * Local variables:
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-ts.c
--- a/linux/drivers/media/video/saa7134/saa7134-ts.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-ts.c	Wed May 28 07:51:32 2008 +1000
@@ -62,10 +62,6 @@ static int buffer_activate(struct saa713
 		saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(buf));
 	}
 
-	/* start DMA */
-	saa7134_set_dmabits(dev);
-
-	mod_timer(&dev->ts_q.timeout, jiffies+BUFFER_TIMEOUT);
 	return 0;
 }
 
@@ -75,7 +71,6 @@ static int buffer_prepare(struct videobu
 	struct saa7134_dev *dev = q->priv_data;
 	struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
 	unsigned int lines, llength, size;
-	u32 control;
 	int err;
 
 	dprintk("buffer_prepare [%p,%s]\n",buf,v4l2_field_names[field]);
@@ -84,6 +79,7 @@ static int buffer_prepare(struct videobu
 	lines = dev->ts.nr_packets;
 
 	size = lines * llength;
+	
 	if (0 != buf->vb.baddr  &&  buf->vb.bsize < size)
 		return -EINVAL;
 
@@ -110,17 +106,6 @@ static int buffer_prepare(struct videobu
 			goto oops;
 	}
 
-	/* dma: setup channel 5 (= TS) */
-	control = SAA7134_RS_CONTROL_BURST_16 |
-		  SAA7134_RS_CONTROL_ME |
-		  (buf->pt->dma >> 12);
-
-	saa_writeb(SAA7134_TS_DMA0, ((lines-1)&0xff));
-	saa_writeb(SAA7134_TS_DMA1, (((lines-1)>>8)&0xff));
-	saa_writeb(SAA7134_TS_DMA2, ((((lines-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */
-	saa_writel(SAA7134_RS_PITCH(5),TS_PACKET_SIZE);
-	saa_writel(SAA7134_RS_CONTROL(5),control);
-
 	buf->vb.state = VIDEOBUF_PREPARED;
 	buf->activate = buffer_activate;
 	buf->vb.field = field;
@@ -179,10 +164,8 @@ MODULE_PARM_DESC(ts_nr_packets,"size of 
 
 int saa7134_ts_init_hw(struct saa7134_dev *dev)
 {
-	/* deactivate TS softreset */
-	saa_writeb(SAA7134_TS_SERIAL1, 0x00);
 	/* TSSOP high active, TSVAL high active, TSLOCK ignored */
-	saa_writeb(SAA7134_TS_PARALLEL, 0xec);
+	saa_writeb(SAA7134_TS_PARALLEL, 0x6c);
 	saa_writeb(SAA7134_TS_PARALLEL_SERIAL, (TS_PACKET_SIZE-1));
 	saa_writeb(SAA7134_TS_DMA0, ((dev->ts.nr_packets-1)&0xff));
 	saa_writeb(SAA7134_TS_DMA1, (((dev->ts.nr_packets-1)>>8)&0xff));
@@ -202,7 +185,7 @@ int saa7134_ts_init1(struct saa7134_dev 
 		tsbufs = VIDEO_MAX_FRAME;
 	if (ts_nr_packets < 4)
 		ts_nr_packets = 4;
-	if (ts_nr_packets > 312)
+	if (ts_nr_packets >= 312)
 		ts_nr_packets = 312;
 	dev->ts.nr_bufs    = tsbufs;
 	dev->ts.nr_packets = ts_nr_packets;
@@ -250,6 +233,60 @@ void saa7134_irq_ts_done(struct saa7134_
 	spin_unlock(&dev->slock);
 }
 
+/* Test function for start TS */
+//void saa7134_ts_start(struct videobuf_queue *q, struct videobuf_buffer *vb)
+void saa7134_ts_start(struct saa7134_dev *dev)
+{
+//	struct saa7134_dev *dev = q->priv_data;
+//	struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
+	unsigned int lines;
+	u32 control;
+
+	printk("DEBUG: saa7134_ts_start()\n");
+
+	lines = dev->ts.nr_packets;
+
+	printk(" packets = %d, buffs = %d\n",dev->ts.nr_packets, dev->ts.nr_bufs);
+
+	/* dma: setup channel 5 (= TS) */
+	control = SAA7134_RS_CONTROL_BURST_16 |
+		  SAA7134_RS_CONTROL_ME |
+		  (dev->ts.pt_ts.dma >> 12);
+
+	saa_writeb(SAA7134_TS_DMA0, ((lines-1)&0xff));
+	saa_writeb(SAA7134_TS_DMA1, (((lines-1)>>8)&0xff));
+	saa_writeb(SAA7134_TS_DMA2, ((((lines-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */
+	saa_writel(SAA7134_RS_PITCH(5),TS_PACKET_SIZE);
+	saa_writel(SAA7134_RS_CONTROL(5),control);
+
+	/* start DMA */
+	saa7134_set_dmabits(dev);
+
+	mod_timer(&dev->ts_q.timeout, jiffies+BUFFER_TIMEOUT);
+
+	/* Clear TS cache */
+	saa_writeb(SAA7134_TS_SERIAL1, 0x00);
+	saa_writeb(SAA7134_TS_SERIAL1, 0x03);
+	saa_writeb(SAA7134_TS_SERIAL1, 0x00);
+	saa_writeb(SAA7134_TS_SERIAL1, 0x01);
+
+	/* TS clock non-inverted */
+	saa_writeb(SAA7134_TS_SERIAL1, 0x00);
+
+	/* Start TS stream */
+	saa_writeb(SAA7134_TS_SERIAL0, 0x40);
+	saa_writeb(SAA7134_TS_PARALLEL, 0xEC);
+}
+
+/* Test function for stop TS */
+void saa7134_ts_stop(struct saa7134_dev *dev)
+{
+	printk("DEBUG: saa7134_ts_stop()\n");
+	saa_writeb(SAA7134_TS_PARALLEL, 0x6c);
+}
+
+EXPORT_SYMBOL(saa7134_ts_start);
+EXPORT_SYMBOL(saa7134_ts_stop);
 /* ----------------------------------------------------------- */
 /*
  * Local variables:
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-tvaudio.c
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed May 28 02:50:48 2008 +1000
@@ -928,13 +928,34 @@ void saa7134_enable_i2s(struct saa7134_d
 
 	if (!card_is_empress(dev))
 		return;
-	i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
-
-	/* enable I2S audio output for the mpeg encoder */
-	saa_writeb(SAA7134_I2S_OUTPUT_SELECT,  0x80);
-	saa_writeb(SAA7134_I2S_OUTPUT_FORMAT,  i2s_format);
-	saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,   0x0F);
-	saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x01);
+
+	if (dev->pci->device == PCI_DEVICE_ID_PHILIPS_SAA7130)
+		return;
+
+	/* configure GPIO for out */
+	saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000);
+
+	switch (dev->pci->device) {
+	    case PCI_DEVICE_ID_PHILIPS_SAA7133:
+	    case PCI_DEVICE_ID_PHILIPS_SAA7135:
+                /* Set I2S format (SONY)  */
+		saa_writeb(SAA7133_I2S_AUDIO_CONTROL, 0x00);
+		/* Start I2S */
+		saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x11);
+		break;
+
+	    case PCI_DEVICE_ID_PHILIPS_SAA7134:
+		i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
+
+		/* enable I2S audio output for the mpeg encoder */
+		saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80);
+		saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2s_format);
+		saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,  0x0F);
+		saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,  0x01);
+
+	    default:
+		break;
+	}
 }
 
 int saa7134_tvaudio_rx2mode(u32 rx)
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-video.c
--- a/linux/drivers/media/video/saa7134/saa7134-video.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c	Wed May 28 02:50:48 2008 +1000
@@ -2475,7 +2475,6 @@ int saa7134_videoport_init(struct saa713
 		video_reg &= ~VP_T_CODE_P_INVERTED;
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL1, video_reg);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL2, video_out[vo][2]);
-	saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL4, video_out[vo][4]);
 	video_reg = video_out[vo][5];
 	if (vid_port_opts & SET_CLOCK_NOT_DELAYED)
@@ -2491,6 +2490,9 @@ int saa7134_videoport_init(struct saa713
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL6, video_reg);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL7, video_out[vo][7]);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL8, video_out[vo][8]);
+
+	/* Start videoport */
+	saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);
 
 	return 0;
 }
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134.h	Wed May 28 03:21:45 2008 +1000
@@ -271,7 +271,8 @@ struct saa7134_format {
 #define SAA7134_BOARD_AVERMEDIA_A700_PRO    140
 #define SAA7134_BOARD_AVERMEDIA_A700_HYBRID 141
 #define SAA7134_BOARD_BEHOLD_H6      142
-
+#define SAA7134_BOARD_BEHOLD_M63      143
+#define SAA7134_BOARD_BEHOLD_M6_EXTRA    144
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
@@ -708,6 +709,8 @@ void saa7134_ts_unregister(struct saa713
 
 int saa7134_ts_init_hw(struct saa7134_dev *dev);
 
+void saa7134_ts_start(struct saa7134_dev *dev);
+void saa7134_ts_stop(struct saa7134_dev *dev);
 /* ----------------------------------------------------------- */
 /* saa7134-vbi.c                                               */
 


With my best regards, Dmitry.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: empress_test_02.diff --]
[-- Type: text/x-patch; name=empress_test_02.diff, Size: 15195 bytes --]

diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa6752hs.c
--- a/linux/drivers/media/video/saa7134/saa6752hs.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c	Wed May 28 02:50:47 2008 +1000
@@ -506,6 +506,14 @@ static int saa6752hs_init(struct i2c_cli
 	buf[1] = 0x05;
 	i2c_master_send(client,buf,2);
 
+/* FIXME start: Vendor specific patch for Beholder M6 */
+   /* Set leading null byte for TS */
+   buf[0] = 0xF6;
+   buf[1] = 0x00;
+   buf[2] = 0x01;
+   i2c_master_send(client,buf,3);
+/* FIXME stop */
+
 	/* compute PAT */
 	memcpy(localPAT, PAT, sizeof(PAT));
 	localPAT[17] = 0xe0 | ((h->params.ts_pid_pmt >> 8) & 0x0f);
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Wed May 28 02:50:47 2008 +1000
@@ -3979,7 +3979,8 @@ struct saa7134_board saa7134_boards[] = 
 	[SAA7134_BOARD_BEHOLD_M6] = {
 		/* Igor Kuznetsov <igk@igk.ru> */
 		/* Andrey Melnikoff <temnota@kmv.ru> */
-		.name           = "Beholder BeholdTV M6 / BeholdTV M6 Extra",
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M6",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
 		.radio_type     = UNSET,
@@ -4005,6 +4006,83 @@ struct saa7134_board saa7134_boards[] = 
 			.amux = LINE2,
 		},
 		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = ( SET_T_CODE_POLARITY_NON_INVERTED |
+		                    SET_CLOCK_NOT_DELAYED |
+				    SET_CLOCK_INVERTED |
+				    SET_VSYNC_OFF ),
+	},
+	[SAA7134_BOARD_BEHOLD_M63] = {
+		/* Igor Kuznetsov <igk@igk.ru> */
+		/* Andrey Melnikoff <temnota@kmv.ru> */
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M63",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tda9887_conf   = TDA9887_PRESENT,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		},{
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		},{
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		}},
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+		},
+		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = ( SET_T_CODE_POLARITY_NON_INVERTED |
+		                    SET_CLOCK_NOT_DELAYED |
+				    SET_CLOCK_INVERTED |
+				    SET_VSYNC_OFF ),
+	},
+	[SAA7134_BOARD_BEHOLD_M6_EXTRA] = {
+		/* Igor Kuznetsov <igk@igk.ru> */
+		/* Andrey Melnikoff <temnota@kmv.ru> */
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M6 Extra",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,  /* FIXME: Must be PHILIPS_FM1216ME_MK5*/
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tda9887_conf   = TDA9887_PRESENT,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		},{
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		},{
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		}},
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+		},
+		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = ( SET_T_CODE_POLARITY_NON_INVERTED |
+		                    SET_CLOCK_NOT_DELAYED |
+				    SET_CLOCK_INVERTED |
+				    SET_VSYNC_OFF ),
 	},
 	[SAA7134_BOARD_TWINHAN_DTV_DVB_3056] = {
 		.name           = "Twinhan Hybrid DTV-DVB 3056 PCI",
@@ -5272,13 +5350,13 @@ struct pci_device_id saa7134_pci_tbl[] =
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
 		.subvendor    = 0x5ace,
 		.subdevice    = 0x6193,
-		.driver_data  = SAA7134_BOARD_BEHOLD_M6,
+		.driver_data  = SAA7134_BOARD_BEHOLD_M6_EXTRA,
 	}, {
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
 		.subvendor    = 0x5ace,
 		.subdevice    = 0x6191,
-		.driver_data  = SAA7134_BOARD_BEHOLD_M6,
+		.driver_data  = SAA7134_BOARD_BEHOLD_M63,
 	},{
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
@@ -5702,6 +5780,8 @@ int saa7134_board_init1(struct saa7134_d
 	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
 	case SAA7134_BOARD_BEHOLD_607_9FM:
 	case SAA7134_BOARD_BEHOLD_M6:
+	case SAA7134_BOARD_BEHOLD_M63:
+	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
 		dev->has_remote = SAA7134_REMOTE_I2C;
 		break;
 	case SAA7134_BOARD_AVERMEDIA_A169_B:
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c	Wed May 28 05:28:56 2008 +1000
@@ -64,9 +64,9 @@ static void ts_reset_encoder(struct saa7
 		return;
 
 	saa_writeb(SAA7134_SPECIAL_MODE, 0x00);
-	msleep(10);
+	msleep(16);
 	saa_writeb(SAA7134_SPECIAL_MODE, 0x01);
-	msleep(100);
+	msleep(32);
 	dev->empress_started = 0;
 }
 
@@ -126,6 +126,9 @@ static int ts_release(struct inode *inod
 	/* stop the encoder */
 	ts_reset_encoder(dev);
 
+	/* stop TS */
+	saa7134_ts_stop(dev);
+
 	/* Mute audio */
 	saa_writeb(SAA7134_AUDIO_MUTE_CTRL,
 		saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6));
@@ -140,6 +143,9 @@ ts_read(struct file *file, char __user *
 
 	if (!dev->empress_started)
 		ts_init_encoder(dev);
+
+	/* start TS */
+	saa7134_ts_start(dev);
 
 	return videobuf_read_stream(&dev->empress_tsq,
 				    data, count, ppos, 0,
@@ -172,8 +178,7 @@ static int empress_querycap(struct file 
 static int empress_querycap(struct file *file, void  *priv,
 					struct v4l2_capability *cap)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	strcpy(cap->driver, "saa7134");
 	strlcpy(cap->card, saa7134_boards[dev->board].name,
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c	Wed May 28 02:50:48 2008 +1000
@@ -541,6 +541,8 @@ void saa7134_set_i2c_ir(struct saa7134_d
 		break;
 	case SAA7134_BOARD_BEHOLD_607_9FM:
 	case SAA7134_BOARD_BEHOLD_M6:
+	case SAA7134_BOARD_BEHOLD_M63:
+	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
 	case SAA7134_BOARD_BEHOLD_H6:
 		snprintf(ir->c.name, sizeof(ir->c.name), "BeholdTV");
 		ir->get_key   = get_key_beholdm6xx;
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-reg.h
--- a/linux/drivers/media/video/saa7134/saa7134-reg.h	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-reg.h	Wed May 28 02:50:48 2008 +1000
@@ -368,6 +368,7 @@
 #define SAA7135_DSP_RWCLEAR			0x586
 #define SAA7135_DSP_RWCLEAR_RERR		    1
 
+#define SAA7133_I2S_AUDIO_CONTROL               0x591
 /* ------------------------------------------------------------------ */
 /*
  * Local variables:
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-ts.c
--- a/linux/drivers/media/video/saa7134/saa7134-ts.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-ts.c	Wed May 28 07:51:32 2008 +1000
@@ -62,10 +62,6 @@ static int buffer_activate(struct saa713
 		saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(buf));
 	}
 
-	/* start DMA */
-	saa7134_set_dmabits(dev);
-
-	mod_timer(&dev->ts_q.timeout, jiffies+BUFFER_TIMEOUT);
 	return 0;
 }
 
@@ -75,7 +71,6 @@ static int buffer_prepare(struct videobu
 	struct saa7134_dev *dev = q->priv_data;
 	struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
 	unsigned int lines, llength, size;
-	u32 control;
 	int err;
 
 	dprintk("buffer_prepare [%p,%s]\n",buf,v4l2_field_names[field]);
@@ -84,6 +79,7 @@ static int buffer_prepare(struct videobu
 	lines = dev->ts.nr_packets;
 
 	size = lines * llength;
+	
 	if (0 != buf->vb.baddr  &&  buf->vb.bsize < size)
 		return -EINVAL;
 
@@ -110,17 +106,6 @@ static int buffer_prepare(struct videobu
 			goto oops;
 	}
 
-	/* dma: setup channel 5 (= TS) */
-	control = SAA7134_RS_CONTROL_BURST_16 |
-		  SAA7134_RS_CONTROL_ME |
-		  (buf->pt->dma >> 12);
-
-	saa_writeb(SAA7134_TS_DMA0, ((lines-1)&0xff));
-	saa_writeb(SAA7134_TS_DMA1, (((lines-1)>>8)&0xff));
-	saa_writeb(SAA7134_TS_DMA2, ((((lines-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */
-	saa_writel(SAA7134_RS_PITCH(5),TS_PACKET_SIZE);
-	saa_writel(SAA7134_RS_CONTROL(5),control);
-
 	buf->vb.state = VIDEOBUF_PREPARED;
 	buf->activate = buffer_activate;
 	buf->vb.field = field;
@@ -179,10 +164,8 @@ MODULE_PARM_DESC(ts_nr_packets,"size of 
 
 int saa7134_ts_init_hw(struct saa7134_dev *dev)
 {
-	/* deactivate TS softreset */
-	saa_writeb(SAA7134_TS_SERIAL1, 0x00);
 	/* TSSOP high active, TSVAL high active, TSLOCK ignored */
-	saa_writeb(SAA7134_TS_PARALLEL, 0xec);
+	saa_writeb(SAA7134_TS_PARALLEL, 0x6c);
 	saa_writeb(SAA7134_TS_PARALLEL_SERIAL, (TS_PACKET_SIZE-1));
 	saa_writeb(SAA7134_TS_DMA0, ((dev->ts.nr_packets-1)&0xff));
 	saa_writeb(SAA7134_TS_DMA1, (((dev->ts.nr_packets-1)>>8)&0xff));
@@ -202,7 +185,7 @@ int saa7134_ts_init1(struct saa7134_dev 
 		tsbufs = VIDEO_MAX_FRAME;
 	if (ts_nr_packets < 4)
 		ts_nr_packets = 4;
-	if (ts_nr_packets > 312)
+	if (ts_nr_packets >= 312)
 		ts_nr_packets = 312;
 	dev->ts.nr_bufs    = tsbufs;
 	dev->ts.nr_packets = ts_nr_packets;
@@ -250,6 +233,60 @@ void saa7134_irq_ts_done(struct saa7134_
 	spin_unlock(&dev->slock);
 }
 
+/* Test function for start TS */
+//void saa7134_ts_start(struct videobuf_queue *q, struct videobuf_buffer *vb)
+void saa7134_ts_start(struct saa7134_dev *dev)
+{
+//	struct saa7134_dev *dev = q->priv_data;
+//	struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb);
+	unsigned int lines;
+	u32 control;
+
+	printk("DEBUG: saa7134_ts_start()\n");
+
+	lines = dev->ts.nr_packets;
+
+	printk(" packets = %d, buffs = %d\n",dev->ts.nr_packets, dev->ts.nr_bufs);
+
+	/* dma: setup channel 5 (= TS) */
+	control = SAA7134_RS_CONTROL_BURST_16 |
+		  SAA7134_RS_CONTROL_ME |
+		  (dev->ts.pt_ts.dma >> 12);
+
+	saa_writeb(SAA7134_TS_DMA0, ((lines-1)&0xff));
+	saa_writeb(SAA7134_TS_DMA1, (((lines-1)>>8)&0xff));
+	saa_writeb(SAA7134_TS_DMA2, ((((lines-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */
+	saa_writel(SAA7134_RS_PITCH(5),TS_PACKET_SIZE);
+	saa_writel(SAA7134_RS_CONTROL(5),control);
+
+	/* start DMA */
+	saa7134_set_dmabits(dev);
+
+	mod_timer(&dev->ts_q.timeout, jiffies+BUFFER_TIMEOUT);
+
+	/* Clear TS cache */
+	saa_writeb(SAA7134_TS_SERIAL1, 0x00);
+	saa_writeb(SAA7134_TS_SERIAL1, 0x03);
+	saa_writeb(SAA7134_TS_SERIAL1, 0x00);
+	saa_writeb(SAA7134_TS_SERIAL1, 0x01);
+
+	/* TS clock non-inverted */
+	saa_writeb(SAA7134_TS_SERIAL1, 0x00);
+
+	/* Start TS stream */
+	saa_writeb(SAA7134_TS_SERIAL0, 0x40);
+	saa_writeb(SAA7134_TS_PARALLEL, 0xEC);
+}
+
+/* Test function for stop TS */
+void saa7134_ts_stop(struct saa7134_dev *dev)
+{
+	printk("DEBUG: saa7134_ts_stop()\n");
+	saa_writeb(SAA7134_TS_PARALLEL, 0x6c);
+}
+
+EXPORT_SYMBOL(saa7134_ts_start);
+EXPORT_SYMBOL(saa7134_ts_stop);
 /* ----------------------------------------------------------- */
 /*
  * Local variables:
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-tvaudio.c
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Wed May 28 02:50:48 2008 +1000
@@ -928,13 +928,34 @@ void saa7134_enable_i2s(struct saa7134_d
 
 	if (!card_is_empress(dev))
 		return;
-	i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
-
-	/* enable I2S audio output for the mpeg encoder */
-	saa_writeb(SAA7134_I2S_OUTPUT_SELECT,  0x80);
-	saa_writeb(SAA7134_I2S_OUTPUT_FORMAT,  i2s_format);
-	saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,   0x0F);
-	saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x01);
+
+	if (dev->pci->device == PCI_DEVICE_ID_PHILIPS_SAA7130)
+		return;
+
+	/* configure GPIO for out */
+	saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000);
+
+	switch (dev->pci->device) {
+	    case PCI_DEVICE_ID_PHILIPS_SAA7133:
+	    case PCI_DEVICE_ID_PHILIPS_SAA7135:
+                /* Set I2S format (SONY)  */
+		saa_writeb(SAA7133_I2S_AUDIO_CONTROL, 0x00);
+		/* Start I2S */
+		saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x11);
+		break;
+
+	    case PCI_DEVICE_ID_PHILIPS_SAA7134:
+		i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
+
+		/* enable I2S audio output for the mpeg encoder */
+		saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80);
+		saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2s_format);
+		saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,  0x0F);
+		saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,  0x01);
+
+	    default:
+		break;
+	}
 }
 
 int saa7134_tvaudio_rx2mode(u32 rx)
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134-video.c
--- a/linux/drivers/media/video/saa7134/saa7134-video.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c	Wed May 28 02:50:48 2008 +1000
@@ -2475,7 +2475,6 @@ int saa7134_videoport_init(struct saa713
 		video_reg &= ~VP_T_CODE_P_INVERTED;
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL1, video_reg);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL2, video_out[vo][2]);
-	saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL4, video_out[vo][4]);
 	video_reg = video_out[vo][5];
 	if (vid_port_opts & SET_CLOCK_NOT_DELAYED)
@@ -2491,6 +2490,9 @@ int saa7134_videoport_init(struct saa713
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL6, video_reg);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL7, video_out[vo][7]);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL8, video_out[vo][8]);
+
+	/* Start videoport */
+	saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);
 
 	return 0;
 }
diff -r 9d04bba82511 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/saa7134/saa7134.h	Wed May 28 03:21:45 2008 +1000
@@ -271,7 +271,8 @@ struct saa7134_format {
 #define SAA7134_BOARD_AVERMEDIA_A700_PRO    140
 #define SAA7134_BOARD_AVERMEDIA_A700_HYBRID 141
 #define SAA7134_BOARD_BEHOLD_H6      142
-
+#define SAA7134_BOARD_BEHOLD_M63      143
+#define SAA7134_BOARD_BEHOLD_M6_EXTRA    144
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
@@ -708,6 +709,8 @@ void saa7134_ts_unregister(struct saa713
 
 int saa7134_ts_init_hw(struct saa7134_dev *dev);
 
+void saa7134_ts_start(struct saa7134_dev *dev);
+void saa7134_ts_stop(struct saa7134_dev *dev);
 /* ----------------------------------------------------------- */
 /* saa7134-vbi.c                                               */
 

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH] New for I2S on for MPEG of saa7134_empress
  2008-05-21  0:52                                 ` hermann pitton
                                                     ` (4 preceding siblings ...)
  2008-05-28  4:47                                   ` Dmitri Belimov
@ 2008-06-10 10:56                                   ` Dmitri Belimov
  2008-06-10 11:01                                   ` [PATCH] callbacks function " Dmitri Belimov
                                                     ` (2 subsequent siblings)
  8 siblings, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-06-10 10:56 UTC (permalink / raw
  To: hermann pitton; +Cc: video4linux-list, Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 4358 bytes --]

Hi All

Rework saa7134_enable_i2s function. Remove vendor specific data.
Configure I2S output port specific for model of SAA7133/5-SAA7134. 
I think it is more good.
Renamed definition of I2S audio output control register. It`s SAA7133/5 register
Start video port after configuring procedure.

diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-reg.h
--- a/linux/drivers/media/video/saa7134/saa7134-reg.h	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-reg.h	Mon Jun 09 15:16:05 2008 +1000
@@ -353,7 +353,6 @@
 
 /* I2S output */
 #define SAA7134_I2S_AUDIO_OUTPUT                0x1c0
-#define SAA7134_I2S_AUDIO_CONTROL               0x591
 
 /* test modes */
 #define SAA7134_SPECIAL_MODE                    0x1d0
@@ -369,6 +368,7 @@
 #define SAA7135_DSP_RWCLEAR			0x586
 #define SAA7135_DSP_RWCLEAR_RERR		    1
 
+#define SAA7133_I2S_AUDIO_CONTROL               0x591
 /* ------------------------------------------------------------------ */
 /*
  * Local variables:
diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-tvaudio.c
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Tue Jun 10 20:33:00 2008 +1000
@@ -929,23 +929,32 @@ void saa7134_enable_i2s(struct saa7134_d
 	if (!card_is_empress(dev))
 		return;
 
-	switch (dev->board) {
-	case SAA7134_BOARD_BEHOLD_M6:
-	    /* configure GPIO for out audio */
-	    saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000);
-	    /* Set I2S format  */
-	    saa_writeb(SAA7134_I2S_AUDIO_CONTROL,  0x00);
+	if (dev->pci->device == PCI_DEVICE_ID_PHILIPS_SAA7130)
+		return;
+
+	/* configure GPIO for out */
+	saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000);
+
+	switch (dev->pci->device) {
+	case PCI_DEVICE_ID_PHILIPS_SAA7133:
+	case PCI_DEVICE_ID_PHILIPS_SAA7135:
+	    /* Set I2S format (SONY)  */
+	    saa_writeb(SAA7133_I2S_AUDIO_CONTROL, 0x00);
 	    /* Start I2S */
-	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x11);
+	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x11);
 	    break;
+
+	case PCI_DEVICE_ID_PHILIPS_SAA7134:
+	    i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
+
+	    /* enable I2S audio output for the mpeg encoder */
+	    saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80);
+	    saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2s_format);
+	    saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,  0x0F);
+	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,  0x01);
+
 	default:
-	    i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
-
-	    /* enable I2S audio output for the mpeg encoder */
-	    saa_writeb(SAA7134_I2S_OUTPUT_SELECT,  0x80);
-	    saa_writeb(SAA7134_I2S_OUTPUT_FORMAT,  i2s_format);
-	    saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,   0x0F);
-	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x01);
+	    break;
 	}
 }
 
diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-video.c
--- a/linux/drivers/media/video/saa7134/saa7134-video.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jun 10 19:49:58 2008 +1000
@@ -2469,13 +2469,14 @@ int saa7134_videoport_init(struct saa713
 	int vo = saa7134_boards[dev->board].video_out;
 	int video_reg;
 	unsigned int vid_port_opts = saa7134_boards[dev->board].vid_port_opts;
+
+	/* Configure videoport */
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL0, video_out[vo][0]);
 	video_reg = video_out[vo][1];
 	if (vid_port_opts & SET_T_CODE_POLARITY_NON_INVERTED)
 		video_reg &= ~VP_T_CODE_P_INVERTED;
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL1, video_reg);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL2, video_out[vo][2]);
-	saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL4, video_out[vo][4]);
 	video_reg = video_out[vo][5];
 	if (vid_port_opts & SET_CLOCK_NOT_DELAYED)
@@ -2491,6 +2492,9 @@ int saa7134_videoport_init(struct saa713
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL6, video_reg);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL7, video_out[vo][7]);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL8, video_out[vo][8]);
+
+	/* Start videoport */
+	saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);
 
 	return 0;
 }

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

With my best regards, Dmitry.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: beholder_ts_02.diff --]
[-- Type: text/x-patch; name=beholder_ts_02.diff, Size: 4023 bytes --]

diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-reg.h
--- a/linux/drivers/media/video/saa7134/saa7134-reg.h	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-reg.h	Mon Jun 09 15:16:05 2008 +1000
@@ -353,7 +353,6 @@
 
 /* I2S output */
 #define SAA7134_I2S_AUDIO_OUTPUT                0x1c0
-#define SAA7134_I2S_AUDIO_CONTROL               0x591
 
 /* test modes */
 #define SAA7134_SPECIAL_MODE                    0x1d0
@@ -369,6 +368,7 @@
 #define SAA7135_DSP_RWCLEAR			0x586
 #define SAA7135_DSP_RWCLEAR_RERR		    1
 
+#define SAA7133_I2S_AUDIO_CONTROL               0x591
 /* ------------------------------------------------------------------ */
 /*
  * Local variables:
diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-tvaudio.c
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c	Tue Jun 10 20:33:00 2008 +1000
@@ -929,23 +929,32 @@ void saa7134_enable_i2s(struct saa7134_d
 	if (!card_is_empress(dev))
 		return;
 
-	switch (dev->board) {
-	case SAA7134_BOARD_BEHOLD_M6:
-	    /* configure GPIO for out audio */
-	    saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000);
-	    /* Set I2S format  */
-	    saa_writeb(SAA7134_I2S_AUDIO_CONTROL,  0x00);
+	if (dev->pci->device == PCI_DEVICE_ID_PHILIPS_SAA7130)
+		return;
+
+	/* configure GPIO for out */
+	saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0E000000, 0x00000000);
+
+	switch (dev->pci->device) {
+	case PCI_DEVICE_ID_PHILIPS_SAA7133:
+	case PCI_DEVICE_ID_PHILIPS_SAA7135:
+	    /* Set I2S format (SONY)  */
+	    saa_writeb(SAA7133_I2S_AUDIO_CONTROL, 0x00);
 	    /* Start I2S */
-	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x11);
+	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x11);
 	    break;
+
+	case PCI_DEVICE_ID_PHILIPS_SAA7134:
+	    i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
+
+	    /* enable I2S audio output for the mpeg encoder */
+	    saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80);
+	    saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2s_format);
+	    saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,  0x0F);
+	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,  0x01);
+
 	default:
-	    i2s_format = (dev->input->amux == TV) ? 0x00 : 0x01;
-
-	    /* enable I2S audio output for the mpeg encoder */
-	    saa_writeb(SAA7134_I2S_OUTPUT_SELECT,  0x80);
-	    saa_writeb(SAA7134_I2S_OUTPUT_FORMAT,  i2s_format);
-	    saa_writeb(SAA7134_I2S_OUTPUT_LEVEL,   0x0F);
-	    saa_writeb(SAA7134_I2S_AUDIO_OUTPUT,   0x01);
+	    break;
 	}
 }
 
diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-video.c
--- a/linux/drivers/media/video/saa7134/saa7134-video.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c	Tue Jun 10 19:49:58 2008 +1000
@@ -2469,13 +2469,14 @@ int saa7134_videoport_init(struct saa713
 	int vo = saa7134_boards[dev->board].video_out;
 	int video_reg;
 	unsigned int vid_port_opts = saa7134_boards[dev->board].vid_port_opts;
+
+	/* Configure videoport */
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL0, video_out[vo][0]);
 	video_reg = video_out[vo][1];
 	if (vid_port_opts & SET_T_CODE_POLARITY_NON_INVERTED)
 		video_reg &= ~VP_T_CODE_P_INVERTED;
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL1, video_reg);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL2, video_out[vo][2]);
-	saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL4, video_out[vo][4]);
 	video_reg = video_out[vo][5];
 	if (vid_port_opts & SET_CLOCK_NOT_DELAYED)
@@ -2491,6 +2492,9 @@ int saa7134_videoport_init(struct saa713
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL6, video_reg);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL7, video_out[vo][7]);
 	saa_writeb(SAA7134_VIDEO_PORT_CTRL8, video_out[vo][8]);
+
+	/* Start videoport */
+	saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);
 
 	return 0;
 }

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH] callbacks function of saa7134_empress
  2008-05-21  0:52                                 ` hermann pitton
                                                     ` (5 preceding siblings ...)
  2008-06-10 10:56                                   ` [PATCH] New for I2S on for MPEG of saa7134_empress Dmitri Belimov
@ 2008-06-10 11:01                                   ` Dmitri Belimov
  2008-06-10 11:06                                   ` [PATCH] Beholder`s cards description Dmitri Belimov
  2008-06-12  9:44                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
  8 siblings, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-06-10 11:01 UTC (permalink / raw
  To: hermann pitton; +Cc: video4linux-list, Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 6730 bytes --]

Hi All

If I try v4l2-ctl --all -d /dev/video1 or v4l2-ctl --streamon -d /dev/video1 modules crashed:

BUG: unable to handle kernel NULL pointer dereference at 00000000
IP: [<c028b66e>] __mutex_lock_slowpath+0x29/0x7b
*pde = 00000000 
Oops: 0002 [#1] SMP 
Modules linked in: ac battery loop saa7134_empress(F) saa6752hs(F) tuner_simple(F) tuner_types(F) tea5767(F) tda9887(F) tda8290(F) tea5761(F) tuner(F) snd_cmipci snd_pcm snd_page_alloc snd_opl3_lib saa7134(F) snd_mpu401 parport_pc parport snd_timer snd_hwdep snd_mpu401_uart floppy rtc psmouse videodev(F) v4l1_compat(F) compat_ioctl32(F) v4l2_common(F) videobuf_dma_sg(F) videobuf_core(F) snd_rawmidi snd_seq_device via_ircc pcspkr snd ir_kbd_i2c(F) irda soundcore ir_common(F) crc_ccitt tveeprom(F) i2c_viapro i2c_core button via_agp agpgart evdev ext3 jbd mbcache ide_cd_mod cdrom ide_disk 8139cp via82cxxx ide_core 8139too mii ehci_hcd uhci_hcd usbcore thermal processor fan

Pid: 2742, comm: v4l2-ctl Tainted: GF        (2.6.25 #1)
EIP: 0060:[<c028b66e>] EFLAGS: 00010286 CPU: 0
EIP is at __mutex_lock_slowpath+0x29/0x7b
EAX: ffffffff EBX: d0a09eb4 ECX: c0314b04 EDX: 00000000
ESI: d0a09ebc EDI: d0a09eb8 EBP: cf325260 ESP: ced7fde4
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process v4l2-ctl (pid: 2742, ti=ced7e000 task=cf325260 task.ti=ced7e000)
Stack: d0a09ebc d0a097c4 ced7fed4 fffffff0 d0a09eb4 00000000 cf17e000 c028b52b 
       d08e5411 00000000 ced7fed4 00000000 d0975acb 40045612 cfa86ee0 ffffffcd 
       cf2b7000 ced7febc c03858d6 00000019 00000292 d089e4ec cf37b2a0 d089e4a0 
Call Trace:
 [<c028b52b>] mutex_lock+0xa/0xb
 [<d08e5411>] videobuf_streamon+0xf/0x9a [videobuf_core]
 [<d0975acb>] __video_do_ioctl+0x136a/0x2d68 [videodev]
 [<d088f789>] task_end_request+0x40/0x51 [ide_core]
 [<d088c4aa>] ide_intr+0x187/0x192 [ide_core]
 [<c016a551>] mntput_no_expire+0x11/0x64
 [<c0160b1c>] path_walk+0x90/0x98
 [<d0977738>] video_ioctl2+0x173/0x239 [videodev]
 [<c0140936>] filemap_fault+0x202/0x370
 [<c014930a>] __do_fault+0x2c3/0x2fe
 [<c014ab03>] handle_mm_fault+0x22a/0x49f
 [<c0162737>] vfs_ioctl+0x47/0x5d
 [<c0162992>] do_vfs_ioctl+0x245/0x258
 [<c01629e6>] sys_ioctl+0x41/0x5b
 [<c01036a6>] sysenter_past_esp+0x5f/0x85
 =======================
Code: c0 c3 55 57 56 53 89 c3 8d 78 04 83 ec 0c 89 f8 64 8b 2d 00 c0 36 c0 e8 ef 0b 00 00 8d 73 08 83 c8 ff 8b 56 04 89 34 24 89 66 04 <89> 22 89 54 24 04 89 6c 24 08 87 03 48 74 21 83 c8 ff 87 03 48 
EIP: [<c028b66e>] __mutex_lock_slowpath+0x29/0x7b SS:ESP 0068:ced7fde4
---[ end trace 157ece570bdba591 ]---

After this fix all of that commands works without problem:

v4l2-ctl --all -d /dev/video1

Driver Info:
	Driver name   : saa7134
	Card type     : Beholder BeholdTV M6 Extra
	Bus info      : PCI:0000:00:0d.0
	Driver version: 526
	Capabilities  : 0x05000001
		Video Capture
		Read/Write
		Streaming
Format Video Capture:
	Width/Height  : 720/576
	Pixel Format  : MPEG
	Field         : Any
	Bytes per Line: 0
	Size Image    : 58656
	Colorspace    : Unknown (00000000)
Video input : 0 (CCIR656)
Video Standard = 0x000000ff
	PAL-B/B1/G/H/I/D/D1/K


diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c	Tue Jun 10 20:34:22 2008 +1000
@@ -227,8 +227,7 @@ static int empress_g_fmt_vid_cap(struct 
 static int empress_g_fmt_vid_cap(struct file *file, void *priv,
 				struct v4l2_format *f)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	saa7134_i2c_call_clients(dev, VIDIOC_G_FMT, f);
 
@@ -241,8 +240,7 @@ static int empress_s_fmt_vid_cap(struct 
 static int empress_s_fmt_vid_cap(struct file *file, void *priv,
 				struct v4l2_format *f)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	saa7134_i2c_call_clients(dev, VIDIOC_S_FMT, f);
 
@@ -256,8 +254,7 @@ static int empress_reqbufs(struct file *
 static int empress_reqbufs(struct file *file, void *priv,
 					struct v4l2_requestbuffers *p)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_reqbufs(&dev->empress_tsq, p);
 }
@@ -265,24 +262,21 @@ static int empress_querybuf(struct file 
 static int empress_querybuf(struct file *file, void *priv,
 					struct v4l2_buffer *b)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_querybuf(&dev->empress_tsq, b);
 }
 
 static int empress_qbuf(struct file *file, void *priv, struct v4l2_buffer *b)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_qbuf(&dev->empress_tsq, b);
 }
 
 static int empress_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_dqbuf(&dev->empress_tsq, b,
 				file->f_flags & O_NONBLOCK);
@@ -291,8 +285,7 @@ static int empress_streamon(struct file 
 static int empress_streamon(struct file *file, void *priv,
 					enum v4l2_buf_type type)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_streamon(&dev->empress_tsq);
 }
@@ -300,8 +293,7 @@ static int empress_streamoff(struct file
 static int empress_streamoff(struct file *file, void *priv,
 					enum v4l2_buf_type type)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_streamoff(&dev->empress_tsq);
 }
@@ -309,8 +301,7 @@ static int empress_s_ext_ctrls(struct fi
 static int empress_s_ext_ctrls(struct file *file, void *priv,
 			       struct v4l2_ext_controls *ctrls)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	/* count == 0 is abused in saa6752hs.c, so that special
 		case is handled here explicitly. */
@@ -329,8 +320,7 @@ static int empress_g_ext_ctrls(struct fi
 static int empress_g_ext_ctrls(struct file *file, void *priv,
 			       struct v4l2_ext_controls *ctrls)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG)
 		return -EINVAL;

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

P.S. data from /dev/video1 is not correct :(( .

With my best regards, Dmitry.

[-- Attachment #2: beholder_empress_03.diff --]
[-- Type: text/x-patch, Size: 3569 bytes --]

diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-empress.c
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c	Tue Jun 10 20:34:22 2008 +1000
@@ -227,8 +227,7 @@ static int empress_g_fmt_vid_cap(struct 
 static int empress_g_fmt_vid_cap(struct file *file, void *priv,
 				struct v4l2_format *f)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	saa7134_i2c_call_clients(dev, VIDIOC_G_FMT, f);
 
@@ -241,8 +240,7 @@ static int empress_s_fmt_vid_cap(struct 
 static int empress_s_fmt_vid_cap(struct file *file, void *priv,
 				struct v4l2_format *f)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	saa7134_i2c_call_clients(dev, VIDIOC_S_FMT, f);
 
@@ -256,8 +254,7 @@ static int empress_reqbufs(struct file *
 static int empress_reqbufs(struct file *file, void *priv,
 					struct v4l2_requestbuffers *p)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_reqbufs(&dev->empress_tsq, p);
 }
@@ -265,24 +262,21 @@ static int empress_querybuf(struct file 
 static int empress_querybuf(struct file *file, void *priv,
 					struct v4l2_buffer *b)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_querybuf(&dev->empress_tsq, b);
 }
 
 static int empress_qbuf(struct file *file, void *priv, struct v4l2_buffer *b)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_qbuf(&dev->empress_tsq, b);
 }
 
 static int empress_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_dqbuf(&dev->empress_tsq, b,
 				file->f_flags & O_NONBLOCK);
@@ -291,8 +285,7 @@ static int empress_streamon(struct file 
 static int empress_streamon(struct file *file, void *priv,
 					enum v4l2_buf_type type)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_streamon(&dev->empress_tsq);
 }
@@ -300,8 +293,7 @@ static int empress_streamoff(struct file
 static int empress_streamoff(struct file *file, void *priv,
 					enum v4l2_buf_type type)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	return videobuf_streamoff(&dev->empress_tsq);
 }
@@ -309,8 +301,7 @@ static int empress_s_ext_ctrls(struct fi
 static int empress_s_ext_ctrls(struct file *file, void *priv,
 			       struct v4l2_ext_controls *ctrls)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	/* count == 0 is abused in saa6752hs.c, so that special
 		case is handled here explicitly. */
@@ -329,8 +320,7 @@ static int empress_g_ext_ctrls(struct fi
 static int empress_g_ext_ctrls(struct file *file, void *priv,
 			       struct v4l2_ext_controls *ctrls)
 {
-	struct saa7134_fh *fh = priv;
-	struct saa7134_dev *dev = fh->dev;
+	struct saa7134_dev *dev = file->private_data;
 
 	if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG)
 		return -EINVAL;

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH] Beholder`s cards description
  2008-05-21  0:52                                 ` hermann pitton
                                                     ` (6 preceding siblings ...)
  2008-06-10 11:01                                   ` [PATCH] callbacks function " Dmitri Belimov
@ 2008-06-10 11:06                                   ` Dmitri Belimov
  2008-06-12  9:44                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
  8 siblings, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-06-10 11:06 UTC (permalink / raw
  Cc: video4linux-list, Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 5939 bytes --]

Hi All

Split the Beholder M6 family to different models. Because M6 hasn`t RDS, M63 has chip with AC3 codec, M6 Extra has other type of HF module.
Add correct data for support MPEG encoder.

diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jun 10 20:29:09 2008 +1000
@@ -3979,32 +3979,111 @@ struct saa7134_board saa7134_boards[] = 
 	[SAA7134_BOARD_BEHOLD_M6] = {
 		/* Igor Kuznetsov <igk@igk.ru> */
 		/* Andrey Melnikoff <temnota@kmv.ru> */
-		.name           = "Beholder BeholdTV M6 / BeholdTV M6 Extra",
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M6",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
 		.radio_type     = UNSET,
 		.tuner_addr     = ADDR_UNSET,
 		.radio_addr     = ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
-		.inputs         = {{
-			.name = name_tv,
-			.vmux = 3,
-			.amux = TV,
-			.tv   = 1,
-		},{
-			.name = name_comp1,
-			.vmux = 1,
-			.amux = LINE1,
-		},{
-			.name = name_svideo,
-			.vmux = 8,
-			.amux = LINE1,
-		}},
+		.inputs         = { {
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		}, {
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		} },
 		.radio = {
 			.name = name_radio,
 			.amux = LINE2,
 		},
 		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = (SET_T_CODE_POLARITY_NON_INVERTED |
+					SET_CLOCK_NOT_DELAYED |
+					SET_CLOCK_INVERTED |
+					SET_VSYNC_OFF),
+	},
+	[SAA7134_BOARD_BEHOLD_M63] = {
+		/* Igor Kuznetsov <igk@igk.ru> */
+		/* Andrey Melnikoff <temnota@kmv.ru> */
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M63",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tda9887_conf   = TDA9887_PRESENT,
+		.inputs         = { {
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		}, {
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		} },
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+		},
+		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = (SET_T_CODE_POLARITY_NON_INVERTED |
+					SET_CLOCK_NOT_DELAYED |
+					SET_CLOCK_INVERTED |
+					SET_VSYNC_OFF),
+	},
+	[SAA7134_BOARD_BEHOLD_M6_EXTRA] = {
+		/* Igor Kuznetsov <igk@igk.ru> */
+		/* Andrey Melnikoff <temnota@kmv.ru> */
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M6 Extra",
+		.audio_clock    = 0x00187de7,
+		/* FIXME: Must be PHILIPS_FM1216ME_MK5*/
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tda9887_conf   = TDA9887_PRESENT,
+		.inputs         = { {
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		}, {
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		} },
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+		},
+		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = (SET_T_CODE_POLARITY_NON_INVERTED |
+					SET_CLOCK_NOT_DELAYED |
+					SET_CLOCK_INVERTED |
+					SET_VSYNC_OFF),
 	},
 	[SAA7134_BOARD_TWINHAN_DTV_DVB_3056] = {
 		.name           = "Twinhan Hybrid DTV-DVB 3056 PCI",
@@ -5272,13 +5351,13 @@ struct pci_device_id saa7134_pci_tbl[] =
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
 		.subvendor    = 0x5ace,
 		.subdevice    = 0x6193,
-		.driver_data  = SAA7134_BOARD_BEHOLD_M6,
+		.driver_data  = SAA7134_BOARD_BEHOLD_M6_EXTRA,
 	}, {
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
 		.subvendor    = 0x5ace,
 		.subdevice    = 0x6191,
-		.driver_data  = SAA7134_BOARD_BEHOLD_M6,
+		.driver_data  = SAA7134_BOARD_BEHOLD_M63,
 	},{
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
@@ -5702,6 +5781,8 @@ int saa7134_board_init1(struct saa7134_d
 	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
 	case SAA7134_BOARD_BEHOLD_607_9FM:
 	case SAA7134_BOARD_BEHOLD_M6:
+	case SAA7134_BOARD_BEHOLD_M63:
+	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
 		dev->has_remote = SAA7134_REMOTE_I2C;
 		break;
 	case SAA7134_BOARD_AVERMEDIA_A169_B:
diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c	Mon Jun 09 15:16:05 2008 +1000
@@ -541,6 +541,8 @@ void saa7134_set_i2c_ir(struct saa7134_d
 		break;
 	case SAA7134_BOARD_BEHOLD_607_9FM:
 	case SAA7134_BOARD_BEHOLD_M6:
+	case SAA7134_BOARD_BEHOLD_M63:
+	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
 	case SAA7134_BOARD_BEHOLD_H6:
 		snprintf(ir->c.name, sizeof(ir->c.name), "BeholdTV");
 		ir->get_key   = get_key_beholdm6xx;
diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134.h	Tue Jun 10 20:07:13 2008 +1000
@@ -271,7 +271,8 @@ struct saa7134_format {
 #define SAA7134_BOARD_AVERMEDIA_A700_PRO    140
 #define SAA7134_BOARD_AVERMEDIA_A700_HYBRID 141
 #define SAA7134_BOARD_BEHOLD_H6      142
-
+#define SAA7134_BOARD_BEHOLD_M63      143
+#define SAA7134_BOARD_BEHOLD_M6_EXTRA    144
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

With my best regards, Dmitry.

[-- Attachment #2: beholder_cards_01.diff --]
[-- Type: text/x-patch, Size: 5716 bytes --]

diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Tue Jun 10 20:29:09 2008 +1000
@@ -3979,32 +3979,111 @@ struct saa7134_board saa7134_boards[] = 
 	[SAA7134_BOARD_BEHOLD_M6] = {
 		/* Igor Kuznetsov <igk@igk.ru> */
 		/* Andrey Melnikoff <temnota@kmv.ru> */
-		.name           = "Beholder BeholdTV M6 / BeholdTV M6 Extra",
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M6",
 		.audio_clock    = 0x00187de7,
 		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
 		.radio_type     = UNSET,
 		.tuner_addr     = ADDR_UNSET,
 		.radio_addr     = ADDR_UNSET,
 		.tda9887_conf   = TDA9887_PRESENT,
-		.inputs         = {{
-			.name = name_tv,
-			.vmux = 3,
-			.amux = TV,
-			.tv   = 1,
-		},{
-			.name = name_comp1,
-			.vmux = 1,
-			.amux = LINE1,
-		},{
-			.name = name_svideo,
-			.vmux = 8,
-			.amux = LINE1,
-		}},
+		.inputs         = { {
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		}, {
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		} },
 		.radio = {
 			.name = name_radio,
 			.amux = LINE2,
 		},
 		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = (SET_T_CODE_POLARITY_NON_INVERTED |
+					SET_CLOCK_NOT_DELAYED |
+					SET_CLOCK_INVERTED |
+					SET_VSYNC_OFF),
+	},
+	[SAA7134_BOARD_BEHOLD_M63] = {
+		/* Igor Kuznetsov <igk@igk.ru> */
+		/* Andrey Melnikoff <temnota@kmv.ru> */
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M63",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tda9887_conf   = TDA9887_PRESENT,
+		.inputs         = { {
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		}, {
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		} },
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+		},
+		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = (SET_T_CODE_POLARITY_NON_INVERTED |
+					SET_CLOCK_NOT_DELAYED |
+					SET_CLOCK_INVERTED |
+					SET_VSYNC_OFF),
+	},
+	[SAA7134_BOARD_BEHOLD_M6_EXTRA] = {
+		/* Igor Kuznetsov <igk@igk.ru> */
+		/* Andrey Melnikoff <temnota@kmv.ru> */
+		/* Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> */
+		.name           = "Beholder BeholdTV M6 Extra",
+		.audio_clock    = 0x00187de7,
+		/* FIXME: Must be PHILIPS_FM1216ME_MK5*/
+		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tda9887_conf   = TDA9887_PRESENT,
+		.inputs         = { {
+			.name = name_tv,
+			.vmux = 3,
+			.amux = TV,
+			.tv   = 1,
+		}, {
+			.name = name_comp1,
+			.vmux = 1,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 8,
+			.amux = LINE1,
+		} },
+		.radio = {
+			.name = name_radio,
+			.amux = LINE2,
+		},
+		.mpeg  = SAA7134_MPEG_EMPRESS,
+		.video_out = CCIR656,
+		.vid_port_opts  = (SET_T_CODE_POLARITY_NON_INVERTED |
+					SET_CLOCK_NOT_DELAYED |
+					SET_CLOCK_INVERTED |
+					SET_VSYNC_OFF),
 	},
 	[SAA7134_BOARD_TWINHAN_DTV_DVB_3056] = {
 		.name           = "Twinhan Hybrid DTV-DVB 3056 PCI",
@@ -5272,13 +5351,13 @@ struct pci_device_id saa7134_pci_tbl[] =
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
 		.subvendor    = 0x5ace,
 		.subdevice    = 0x6193,
-		.driver_data  = SAA7134_BOARD_BEHOLD_M6,
+		.driver_data  = SAA7134_BOARD_BEHOLD_M6_EXTRA,
 	}, {
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
 		.subvendor    = 0x5ace,
 		.subdevice    = 0x6191,
-		.driver_data  = SAA7134_BOARD_BEHOLD_M6,
+		.driver_data  = SAA7134_BOARD_BEHOLD_M63,
 	},{
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
@@ -5702,6 +5781,8 @@ int saa7134_board_init1(struct saa7134_d
 	case SAA7134_BOARD_HAUPPAUGE_HVR1110:
 	case SAA7134_BOARD_BEHOLD_607_9FM:
 	case SAA7134_BOARD_BEHOLD_M6:
+	case SAA7134_BOARD_BEHOLD_M63:
+	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
 		dev->has_remote = SAA7134_REMOTE_I2C;
 		break;
 	case SAA7134_BOARD_AVERMEDIA_A169_B:
diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c	Mon Jun 09 15:16:05 2008 +1000
@@ -541,6 +541,8 @@ void saa7134_set_i2c_ir(struct saa7134_d
 		break;
 	case SAA7134_BOARD_BEHOLD_607_9FM:
 	case SAA7134_BOARD_BEHOLD_M6:
+	case SAA7134_BOARD_BEHOLD_M63:
+	case SAA7134_BOARD_BEHOLD_M6_EXTRA:
 	case SAA7134_BOARD_BEHOLD_H6:
 		snprintf(ir->c.name, sizeof(ir->c.name), "BeholdTV");
 		ir->get_key   = get_key_beholdm6xx;
diff -r ca65777314d2 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h	Mon Jun 09 11:59:05 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134.h	Tue Jun 10 20:07:13 2008 +1000
@@ -271,7 +271,8 @@ struct saa7134_format {
 #define SAA7134_BOARD_AVERMEDIA_A700_PRO    140
 #define SAA7134_BOARD_AVERMEDIA_A700_HYBRID 141
 #define SAA7134_BOARD_BEHOLD_H6      142
-
+#define SAA7134_BOARD_BEHOLD_M63      143
+#define SAA7134_BOARD_BEHOLD_M6_EXTRA    144
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-05-21  0:52                                 ` hermann pitton
                                                     ` (7 preceding siblings ...)
  2008-06-10 11:06                                   ` [PATCH] Beholder`s cards description Dmitri Belimov
@ 2008-06-12  9:44                                   ` Dmitri Belimov
  2008-06-13  6:23                                     ` gert.vervoort
  8 siblings, 1 reply; 28+ messages in thread
From: Dmitri Belimov @ 2008-06-12  9:44 UTC (permalink / raw
  To: hermann pitton; +Cc: video4linux-list, Mauro Carvalho Chehab

Hi All

I found strange effect. When I start common TV watching with mplayer. I can see TV video.
When I start cat /dev/video1 (i try get MPEG stream of TV) on the TV screen I see sometimes
big white square. After stopped cat from /dev/video1 this squares no more.

What is it??

I want make 3 simple tests.
1. Fill buffer before DMA reading data from encoder. For test receiving data from encoder.
2. After receive buffer from encoder I want fill some data into. Buffer N for example. For check out data from video1 device.
3. Printk part of buffer after encoder 512 bytes. For check data. May be encoder not work now.

Can you help me make this tests. I have not a lot experience with C and kernel programming.

With my best regards.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-06-12  9:44                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
@ 2008-06-13  6:23                                     ` gert.vervoort
  2008-06-13  8:05                                       ` Dmitri Belimov
  0 siblings, 1 reply; 28+ messages in thread
From: gert.vervoort @ 2008-06-13  6:23 UTC (permalink / raw
  To: Dmitri Belimov; +Cc: video4linux-list, Mauro Carvalho Chehab

Op Do, 12 juni, 2008 11:44 am schreef Dmitri Belimov:
> Hi All
>

Hi Dmitri,

>
> I found strange effect. When I start common TV watching with mplayer. I
> can see TV video. When I start cat /dev/video1 (i try get MPEG stream of
> TV) on the TV screen I see sometimes
> big white square. After stopped cat from /dev/video1 this squares no more.
>
>
> What is it??
>

What video format is being used for the TV video?
I remember that the SAA7134 can not use a planar video format and TS
capture at the same time.
When I added the original TS capture code, I did not deal with this
situation, but I'm not sure if that is still the case.

    Gert


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-06-13  6:23                                     ` gert.vervoort
@ 2008-06-13  8:05                                       ` Dmitri Belimov
  2008-06-13 20:27                                         ` hermann pitton
  0 siblings, 1 reply; 28+ messages in thread
From: Dmitri Belimov @ 2008-06-13  8:05 UTC (permalink / raw
  To: gert.vervoort; +Cc: video4linux-list, Mauro Carvalho Chehab

Ho Gert,

> > I found strange effect. When I start common TV watching with
> > mplayer. I can see TV video. When I start cat /dev/video1 (i try
> > get MPEG stream of TV) on the TV screen I see sometimes
> > big white square. After stopped cat from /dev/video1 this squares
> > no more.
> >
> >
> > What is it??
> >
> 
> What video format is being used for the TV video?

modprobe saa7134 alsa=1 secam=d tsbufs=15 ts_nr_packets=312

mplayer tv:// -tv
driver=v4l2:fps=25:outfmt=i420:width=720:height=576:alsa:adevice=hw.1,0:amode=1:audiorate=32000:forceaudio:immediatemode=0:freq=175.0:normid=6
-aspect 4:3 -vf kerndeint

> I remember that the SAA7134 can not use a planar video format and TS
> capture at the same time.

No. Our programmer of drivers for Windows said it is possible. All of this parts is independent.

> When I added the original TS capture code, I did not deal with this
> situation, but I'm not sure if that is still the case.

I think it is problem with buffer working.

Other problem is incorrect work with PAT table.
Don`t need touch address of PAT in saa7134 when TS started because this chip sometimes make prefetch. When
module change PAT table like now saa7134 can crash if try prefetch (sorry my English). More correct 
change entry in PAT table.

With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-06-13  8:05                                       ` Dmitri Belimov
@ 2008-06-13 20:27                                         ` hermann pitton
       [not found]                                           ` <20080618091650.0bd7e2ae@glory.loctelecom.ru>
  0 siblings, 1 reply; 28+ messages in thread
From: hermann pitton @ 2008-06-13 20:27 UTC (permalink / raw
  To: Dmitri Belimov; +Cc: video4linux-list, gert.vervoort, Mauro Carvalho Chehab

Hello,

Am Freitag, den 13.06.2008, 18:05 +1000 schrieb Dmitri Belimov:
> Ho Gert,
> 
> > > I found strange effect. When I start common TV watching with
> > > mplayer. I can see TV video. When I start cat /dev/video1 (i try
> > > get MPEG stream of TV) on the TV screen I see sometimes
> > > big white square. After stopped cat from /dev/video1 this squares
> > > no more.
> > >
> > >
> > > What is it??
> > >
> > 
> > What video format is being used for the TV video?
> 
> modprobe saa7134 alsa=1 secam=d tsbufs=15 ts_nr_packets=312
> 
> mplayer tv:// -tv
> driver=v4l2:fps=25:outfmt=i420:width=720:height=576:alsa:adevice=hw.1,0:amode=1:audiorate=32000:forceaudio:immediatemode=0:freq=175.0:normid=6
> -aspect 4:3 -vf kerndeint
> 
> > I remember that the SAA7134 can not use a planar video format and TS
> > capture at the same time.
> 
> No. Our programmer of drivers for Windows said it is possible. All of this parts is independent.
> 
> > When I added the original TS capture code, I did not deal with this
> > situation, but I'm not sure if that is still the case.
> 
> I think it is problem with buffer working.
> 
> Other problem is incorrect work with PAT table.
> Don`t need touch address of PAT in saa7134 when TS started because this chip sometimes make prefetch. When
> module change PAT table like now saa7134 can crash if try prefetch (sorry my English). More correct 
> change entry in PAT table.
> 
> With my best regards, Dmitry.

Dmitry, I still can't test anything on my card, since I don't know how
to switch the default DVB-T on the TS interface to the encoder.

But Gert is right. At least for DVB-T or DVB-S and analog TV at once,
analog TV can't use planar formats during that due to a restriction of
the dma engines. Mplayer comes up with planar as default !

We are most gratefully for your fixes after the ioctl2 conversion, but
remember, Frederic is the only one on the lists currently with a working
empress encoder with a older snapshot I guessed should work for him.

You might contact him to find a known good starting point if you get
stuck with the current. He also worked on the empress stuff previously
and might help to find a solution with latest as well.

Cheers,
Hermann


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
       [not found]                                           ` <20080618091650.0bd7e2ae@glory.loctelecom.ru>
@ 2008-06-19  2:23                                             ` hermann pitton
       [not found]                                               ` <20080619153139.3ee379b4@glory.loctelecom.ru>
       [not found]                                               ` <20080725223700.03d532cf@glory.loctelecom.ru>
  0 siblings, 2 replies; 28+ messages in thread
From: hermann pitton @ 2008-06-19  2:23 UTC (permalink / raw
  To: Dmitri Belimov; +Cc: video4linux-list, gert.vervoort, Mauro Carvalho Chehab

Hi Dmitri,

Am Mittwoch, den 18.06.2008, 09:16 +1000 schrieb Dmitri Belimov:
> Hi All
> 
> I found next problems with empress :)))
> 
> I can`t get via v4l2-ctl list of external control for control MPEG settings via this tool.
> --list-ctrls and --list-ctrls-menus
> In debug log I can see only one call empress_querycap nothink vidioc_g_ext_ctrls/empress_g_ext_ctrls calls.
> Didn`t work v4l2-ctl --log-status

just a late/early note on this, I'm still without a working empress
device.

After you have fixed several bugs on the empress ioctl2 conversion, you
are still the first user after years and now hit mpeg extended controls,
Hans from the ivtv project kindly introduced, but he is also without any
such device and the stuff is completely untested.

As far I know, there are no handlers yet to modify the parameters.

Hopefully Beholder sees, in what kind of field you are operating,
but for sure there is no doubt about, what was already thrown in.

Thanks,
Hermann

> ./v4l2-ctl --list-ctrls-menus -d /dev/video1
> 
>                      brightness (int)  : min=0 max=255 step=1 default=128 value=0
>                        contrast (int)  : min=0 max=127 step=1 default=68 value=0
>                      saturation (int)  : min=0 max=127 step=1 default=64 value=0
>                             hue (int)  : min=-128 max=127 step=1 default=0 value=0
>                          volume (int)  : min=-15 max=15 step=1 default=0 value=0
>                            mute (bool) : default=0 value=0
>                          mirror (bool) : default=0 value=0
>                          invert (bool) : default=0 value=0
>              y_offset_odd_field (int)  : min=0 max=128 step=0 default=0 value=0
>             y_offset_even_field (int)  : min=0 max=128 step=0 default=0 value=0
>                        automute (bool) : default=1 value=0
> 
> It`s debug data in log 
> 
> DEBUG: ts_open() start
> DEBUG: ts_open() stop
> DEBUG: empress_querycap() start
> DEBUG: empress_querycap() stop
> DEBUG: ts_release() start
> DEBUG: ts_reset_encoder() start
> DEBUG: ts_release() stop
> 
> With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
       [not found]                                               ` <20080619153139.3ee379b4@glory.loctelecom.ru>
@ 2008-06-19  6:24                                                 ` Hans Verkuil
  2008-06-19  6:44                                                   ` Hans Verkuil
  2008-06-19  6:48                                                   ` Dmitri Belimov
  0 siblings, 2 replies; 28+ messages in thread
From: Hans Verkuil @ 2008-06-19  6:24 UTC (permalink / raw
  To: video4linux-list; +Cc: gert.vervoort, Mauro Carvalho Chehab

On Thursday 19 June 2008 07:31:39 Dmitri Belimov wrote:
> Hi Hermann
>
> > > I found next problems with empress :)))
> > >
> > > I can`t get via v4l2-ctl list of external control for control
> > > MPEG settings via this tool. --list-ctrls and --list-ctrls-menus
> > > In debug log I can see only one call empress_querycap nothink
> > > vidioc_g_ext_ctrls/empress_g_ext_ctrls calls. Didn`t work
> > > v4l2-ctl --log-status
> >
> > just a late/early note on this, I'm still without a working empress
> > device.
> >
> > After you have fixed several bugs on the empress ioctl2 conversion,
> > you are still the first user after years and now hit mpeg extended
> > controls, Hans from the ivtv project kindly introduced, but he is
> > also without any such device and the stuff is completely untested.
> >
> > As far I know, there are no handlers yet to modify the parameters.
>
> Does this command work for ivtv cards?? Can somebody show me a sample
> command line and output from ivtv (or from another card with its own
> MPEG encoder)? I need to get control settings of MPEG.
> I don't see how I can test this thing in Beholder.

Hmm, the empress is broken: the required queryctrl ioctls are completely 
missing.

The only way to change MPEG settings is to hardcode it in a program, 
calling VIDIOC_S_EXT_CTRLS directly with the controls that 
handle_ctrl() in saa6752.c understands.

Regards,

	Hans

>
> With my best regards, Dmitry.
>
> --
> video4linux-list mailing list
> Unsubscribe
> mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-06-19  6:24                                                 ` Hans Verkuil
@ 2008-06-19  6:44                                                   ` Hans Verkuil
  2008-06-19  6:48                                                   ` Dmitri Belimov
  1 sibling, 0 replies; 28+ messages in thread
From: Hans Verkuil @ 2008-06-19  6:44 UTC (permalink / raw
  To: video4linux-list; +Cc: gert.vervoort, Mauro Carvalho Chehab

Does anyone know where I can buy one of these cards?

Regards,

	Hans

On Thursday 19 June 2008 08:24:15 Hans Verkuil wrote:
> On Thursday 19 June 2008 07:31:39 Dmitri Belimov wrote:
> > Hi Hermann
> >
> > > > I found next problems with empress :)))
> > > >
> > > > I can`t get via v4l2-ctl list of external control for control
> > > > MPEG settings via this tool. --list-ctrls and
> > > > --list-ctrls-menus In debug log I can see only one call
> > > > empress_querycap nothink vidioc_g_ext_ctrls/empress_g_ext_ctrls
> > > > calls. Didn`t work v4l2-ctl --log-status
> > >
> > > just a late/early note on this, I'm still without a working
> > > empress device.
> > >
> > > After you have fixed several bugs on the empress ioctl2
> > > conversion, you are still the first user after years and now hit
> > > mpeg extended controls, Hans from the ivtv project kindly
> > > introduced, but he is also without any such device and the stuff
> > > is completely untested.
> > >
> > > As far I know, there are no handlers yet to modify the
> > > parameters.
> >
> > Does this command work for ivtv cards?? Can somebody show me a
> > sample command line and output from ivtv (or from another card with
> > its own MPEG encoder)? I need to get control settings of MPEG.
> > I don't see how I can test this thing in Beholder.
>
> Hmm, the empress is broken: the required queryctrl ioctls are
> completely missing.
>
> The only way to change MPEG settings is to hardcode it in a program,
> calling VIDIOC_S_EXT_CTRLS directly with the controls that
> handle_ctrl() in saa6752.c understands.
>
> Regards,
>
> 	Hans
>
> > With my best regards, Dmitry.
> >
> > --
> > video4linux-list mailing list
> > Unsubscribe
> > mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/video4linux-list
>
> --
> video4linux-list mailing list
> Unsubscribe
> mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
  2008-06-19  6:24                                                 ` Hans Verkuil
  2008-06-19  6:44                                                   ` Hans Verkuil
@ 2008-06-19  6:48                                                   ` Dmitri Belimov
  1 sibling, 0 replies; 28+ messages in thread
From: Dmitri Belimov @ 2008-06-19  6:48 UTC (permalink / raw
  To: Hans Verkuil; +Cc: video4linux-list, gert.vervoort, Mauro Carvalho Chehab

Hi Hans

> > > > I found next problems with empress :)))
> > > >
> > > > I can`t get via v4l2-ctl list of external control for control
> > > > MPEG settings via this tool. --list-ctrls and --list-ctrls-menus
> > > > In debug log I can see only one call empress_querycap nothink
> > > > vidioc_g_ext_ctrls/empress_g_ext_ctrls calls. Didn`t work
> > > > v4l2-ctl --log-status
> > >
> > > just a late/early note on this, I'm still without a working
> > > empress device.
> > >
> > > After you have fixed several bugs on the empress ioctl2
> > > conversion, you are still the first user after years and now hit
> > > mpeg extended controls, Hans from the ivtv project kindly
> > > introduced, but he is also without any such device and the stuff
> > > is completely untested.
> > >
> > > As far I know, there are no handlers yet to modify the parameters.
> >
> > Does this command work for ivtv cards?? Can somebody show me a
> > sample command line and output from ivtv (or from another card with
> > its own MPEG encoder)? I need to get control settings of MPEG.
> > I don't see how I can test this thing in Beholder.
> 
> Hmm, the empress is broken: the required queryctrl ioctls are
> completely missing.

Frederic was help me to writing simple programm for configuring MPEG.

This programm start_mpeg here:

#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include "linux/videodev.h"

int main(void){

/* sets mpeg parameters */
   struct v4l2_ext_controls mc;
   struct v4l2_ext_control ctrls[32];
   mc.ctrl_class = V4L2_CTRL_CLASS_MPEG;
   mc.controls = ctrls;
   int fd=0;
   char *device="/dev/video1";
   
   int i;

   int false;
 
   int m_iVideoBR;
   int m_iVideoMaxBR;
   int m_iVideoVBR;
   int m_iAudioBR;
   int m_uiAspectRatio;

   if ((fd = open(device, O_RDONLY)) < 0) {
     printf("Couldn't open video1\n");
		return(-1);
   }

   /* Test defines start */
   false  = 0;
   m_iVideoBR = 7500;
   m_iVideoMaxBR = 9200;
   m_iVideoVBR = 0;
   m_iAudioBR = 256;
   m_uiAspectRatio = 0;
   /* Test defines stop */
   i = 0;
   mc.ctrl_class = V4L2_CTRL_CLASS_MPEG;
   ctrls[i].id = V4L2_CID_MPEG_VIDEO_BITRATE_MODE;
   ctrls[i++].value = (m_iVideoVBR ? V4L2_MPEG_VIDEO_BITRATE_MODE_VBR : 
V4L2_MPEG_VIDEO_BITRATE_MODE_CBR);
   ctrls[i].id = V4L2_CID_MPEG_AUDIO_MUTE;
   ctrls[i++].value = false;
   ctrls[i].id = V4L2_CID_MPEG_VIDEO_MUTE;
   ctrls[i++].value = false;
//  ctrls[i].id = V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ;
//  ctrls[i++].value = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000;
   ctrls[i].id = V4L2_CID_MPEG_AUDIO_ENCODING;
   ctrls[i++].value = V4L2_MPEG_AUDIO_ENCODING_LAYER_2;
   ctrls[i].id = V4L2_CID_MPEG_AUDIO_L2_BITRATE;
   ctrls[i++].value = (m_iAudioBR==256) ? 
V4L2_MPEG_AUDIO_L2_BITRATE_256K : V4L2_MPEG_AUDIO_L2_BITRATE_384K;
   ctrls[i].id = V4L2_CID_MPEG_VIDEO_BITRATE;
   ctrls[i++].value = m_iVideoBR * 1000;
   ctrls[i].id = V4L2_CID_MPEG_VIDEO_BITRATE_PEAK;
   ctrls[i++].value = m_iVideoMaxBR * 1000;
   ctrls[i].id = V4L2_CID_MPEG_VIDEO_ASPECT;
   switch (m_uiAspectRatio)
   {
     case 0: ctrls[i++].value = V4L2_MPEG_VIDEO_ASPECT_1x1; break;
     case 2: ctrls[i++].value = V4L2_MPEG_VIDEO_ASPECT_16x9; break;
     case 3: ctrls[i++].value = V4L2_MPEG_VIDEO_ASPECT_221x100; break;
     default: ctrls[i++].value = V4L2_MPEG_VIDEO_ASPECT_4x3; break;
   }
   mc.count = i;
   if (ioctl(fd, VIDIOC_S_EXT_CTRLS, &mc) < 0) {
     printf("Mpeg parameters cannot be set !\n");
   }
  close (fd);

  return (0);
}

Start MPEG script here:

./v4l2-ctl --set-freq=175.0 -d /dev/video0 
./v4l2-ctl --set-input=0 -d /dev/video0
./v4l2-ctl -s=secam-d -d /dev/video0
./start_mpeg

In debug log I see:

DEBUG: ts_open() start
DEBUG: ts_open() stop
DEBUG: empress_s_ext_ctrls() start
DEBUG: ts_init_encoder() start
DEBUG: ts_reset_encoder() start
DEBUG: ts_init_encoder() stop
DEBUG: empress_s_ext_ctrls() stop
DEBUG: ts_release() start
DEBUG: ts_reset_encoder() start
DEBUG: ts_reset_encoder() stop
DEBUG: ts_release() stop

But when I try:
cat /dev/video1 I get Input/Output error

In debug log :

DEBUG: ts_open() start
DEBUG: ts_open() stop
DEBUG: ts_init_encoder() start
DEBUG: ts_reset_encoder() start
DEBUG: ts_init_encoder() stop
DEBUG: buffer_setup() start
DEBUG: buffer_setup() stop
DEBUG: buffer_prepare() start 
DEBUG: line = 64
DEBUG: size = 12032
DEBUG: buffer_prepare() stop 
DEBUG: buffer_prepare() start 
DEBUG: line = 64
DEBUG: size = 12032
DEBUG: buffer_prepare() stop 
DEBUG: buffer_prepare() start 
DEBUG: line = 64
DEBUG: size = 12032
DEBUG: buffer_prepare() stop 
DEBUG: buffer_prepare() start 
DEBUG: line = 64
DEBUG: size = 12032
DEBUG: buffer_prepare() stop 
DEBUG: buffer_prepare() start 
DEBUG: line = 64
DEBUG: size = 12032
DEBUG: buffer_prepare() stop 
DEBUG: buffer_prepare() start 
DEBUG: line = 64
DEBUG: size = 12032
DEBUG: buffer_prepare() stop 
DEBUG: buffer_prepare() start 
DEBUG: line = 64
DEBUG: size = 12032
DEBUG: buffer_prepare() stop 
DEBUG: buffer_prepare() start 
DEBUG: line = 64
DEBUG: size = 12032
DEBUG: buffer_prepare() stop 
DEBUG: buffer_queue() start
DEBUG: buffer_queue() stop
DEBUG: buffer_queue() start
DEBUG: buffer_activate() start 
DEBUG: buffer_activate() stop 
DEBUG: buffer_queue() stop
DEBUG: buffer_queue() start
DEBUG: buffer_queue() stop
DEBUG: buffer_queue() start
DEBUG: buffer_queue() stop
DEBUG: buffer_queue() start
DEBUG: buffer_queue() stop
DEBUG: buffer_queue() start
DEBUG: buffer_queue() stop
DEBUG: buffer_queue() start
DEBUG: buffer_queue() stop
DEBUG: buffer_queue() start
DEBUG: buffer_queue() stop
DEBUG: buffer_activate() start 
DEBUG: buffer_activate() stop 
DEBUG: buffer_activate() start 
DEBUG: buffer_activate() stop 
DEBUG: buffer_queue() start
DEBUG: buffer_queue() stop
DEBUG: ts_release() start
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: buffer_release() start
DEBUG: buffer_release() stop
DEBUG: ts_reset_encoder() start
DEBUG: ts_reset_encoder() stop
DEBUG: ts_release() stop

I don't understand why stream was stopped.

> The only way to change MPEG settings is to hardcode it in a program, 
> calling VIDIOC_S_EXT_CTRLS directly with the controls that 
> handle_ctrl() in saa6752.c understands.

Yes, but more better fix v4l2-ctl and empress module.

With my best regards, Dmitry.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Beholder card M6 with MPEG2 coder
       [not found]                                               ` <20080725223700.03d532cf@glory.loctelecom.ru>
@ 2008-07-25 17:25                                                 ` hermann pitton
  0 siblings, 0 replies; 28+ messages in thread
From: hermann pitton @ 2008-07-25 17:25 UTC (permalink / raw
  To: Dmitri Belimov; +Cc: video4linux-list, gert.vervoort, Mauro Carvalho Chehab

Hi,

Am Freitag, den 25.07.2008, 22:37 +1000 schrieb Dmitri Belimov:
> Hi All
> 
> I discover next problem with saa7134 module.
> When the saa7134 send planar data in YUV format it capture 3 DMA slice. The DMA slice 5 captured too.
> The MPEG stream use the DMA slice 5 for send data to host. At the same time we can`t use planar data in YUV and MPEG stream.
> 
> When I start cat /dev/video0 > raw.dat and cat /dev/video1 > mpeg.dat
> In the mpeg.dat I have raw V channel of YUV.
> 
> I think more correct when read /dev/video0 lock /dev/video1
> When read /dev/video1 lock /dev/video0
> 
> With my best regards, Dmitry.
> 

yes, that is a very well known restriction.

If mpeg is in use, either for DVB or an encoder, only packed formats can
pass at once too.

Hartmut was once thinking about to disallow planar formats,
but best solution would be only to disallow them, when the mpeg/TS
interface is in use.

Not implemented yet, so the user must take care.

I will be mostly out of houses next time, summer else is soon gone
again. Responses might be delayed.

Cheers,
Hermann


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2008-07-25 17:32 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-14  1:47 autodetect TEA5767 Dmitri Belimov
2008-04-14 20:28 ` Mauro Carvalho Chehab
     [not found]   ` <20080415125059.3e065997@glory.loctelecom.ru>
     [not found]     ` <20080415000611.610af5c6@gaivota>
     [not found]       ` <20080415135455.76d18419@glory.loctelecom.ru>
     [not found]         ` <20080415122524.3455e060@gaivota>
     [not found]           ` <20080422175422.3d7e4448@glory.loctelecom.ru>
     [not found]             ` <20080422130644.7bfe3b2d@gaivota>
     [not found]               ` <20080423124157.1a8eda0a@glory.loctelecom.ru>
     [not found]                 ` <Pine.LNX.4.64.0804222254350.20809@bombadil.infradead.org>
     [not found]                   ` <20080423160505.36064bf7@glory.loctelecom.ru>
     [not found]                     ` <20080423113739.7f314663@gaivota>
     [not found]                       ` <20080424093259.7880795b@glory.loctelecom.ru>
     [not found]                         ` <Pine.LNX.4.64.0804232237450.31358@bombadil.infradead.org>
2008-05-05  1:22                           ` Beholder TV/FM cards Dmitri Belimov
2008-05-05  3:20                           ` Dmitri Belimov
2008-05-12 10:11                           ` Beholder card M6 with MPEG2 coder Dmitri Belimov
2008-05-13 22:52                             ` hermann pitton
2008-05-20  5:24                               ` Dmitri Belimov
2008-05-21  0:52                                 ` hermann pitton
2008-05-21  1:20                                   ` [PATCH] saa7134_empress Dmitri Belimov
2008-05-21  1:31                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
2008-05-21  3:16                                   ` [PATCH] I2S on for MPEG of saa7134_empress Dmitri Belimov
2008-05-21 16:17                                     ` Gert Vervoort
2008-05-21 23:24                                       ` Dmitri Belimov
2008-05-22 21:11                                         ` hermann pitton
2008-05-23  3:18                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
2008-05-28  4:47                                   ` Dmitri Belimov
2008-06-10 10:56                                   ` [PATCH] New for I2S on for MPEG of saa7134_empress Dmitri Belimov
2008-06-10 11:01                                   ` [PATCH] callbacks function " Dmitri Belimov
2008-06-10 11:06                                   ` [PATCH] Beholder`s cards description Dmitri Belimov
2008-06-12  9:44                                   ` Beholder card M6 with MPEG2 coder Dmitri Belimov
2008-06-13  6:23                                     ` gert.vervoort
2008-06-13  8:05                                       ` Dmitri Belimov
2008-06-13 20:27                                         ` hermann pitton
     [not found]                                           ` <20080618091650.0bd7e2ae@glory.loctelecom.ru>
2008-06-19  2:23                                             ` hermann pitton
     [not found]                                               ` <20080619153139.3ee379b4@glory.loctelecom.ru>
2008-06-19  6:24                                                 ` Hans Verkuil
2008-06-19  6:44                                                   ` Hans Verkuil
2008-06-19  6:48                                                   ` Dmitri Belimov
     [not found]                                               ` <20080725223700.03d532cf@glory.loctelecom.ru>
2008-07-25 17:25                                                 ` hermann pitton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.