[gst-devel] Problems with USB speakers

Rodrigo Castro rodrigo.castro at mezzano.com.br
Thu Jun 21 21:28:41 CEST 2007


Hi Peteris,

Peteris Krisjanis wrote:
> 2007/6/21, Rodrigo Castro <rodrigo.castro at mezzano.com.br>:
>>
>> It's still strange that gstreamer doesn't work when type is hw for USB
>> speakers (like suggested on alsa site [1]), but at least we have a
>> workaround now. Is there any limitation using that way rather than "type
>> hw"? By the way, is that a bug? Should we file a bug in gstreamer 
>> bugzilla?
>
> I think it is problem that your USB speakers wants different sample
> rate than default (44,1Khz), which hw usually uses. Suggestion to use
> "hw" propably will propably work with other USB speakers, but I guess,
> as I have no hardware to test it.
>
> I think there is several different problems:
> 1. ALSA doesn't report soundcard(s) capacities correctly
> 2. Therefore Gstreamer alsa element don't get right caps (If 1. is
> wrong, then 2. would mean that there is a bug in Gstreamer. Anyway,
> alsa element don't get right caps, that's for sure)
> 3. Wrong caps get set, and playing on hw fails due of that
> 4. Wrong caps get set, using plughw, but as it can sample everything
> up/down, it doesn't bother about it
>
> i guess that there was several bugs filled on this account already.
> But as I am no expert in ALSA or Gstreamer, I am not sure which one is
> to blame. Careful and extensive research could yield more facts for
> fixing this bug and helping Gst or ALSA devs doing that.

Since MPlayer works fine when using hw or plughw, I don't know if it's 
alsa to blame, but I can't say for sure. I tried to find reports on this 
issue and, although found some similar ones, didn't find any with this 
exact problem. Let's see Stefan's opinion if it's worth reporting it or not.

BTW, MPlayer uses 48KHz rate to play my ogg file, as you can see below:

==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)

Stefan, although I found a workaround with plughw, I would be more than 
happy to provide you further information about this problem. I think it 
may be important to understand what's happening here to find out whether 
it's a bug in gstreamer or not.

Thanks,
Rodrigo




More information about the gstreamer-devel mailing list