diff mbox series

[v2] media: em28xx: Support TerraTec G3

Message ID 20200524120745.5867-1-pmenzel@molgen.mpg.de (mailing list archive)
State New, archived
Headers show
Series [v2] media: em28xx: Support TerraTec G3 | expand

Commit Message

Paul Menzel May 24, 2020, 12:07 p.m. UTC
Add the USB vendor and product ID of the TerraTec G3 [1], so Linux
detects the device.

    [   38.093023] usb 1-3: new high-speed USB device number 4 using xhci_hcd
    [   38.240404] usb 1-3: config 1 interface 0 altsetting 1 endpoint 0x82 has invalid wMaxPacketSize 0
    [   38.240408] usb 1-3: config 1 interface 0 altsetting 1 endpoint 0x84 has invalid wMaxPacketSize 0
    [   38.240411] usb 1-3: config 1 interface 0 altsetting 2 endpoint 0x84 has invalid wMaxPacketSize 0
    [   38.240413] usb 1-3: config 1 interface 0 altsetting 3 endpoint 0x84 has invalid wMaxPacketSize 0
    [   38.240416] usb 1-3: config 1 interface 0 altsetting 4 endpoint 0x84 has invalid wMaxPacketSize 0
    [   38.240418] usb 1-3: config 1 interface 0 altsetting 5 endpoint 0x84 has invalid wMaxPacketSize 0
    [   38.240420] usb 1-3: config 1 interface 0 altsetting 6 endpoint 0x84 has invalid wMaxPacketSize 0
    [   38.240423] usb 1-3: config 1 interface 0 altsetting 7 endpoint 0x84 has invalid wMaxPacketSize 0
    [   38.255077] usb 1-3: New USB device found, idVendor=0ccd, idProduct=10a7, bcdDevice= 1.00
    [   38.255080] usb 1-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
    [   38.255082] usb 1-3: Product: TerraTec G3
    [   38.255085] usb 1-3: Manufacturer: TerraTec Electronic GmbH
    [   38.286444] videodev: Linux video capture interface: v2.00
    [   38.290861] em28xx 1-3:1.0: New device TerraTec Electronic GmbH TerraTec G3 @ 480 Mbps (0ccd:10a7, interface 0, class 0)
    [   38.290863] em28xx 1-3:1.0: Video interface 0 found: isoc
    [   38.349064] em28xx 1-3:1.0: chip ID is em2860
    [   38.515453] em28xx 1-3:1.0: EEPROM ID = 1a eb 67 95, EEPROM hash = 0xd7a2f285
    [   38.515456] em28xx 1-3:1.0: EEPROM info:
    [   38.515458] em28xx 1-3:1.0: 	AC97 audio (5 sample rates)
    [   38.515460] em28xx 1-3:1.0: 	500mA max power
    [   38.515462] em28xx 1-3:1.0: 	Table at offset 0x06, strings=0x1a9e, 0x346a, 0x0000
    [   38.586387] em28xx 1-3:1.0: Identified as Terratec Grabby (card=67)
    [   38.586392] em28xx 1-3:1.0: analog set to isoc mode.
    [   38.586503] em28xx 1-3:1.1: audio device (0ccd:10a7): interface 1, class 1
    [   38.586516] em28xx 1-3:1.2: audio device (0ccd:10a7): interface 2, class 1
    [   38.586543] usbcore: registered new interface driver em28xx
    [   38.599733] em28xx 1-3:1.0: Registering V4L2 extension
    [   38.629311] em28xx 1-3:1.0: Config register raw data: 0x50
    [   38.659140] em28xx 1-3:1.0: AC97 vendor ID = 0x83847650
    [   38.674111] em28xx 1-3:1.0: AC97 features = 0x6a90
    [   38.674114] em28xx 1-3:1.0: Empia 202 AC97 audio processor detected
    [   40.699171] em28xx 1-3:1.0: V4L2 video device registered as video0
    [   40.699174] em28xx 1-3:1.0: V4L2 VBI device registered as vbi0
    [   40.699176] em28xx 1-3:1.0: V4L2 extension successfully initialized
    [   40.699178] em28xx: Registered (Em28xx v4l2 Extension) extension

