public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* em28xx: Terratec Grabby no sound
@ 2010-10-25 17:24 Florian Klink
  2010-10-25 17:28 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 10+ messages in thread
From: Florian Klink @ 2010-10-25 17:24 UTC (permalink / raw)
  To: linux-media; +Cc: Mauro Carvalho Chehab

 Hi,

 I recently bought a Terratec Grabby. The device has a S-Video and 3 
 Cinch
 cables (sound left, sound right, video). I want to record some video
 cassettes with it. (with a cinch-scart adapter).

 I checked the signal, there is audio and video on it.

 When I try to "play" the capture device with e.g. mplayer, I see "no
 sound", even with various options.

 I can hear sound only by doing "arecord -D hw:2,0 -r 32000 -c 2 -f 
 S16_LE |
 aplay -", but as soon as mplayer is starting, I can't hear anything
 anymore.

 ...which means that using alsa as the sound device with mplayer doesn't
 work either.

 Am I missing something?

 I checked the source code, Terratec Grabby support was introduced with
 4557af9c5338605c85fe54f5ebba3d4b14a60ab8:

 -----------------------------------------
 diff --git a/drivers/media/video/em28xx/em28xx-cards.c 
 b/drivers/media/video/em28xx/em28xx-cards.c
 index 7cb93fb..b4c78f2 100644
 --- a/drivers/media/video/em28xx/em28xx-cards.c
 +++ b/drivers/media/video/em28xx/em28xx-cards.c
 @@ -1347,6 +1347,22 @@ struct em28xx_board em28xx_boards[] = {
  			.amux     = EM28XX_AMUX_VIDEO,
  		} },
  	},
 +	[EM2860_BOARD_TERRATEC_GRABBY] = {
 +		.name            = "Terratec Grabby",
 +		.vchannels       = 2,
 +		.tuner_type      = TUNER_ABSENT,
 +		.decoder         = EM28XX_SAA711X,
 +		.xclk            = EM28XX_XCLK_FREQUENCY_12MHZ,
 +		.input           = { {
 +			.type     = EM28XX_VMUX_COMPOSITE1,
 +			.vmux     = SAA7115_COMPOSITE0,
 +			.amux     = EM28XX_AMUX_VIDEO2,
 +		}, {
 +			.type     = EM28XX_VMUX_SVIDEO,
 +			.vmux     = SAA7115_SVIDEO3,
 +			.amux     = EM28XX_AMUX_VIDEO2,
 +		} },
 +	},
  };
  const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);

 @@ -1410,6 +1426,8 @@ struct usb_device_id em28xx_id_table[] = {
  			.driver_info = EM2870_BOARD_TERRATEC_XS },
  	{ USB_DEVICE(0x0ccd, 0x0047),
  			.driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS },
 +	{ USB_DEVICE(0x0ccd, 0x0096),
 +			.driver_info = EM2860_BOARD_TERRATEC_GRABBY },
  	{ USB_DEVICE(0x185b, 0x2870),
  			.driver_info = EM2870_BOARD_COMPRO_VIDEOMATE },
  	{ USB_DEVICE(0x185b, 0x2041),
 diff --git a/drivers/media/video/em28xx/em28xx.h 
 b/drivers/media/video/em28xx/em28xx.h
 index e801f78..fa2fb41 100644
 --- a/drivers/media/video/em28xx/em28xx.h
 +++ b/drivers/media/video/em28xx/em28xx.h
 @@ -103,6 +103,7 @@
  #define EM2860_BOARD_EASYCAP                      64
  #define EM2820_BOARD_IODATA_GVMVP_SZ		  65
  #define EM2880_BOARD_EMPIRE_DUAL_TV		  66
 +#define EM2860_BOARD_TERRATEC_GRABBY		  67

  /* Limits minimum and default number of buffers */
  #define EM28XX_MIN_BUF 4
 -----------------------------------------

 Is there maybe a wrong amux set? Which one could it be?
 Is sound-usb-audio somehow conflicting with em28xx module?

 I hope you have an idea what is wrong here!

 Florian Klink


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: em28xx: Terratec Grabby no sound
@ 2010-12-27 13:54 Florian Klink
  0 siblings, 0 replies; 10+ messages in thread
From: Florian Klink @ 2010-12-27 13:54 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

 Hi Mauro,

 with the help of Bernd Spaeth, I finally managed to get the Terratec 
 Grabby
 working by using

 mplayer -v -tv
 driver=v4l2:input=0:device=/dev/video1:alsa:adevice=hw.2,0:audiorate=48000:forceaudio:immediatemode=0
 tv://

 and your patch

 diff --git a/drivers/media/video/em28xx/em28xx-cards.c
 b/drivers/media/video/em28xx/em28xx-cards.c
 index e7efb4b..6e80376 100644
 --- a/drivers/media/video/em28xx/em28xx-cards.c
 +++ b/drivers/media/video/em28xx/em28xx-cards.c
 @@ -1621,11 +1621,11 @@ struct em28xx_board em28xx_boards[] = {
  .input = { {
  .type = EM28XX_VMUX_COMPOSITE1,
  .vmux = SAA7115_COMPOSITE0,
 - .amux = EM28XX_AMUX_VIDEO2,
 + .amux = EM28XX_AMUX_LINE_IN,
  }, {
  .type = EM28XX_VMUX_SVIDEO,
  .vmux = SAA7115_SVIDEO3,
 - .amux = EM28XX_AMUX_VIDEO2,
 + .amux = EM28XX_AMUX_LINE_IN,
  } },
  },
  [EM2860_BOARD_TERRATEC_AV350] = {

 Working video and audio!

 I wasn't able to test it with s-video, only composite.

 But I think it's still safe to commit the patch, because s-video is 
 only
 another video input, the audio output stays the same.

 Florian

 On Tue, 09 Nov 2010 08:56:32 -0200, Mauro Carvalho Chehab wrote:

> Em 26-10-2010 10:58, Florian Klink escreveu:
>> Hi,
>>
>>> The sound comes from alsa device. Several em28xx types provide
>>> standard USB audio. So, snd-usb-audio handles it. That's why you 
>>> need
>>> alsa:adevice=hw.2,0:forceaudio at mplayer.
>> ... but thats my problem. sound doesn't appear inside mplayer, even
>> with the command line options set to use the "external" alsa device.
>> However, "arecord -D hw:2,0 -r 32000 -c 2 -f S16_LE | aplay -" plays
>> the sound, but only before mplayer tried to access the sound card
> Have you tried my patch? If you're using 
> alsa:adevice=hw.2,0:forceaudio
> at mplayer, you should not be running arecord/aplay. You need to use 
> one
> solution or the other.
>
>> When trying to play sound with arecord again after mplayer tried to
>> access it, I have to re-plug the card to get it playing sound over
>> arecord again, video only seems to not break it. There is no error
>> message or something in arecord when it's not playing anything, just
>> silence and the same command line output. Is there maybe anything 
>> with
>> the sample format S16_LE or something that confuses mplayer/the
>> driver/whatever? Strange problem... mplayer output (mplayer -v -tv
>> 
>> driver=v4l2:input=0:device=/dev/video1:alsa:adevice=hw.2,0:forceaudio
>> tv://): http://pastebin.com/yTV300iG [1] Florian -- To unsubscribe 
>> from
>> this list: send the line "unsubscribe linux-media" in the body of a
>> message to majordomo@vger.kernel.org [2] More majordomo info at
>> http://vger.kernel.org/majordomo-info.html [3]
> -- To unsubscribe from this list: send the line "unsubscribe
> linux-media" in the body of a message to majordomo@vger.kernel.org 
> [4]
> More majordomo info at http://vger.kernel.org/majordomo-info.html [5]


 Links:
 ------
 [1] http://pastebin.com/yTV300iG
 [2] mailto:majordomo@vger.kernel.org
 [3] http://vger.kernel.org/majordomo-info.html
 [4] mailto:majordomo@vger.kernel.org
 [5] http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread
* em28xx: Terratec Grabby no sound
@ 2010-10-23 12:58 Florian Klink
  2010-10-25 14:19 ` Michael Bonfils
  0 siblings, 1 reply; 10+ messages in thread
From: Florian Klink @ 2010-10-23 12:58 UTC (permalink / raw)
  To: video4linux-list; +Cc: Mauro Carvalho Chehab

 Hi,

 I recently bought a Terratec Grabby. The device has a S-Video and 3 
 Cinch
 cables (sound left, sound right, video). I want to record some video
 cassettes with it. (with a cinch-scart adapter).

 I checked the signal, there is audio and video on it.

 When I try to "play" the capture device with e.g. mplayer, I see "no
 sound", even with various options.

 I can hear sound only by doing "arecord -D hw:2,0 -r 32000 -c 2 -f 
 S16_LE |
 aplay -", but as soon as mplayer is starting, I can't hear anything
 anymore.

 ...which means that using alsa as the sound device with mplayer doesn't
 work either.

 Am I missing something?

 I checked the source code, Terratec Grabby support was introduced with
 4557af9c5338605c85fe54f5ebba3d4b14a60ab8:

 -----------------------------------------
 diff --git a/drivers/media/video/em28xx/em28xx-cards.c 
 b/drivers/media/video/em28xx/em28xx-cards.c
 index 7cb93fb..b4c78f2 100644
 --- a/drivers/media/video/em28xx/em28xx-cards.c
 +++ b/drivers/media/video/em28xx/em28xx-cards.c
 @@ -1347,6 +1347,22 @@ struct em28xx_board em28xx_boards[] = {
  			.amux     = EM28XX_AMUX_VIDEO,
  		} },
  	},
 +	[EM2860_BOARD_TERRATEC_GRABBY] = {
 +		.name            = "Terratec Grabby",
 +		.vchannels       = 2,
 +		.tuner_type      = TUNER_ABSENT,
 +		.decoder         = EM28XX_SAA711X,
 +		.xclk            = EM28XX_XCLK_FREQUENCY_12MHZ,
 +		.input           = { {
 +			.type     = EM28XX_VMUX_COMPOSITE1,
 +			.vmux     = SAA7115_COMPOSITE0,
 +			.amux     = EM28XX_AMUX_VIDEO2,
 +		}, {
 +			.type     = EM28XX_VMUX_SVIDEO,
 +			.vmux     = SAA7115_SVIDEO3,
 +			.amux     = EM28XX_AMUX_VIDEO2,
 +		} },
 +	},
  };
  const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
 
 @@ -1410,6 +1426,8 @@ struct usb_device_id em28xx_id_table[] = {
  			.driver_info = EM2870_BOARD_TERRATEC_XS },
  	{ USB_DEVICE(0x0ccd, 0x0047),
  			.driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS },
 +	{ USB_DEVICE(0x0ccd, 0x0096),
 +			.driver_info = EM2860_BOARD_TERRATEC_GRABBY },
  	{ USB_DEVICE(0x185b, 0x2870),
  			.driver_info = EM2870_BOARD_COMPRO_VIDEOMATE },
  	{ USB_DEVICE(0x185b, 0x2041),
 diff --git a/drivers/media/video/em28xx/em28xx.h 
 b/drivers/media/video/em28xx/em28xx.h
 index e801f78..fa2fb41 100644
 --- a/drivers/media/video/em28xx/em28xx.h
 +++ b/drivers/media/video/em28xx/em28xx.h
 @@ -103,6 +103,7 @@
  #define EM2860_BOARD_EASYCAP                      64
  #define EM2820_BOARD_IODATA_GVMVP_SZ		  65
  #define EM2880_BOARD_EMPIRE_DUAL_TV		  66
 +#define EM2860_BOARD_TERRATEC_GRABBY		  67
 
  /* Limits minimum and default number of buffers */
  #define EM28XX_MIN_BUF 4
 -----------------------------------------

 Is there maybe a wrong amux set? Which one could it be?
 Is sound-usb-audio somehow conflicting with em28xx module?

 I hope you have an idea what is wrong here!

 Florian Klink

--
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] 10+ messages in thread

end of thread, other threads:[~2010-12-27 13:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 17:24 em28xx: Terratec Grabby no sound Florian Klink
2010-10-25 17:28 ` Mauro Carvalho Chehab
     [not found]   ` <d8211f823d481e2991821b5dfc4e8b84@flokli.de>
2010-10-25 20:51     ` Mauro Carvalho Chehab
2010-10-25 22:06       ` Florian Klink
2010-10-25 23:18         ` Mauro Carvalho Chehab
2010-10-26 12:58           ` Florian Klink
2010-11-09 10:56             ` Mauro Carvalho Chehab
  -- strict thread matches above, loose matches on Subject: below --
2010-12-27 13:54 Florian Klink
2010-10-23 12:58 Florian Klink
2010-10-25 14:19 ` Michael Bonfils

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox