GNOME Bugzilla – Bug 155575
[alsasink] broken with hw:X or when used with either alsasrc or osssrc
Last modified: 2005-01-09 15:08:00 UTC
On Fedora Core Rawhide. That plughw:0,0 works but hw:0 does not may be a Fedora problem > gst-launch-0.8 sinesrc ! alsasink device=plughw:0,0 * Works fine > gst-launch-0.8 sinesrc ! alsasink device=hw:0 RUNNING pipeline ... ERROR: pipeline doesn't want to play. * No sound. * for export GST_DEBUG=*:5 see attached gst-launch-0.8_sinesrc_alsasink_device_hw_0.txt > aplay -D plughw:0,0 /usr/share/sounds/info.wav Playing WAVE '/usr/share/sounds/info.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono * Works fine > aplay -D hw:0,0 /usr/share/sounds/info.wav Playing WAVE '/usr/share/sounds/info.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono aplay: set_params:859: Channels count non available * Fails with No sound Mplayer ( recompiled from freshrpms/dag SRPMSs ) works everyway > mplayer -ao alsa:device=plughw#0.0 /usr/share/sounds/info.wav > mplayer -ao alsa:device=hw#0 /usr/share/sounds/info.wav > mplayer -ao oss /usr/share/sounds/info.wav * Works fine, no anomalous error messages With Gstreamer alsasrc or osssrc works OK if the sink is osssink > gst-launch-0.8 alsasrc device=hw:1,0 ! osssink device=/dev/dsp > gst-launch-0.8 alsasrc device=hw:1,0 ! osssink device=/dev/dsp1 > gst-launch-0.8 alsasrc device=plughw:1,0 ! osssink device=/dev/dsp > gst-launch-0.8 alsasrc device=plughw:1,0 ! osssink device=/dev/dsp1 > gst-launch-0.8 osssrc device=/dev/dsp1 ! osssink device=/dev/dsp > gst-launch-0.8 osssrc device=/dev/dsp1 ! osssink device=/dev/dsp1 * All of the above work Ok, outputting auto and returning at ctrl-break with RUNNING pipeline ... Caught interrupt. Execution ended after 39 iterations (sum 7453782000 ns, average 191122615 ns, min 168721000 ns, max 372568000 ns). However alsasink with device=plughw:0,0 outputs utter silence. > gst-launch-0.8 osssrc device=/dev/dsp1 ! alsasink device=plughw:0,0 > gst-launch-0.8 osssrc device=/dev/dsp1 ! alsasink device=plughw:1,0 > gst-launch-0.8 alsasrc device=plughw:1,0 ! alsasink device=plughw:0,0 > gst-launch-0.8 alsasrc device=plughw:1,0 ! alsasink device=plughw:1,0 RUNNING pipeline ... Caught interrupt. Execution ended after 189700 iterations (sum 3055855000 ns, average 16108 ns, min 15000 ns, max 95219000 ns). * See gst-launch-0.8_osssrc_alsasink_device_hw_0.txt
Created attachment 32667 [details] Debug out for device=hw:0 gst-launch-0.8 sinesrc ! alsasink device=hw:0
Created attachment 32668 [details] osssrc alsasink output
The correct pipeline is: gst-launch-0.8 sinesrc ! audioconvert ! audioscale ! alsasink device=hw:0
gst-launch-0.8 sinesrc ! audioconvert ! audioscale ! alsasink device=hw:0 RUNNING pipeline ... Caught interrupt. Execution ended after 106683 iterations (sum 1549877000 ns, average 14527 ns, min 13000 ns, max 774000 ns). Works. Thanks Ronald, what about audio passthough gst-launch-0.8 alsasrc device=plughw:1,0 ! audioconvert ! audioscale ! alsasink device=hw:0 Still silence.
Did you enable any input port using alsamixer, gnome volume control or anything similar?
"input port using alsamixer, gnome volume control or anything similar?" Not to my knowledge. I tried it at init 3, without X/GNOME etc with the same result. What do you get?
With no input ports selected, you will record audio from no input ports, i.e. silence. First select the input port to passthrough before doing the actual passthrough. Then, it might work.
Both Mic and Capture Record flags were set.
Was the mic muted? (sorry, have to ask...) Could you hear the mic through your speakers (without the pipeline running!!)? If not, alsasrc will not pick up anything either. Try maximizing all volumes as a last resort.
I am also seeing the same problem. But my mic works. alsasink does not work in Fedora Core 2 or 3 rawhide. I'm running X86_64 Fedora and if your run "gst-launch alsasink", you get : RUNNING pipeline ... ERROR: from element /pipeline0/alsasink0: Internal GStreamer error: pad problem. File a bug. Additional debug info: gstpad.c(3253): gst_pad_pull: /pipeline0/alsasink0: pull on pad alsasink0:sink but it was unlinked Execution ended after 1 iterations (sum 257000 ns, average 257000 ns, min 257000 ns, max 257000 ns).
Also to add that using "osssink" works fine, but we want "alsasink" to work. Also my system is using the snd_via82xx alsa sound driver (I'm thinking this might be part of the issue, because I don't know if everyone is seeing this).
Your pipeline is plain wrong. Try gst-launch-0.8 sinesrc ! audioconvert ! audioscale ! alsasink and see if that works.
Created attachment 33077 [details] Dual card Software mixing asound.conf It appears that Gstreamer alsasink requires output to go though a dmix plug ( software mixer ) to work. Even if the input is from another card. With the above config gst-launch alsasrc device=asym1 ! audioconvert ! audioscale ! alsasink device=dmix0 * Works as expected gst-launch alsasrc device=asym1 ! audioconvert ! audioscale ! alsasink device=dmix1 * Works as expected gst-launch alsasrc device=hw:1 ! audioconvert ! audioscale ! alsasink device=dmix0 * Works as expected gst-launch alsasrc device=hw:1 ! audioconvert ! audioscale ! alsasink device=hw:0 * fails - even without using the asound.conf setings.
Re : Internal GStreamer error: pad problem. File a bug. See - I thought this was just a FC issue. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=136000
Can you attach the output of the last command with the commandline option --gst-debug=*alsa*:5?
Created attachment 33084 [details] gst-launch --gst-debug=*alsa*:5 alsasrc device=hw:1 ! audioconvert ! audioscale ! alsasink device=hw:0 2>&1 | tee gst-launch-alsa.log
Created attachment 33085 [details] gst-launch --gst-debug=*alsa*:5 alsasrc device=hw:1 ! audioconvert ! audioscale ! alsasink device=dmix0 2>&1 | tee gst-launch-alsadmix.log This works with asound.conf/.asoundrc setup with a dmix plug http://bugzilla.gnome.org/show_bug.cgi?id=155575#c13
This is really a side note: Ok, I was playing with the latest alsa drivers and the via82xx driver today. When I went in the code and modified it so that my card uses an option equilavent to "dxs_support=4" in the via82xx (I have an Abit AV8) driver and rebooted. Now alsasink works in the gstreamer-properties app. So for me at least alsa is working fine now.
On first sample: now to resync: sample 4294959105 expected, but got 1266866698 Which means it'll insert silence to overcome the clock difference. I don't know why, but this is the reason that you don't hear anything.
I fixed a serious bug in audioscale related to timestamps, I think that fixes this too, can you please retry with gst-plugins 0.8.8 or CVS of today, 15:00 GMT or later? I'm pretty sure that fixes this. If not, please reopen. The timestamps will still be weird (tracked in 148609), but the delay will be gone.