[1]: https://www.terratec.de/details.php?artnr=TERRATEC+G3

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[rebase https://patchwork.kernel.org/patch/902312/ on master]
Cc: linux-media@vger.kernel.org
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
 drivers/media/usb/em28xx/em28xx-cards.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Sean Young June 24, 2020, 9:13 a.m. UTC | #1
On Sun, May 24, 2020 at 02:07:46PM +0200, Paul Menzel wrote:
> Add the USB vendor and product ID of the TerraTec G3 [1], so Linux
> detects the device.

Does the device work, i.e. audio, composite and s-video? Or is it
only detected?

Thanks

Sean

>     [   38.093023] usb 1-3: new high-speed USB device number 4 using xhci_hcd
>     [   38.240404] usb 1-3: config 1 interface 0 altsetting 1 endpoint 0x82 has invalid wMaxPacketSize 0
>     [   38.240408] usb 1-3: config 1 interface 0 altsetting 1 endpoint 0x84 has invalid wMaxPacketSize 0
>     [   38.240411] usb 1-3: config 1 interface 0 altsetting 2 endpoint 0x84 has invalid wMaxPacketSize 0
>     [   38.240413] usb 1-3: config 1 interface 0 altsetting 3 endpoint 0x84 has invalid wMaxPacketSize 0
>     [   38.240416] usb 1-3: config 1 interface 0 altsetting 4 endpoint 0x84 has invalid wMaxPacketSize 0
>     [   38.240418] usb 1-3: config 1 interface 0 altsetting 5 endpoint 0x84 has invalid wMaxPacketSize 0
>     [   38.240420] usb 1-3: config 1 interface 0 altsetting 6 endpoint 0x84 has invalid wMaxPacketSize 0
>     [   38.240423] usb 1-3: config 1 interface 0 altsetting 7 endpoint 0x84 has invalid wMaxPacketSize 0
>     [   38.255077] usb 1-3: New USB device found, idVendor=0ccd, idProduct=10a7, bcdDevice= 1.00
>     [   38.255080] usb 1-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
>     [   38.255082] usb 1-3: Product: TerraTec G3
>     [   38.255085] usb 1-3: Manufacturer: TerraTec Electronic GmbH
>     [   38.286444] videodev: Linux video capture interface: v2.00
>     [   38.290861] em28xx 1-3:1.0: New device TerraTec Electronic GmbH TerraTec G3 @ 480 Mbps (0ccd:10a7, interface 0, class 0)
>     [   38.290863] em28xx 1-3:1.0: Video interface 0 found: isoc
>     [   38.349064] em28xx 1-3:1.0: chip ID is em2860
>     [   38.515453] em28xx 1-3:1.0: EEPROM ID = 1a eb 67 95, EEPROM hash = 0xd7a2f285
>     [   38.515456] em28xx 1-3:1.0: EEPROM info:
>     [   38.515458] em28xx 1-3:1.0: 	AC97 audio (5 sample rates)
>     [   38.515460] em28xx 1-3:1.0: 	500mA max power
>     [   38.515462] em28xx 1-3:1.0: 	Table at offset 0x06, strings=0x1a9e, 0x346a, 0x0000
>     [   38.586387] em28xx 1-3:1.0: Identified as Terratec Grabby (card=67)
>     [   38.586392] em28xx 1-3:1.0: analog set to isoc mode.
>     [   38.586503] em28xx 1-3:1.1: audio device (0ccd:10a7): interface 1, class 1
>     [   38.586516] em28xx 1-3:1.2: audio device (0ccd:10a7): interface 2, class 1
>     [   38.586543] usbcore: registered new interface driver em28xx
>     [   38.599733] em28xx 1-3:1.0: Registering V4L2 extension
>     [   38.629311] em28xx 1-3:1.0: Config register raw data: 0x50
>     [   38.659140] em28xx 1-3:1.0: AC97 vendor ID = 0x83847650
>     [   38.674111] em28xx 1-3:1.0: AC97 features = 0x6a90
>     [   38.674114] em28xx 1-3:1.0: Empia 202 AC97 audio processor detected
>     [   40.699171] em28xx 1-3:1.0: V4L2 video device registered as video0
>     [   40.699174] em28xx 1-3:1.0: V4L2 VBI device registered as vbi0
>     [   40.699176] em28xx 1-3:1.0: V4L2 extension successfully initialized
>     [   40.699178] em28xx: Registered (Em28xx v4l2 Extension) extension
> 
> [1]: https://www.terratec.de/details.php?artnr=TERRATEC+G3
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> [rebase https://patchwork.kernel.org/patch/902312/ on master]
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
>  drivers/media/usb/em28xx/em28xx-cards.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
> index a8c321d118279..ba6e65d0c2229 100644
> --- a/drivers/media/usb/em28xx/em28xx-cards.c
> +++ b/drivers/media/usb/em28xx/em28xx-cards.c
> @@ -2618,6 +2618,8 @@ struct usb_device_id em28xx_id_table[] = {
>  			.driver_info = EM2860_BOARD_TERRATEC_GRABBY },
>  	{ USB_DEVICE(0x0ccd, 0x10AF),
>  			.driver_info = EM2860_BOARD_TERRATEC_GRABBY },
> +	{ USB_DEVICE(0x0ccd, 0x10a7),
> +			.driver_info = EM2860_BOARD_TERRATEC_GRABBY },
>  	{ USB_DEVICE(0x0ccd, 0x00b2),
>  			.driver_info = EM2884_BOARD_CINERGY_HTC_STICK },
>  	{ USB_DEVICE(0x0fd9, 0x0018),
> -- 
> 2.26.2
Paul Menzel Dec. 11, 2020, 8:52 a.m. UTC | #2
Dear Sean,


I am sorry for the late reply.


Am 24.06.20 um 11:13 schrieb Sean Young:
> On Sun, May 24, 2020 at 02:07:46PM +0200, Paul Menzel wrote:
>> Add the USB vendor and product ID of the TerraTec G3 [1], so Linux
>> detects the device.
> 
> Does the device work, i.e. audio, composite and s-video? Or is it
> only detected?

Testing this quickly with a self-built Linux kernel, after plugging it 
in, I couldn’t find a V4L device created for testing.

> [ 5298.437946] usb 1-3: new high-speed USB device number 4 using xhci_hcd
> [ 5298.584284] usb 1-3: config 1 interface 0 altsetting 1 endpoint 0x82 has invalid wMaxPacketSize 0
> [ 5298.584286] usb 1-3: config 1 interface 0 altsetting 1 endpoint 0x84 has invalid wMaxPacketSize 0
> [ 5298.584288] usb 1-3: config 1 interface 0 altsetting 2 endpoint 0x84 has invalid wMaxPacketSize 0
> [ 5298.584289] usb 1-3: config 1 interface 0 altsetting 3 endpoint 0x84 has invalid wMaxPacketSize 0
> [ 5298.584291] usb 1-3: config 1 interface 0 altsetting 4 endpoint 0x84 has invalid wMaxPacketSize 0
> [ 5298.584292] usb 1-3: config 1 interface 0 altsetting 5 endpoint 0x84 has invalid wMaxPacketSize 0
> [ 5298.584294] usb 1-3: config 1 interface 0 altsetting 6 endpoint 0x84 has invalid wMaxPacketSize 0
> [ 5298.584295] usb 1-3: config 1 interface 0 altsetting 7 endpoint 0x84 has invalid wMaxPacketSize 0
> [ 5298.599286] usb 1-3: New USB device found, idVendor=0ccd, idProduct=10a7, bcdDevice= 1.00
> [ 5298.599288] usb 1-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
> [ 5298.599290] usb 1-3: Product: TerraTec G3
> [ 5298.599291] usb 1-3: Manufacturer: TerraTec Electronic GmbH
> [ 5298.620437] mc: Linux media interface: v0.10
> [ 5298.628547] videodev: Linux video capture interface: v2.00
> [ 5298.633969] em28xx 1-3:1.0: New device TerraTec Electronic GmbH TerraTec G3 @ 480 Mbps (0ccd:10a7, interface 0, class 0)
> [ 5298.633971] em28xx 1-3:1.0: Video interface 0 found: isoc
> [ 5298.693271] em28xx 1-3:1.0: chip ID is em2860
> [ 5298.855294] em28xx 1-3:1.0: EEPROM ID = 1a eb 67 95, EEPROM hash = 0xd7a2f285
> [ 5298.855296] em28xx 1-3:1.0: EEPROM info:
> [ 5298.855297] em28xx 1-3:1.0:  AC97 audio (5 sample rates)
> [ 5298.855298] em28xx 1-3:1.0:  500mA max power
> [ 5298.855300] em28xx 1-3:1.0:  Table at offset 0x06, strings=0x1a9e, 0x346a, 0x0000
> [ 5298.925978] em28xx 1-3:1.0: Identified as Terratec Grabby (card=67)
> [ 5298.925981] em28xx 1-3:1.0: analog set to isoc mode.
> [ 5298.926102] em28xx 1-3:1.1: audio device (0ccd:10a7): interface 1, class 1
> [ 5298.926110] em28xx 1-3:1.2: audio device (0ccd:10a7): interface 2, class 1
> [ 5298.926122] usbcore: registered new interface driver em28xx
> [ 5298.939683] em28xx 1-3:1.0: Registering V4L2 extension
> [ 5298.969288] em28xx 1-3:1.0: Config register raw data: 0x50
> [ 5298.999281] em28xx 1-3:1.0: AC97 vendor ID = 0x83847650
> [ 5299.014280] em28xx 1-3:1.0: AC97 features = 0x6a90
> [ 5299.014281] em28xx 1-3:1.0: Empia 202 AC97 audio processor detected
> [ 5300.929118] usb 1-3: Decoder not found
> [ 5300.929121] em28xx 1-3:1.0: failed to create media graph
> [ 5300.929124] em28xx 1-3:1.0: V4L2 device vbi0 deregistered
> [ 5300.929204] em28xx 1-3:1.0: V4L2 device video0 deregistered
> [ 5300.929270] em28xx: Registered (Em28xx v4l2 Extension) extension

Can you see from the logs, what is missing? Can I force loading em28xx 
without the patch with the standard Debian Linux kernel to rule out it’s 
related to my Linux kernel configuration?


Kind regards,

Paul
Sean Young Dec. 16, 2020, 1:04 p.m. UTC | #3
Hi Paul,

On Fri, Dec 11, 2020 at 09:52:08AM +0100, Paul Menzel wrote:
> Dear Sean,
> 
> 
> I am sorry for the late reply.
> 
> 
> Am 24.06.20 um 11:13 schrieb Sean Young:
> > On Sun, May 24, 2020 at 02:07:46PM +0200, Paul Menzel wrote:
> > > Add the USB vendor and product ID of the TerraTec G3 [1], so Linux
> > > detects the device.
> > 
> > Does the device work, i.e. audio, composite and s-video? Or is it
> > only detected?
> 
> Testing this quickly with a self-built Linux kernel, after plugging it in, I
> couldn’t find a V4L device created for testing.
> 
> > [ 5298.437946] usb 1-3: new high-speed USB device number 4 using xhci_hcd
> > [ 5298.584284] usb 1-3: config 1 interface 0 altsetting 1 endpoint 0x82 has invalid wMaxPacketSize 0
> > [ 5298.584286] usb 1-3: config 1 interface 0 altsetting 1 endpoint 0x84 has invalid wMaxPacketSize 0
> > [ 5298.584288] usb 1-3: config 1 interface 0 altsetting 2 endpoint 0x84 has invalid wMaxPacketSize 0
> > [ 5298.584289] usb 1-3: config 1 interface 0 altsetting 3 endpoint 0x84 has invalid wMaxPacketSize 0
> > [ 5298.584291] usb 1-3: config 1 interface 0 altsetting 4 endpoint 0x84 has invalid wMaxPacketSize 0
> > [ 5298.584292] usb 1-3: config 1 interface 0 altsetting 5 endpoint 0x84 has invalid wMaxPacketSize 0
> > [ 5298.584294] usb 1-3: config 1 interface 0 altsetting 6 endpoint 0x84 has invalid wMaxPacketSize 0
> > [ 5298.584295] usb 1-3: config 1 interface 0 altsetting 7 endpoint 0x84 has invalid wMaxPacketSize 0
> > [ 5298.599286] usb 1-3: New USB device found, idVendor=0ccd, idProduct=10a7, bcdDevice= 1.00
> > [ 5298.599288] usb 1-3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
> > [ 5298.599290] usb 1-3: Product: TerraTec G3
> > [ 5298.599291] usb 1-3: Manufacturer: TerraTec Electronic GmbH
> > [ 5298.620437] mc: Linux media interface: v0.10
> > [ 5298.628547] videodev: Linux video capture interface: v2.00
> > [ 5298.633969] em28xx 1-3:1.0: New device TerraTec Electronic GmbH TerraTec G3 @ 480 Mbps (0ccd:10a7, interface 0, class 0)
> > [ 5298.633971] em28xx 1-3:1.0: Video interface 0 found: isoc
> > [ 5298.693271] em28xx 1-3:1.0: chip ID is em2860
> > [ 5298.855294] em28xx 1-3:1.0: EEPROM ID = 1a eb 67 95, EEPROM hash = 0xd7a2f285
> > [ 5298.855296] em28xx 1-3:1.0: EEPROM info:
> > [ 5298.855297] em28xx 1-3:1.0:  AC97 audio (5 sample rates)
> > [ 5298.855298] em28xx 1-3:1.0:  500mA max power
> > [ 5298.855300] em28xx 1-3:1.0:  Table at offset 0x06, strings=0x1a9e, 0x346a, 0x0000
> > [ 5298.925978] em28xx 1-3:1.0: Identified as Terratec Grabby (card=67)
> > [ 5298.925981] em28xx 1-3:1.0: analog set to isoc mode.
> > [ 5298.926102] em28xx 1-3:1.1: audio device (0ccd:10a7): interface 1, class 1
> > [ 5298.926110] em28xx 1-3:1.2: audio device (0ccd:10a7): interface 2, class 1
> > [ 5298.926122] usbcore: registered new interface driver em28xx
> > [ 5298.939683] em28xx 1-3:1.0: Registering V4L2 extension
> > [ 5298.969288] em28xx 1-3:1.0: Config register raw data: 0x50
> > [ 5298.999281] em28xx 1-3:1.0: AC97 vendor ID = 0x83847650
> > [ 5299.014280] em28xx 1-3:1.0: AC97 features = 0x6a90
> > [ 5299.014281] em28xx 1-3:1.0: Empia 202 AC97 audio processor detected
> > [ 5300.929118] usb 1-3: Decoder not found
> > [ 5300.929121] em28xx 1-3:1.0: failed to create media graph
> > [ 5300.929124] em28xx 1-3:1.0: V4L2 device vbi0 deregistered
> > [ 5300.929204] em28xx 1-3:1.0: V4L2 device video0 deregistered
> > [ 5300.929270] em28xx: Registered (Em28xx v4l2 Extension) extension
> 
> Can you see from the logs, what is missing? Can I force loading em28xx
> without the patch with the standard Debian Linux kernel to rule out it’s
> related to my Linux kernel configuration?

Looks like it can't find the decoder, not sure this is anything to do with
your kernel config. This device probably has a different decoder than the
other Grabby device.

You could try to set the decoder field for the device to EM28XX_TVP5150 and
see what happens, or open the device and see if you can find what decoder
it uses.


Sean
diff mbox series

Patch

diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index a8c321d118279..ba6e65d0c2229 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -2618,6 +2618,8 @@  struct usb_device_id em28xx_id_table[] = {
 			.driver_info = EM2860_BOARD_TERRATEC_GRABBY },
 	{ USB_DEVICE(0x0ccd, 0x10AF),
 			.driver_info = EM2860_BOARD_TERRATEC_GRABBY },
+	{ USB_DEVICE(0x0ccd, 0x10a7),
+			.driver_info = EM2860_BOARD_TERRATEC_GRABBY },
 	{ USB_DEVICE(0x0ccd, 0x00b2),
 			.driver_info = EM2884_BOARD_CINERGY_HTC_STICK },
 	{ USB_DEVICE(0x0fd9, 0x0018),