After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 155575 - [alsasink] broken with hw:X or when used with either alsasrc or osssrc
[alsasink] broken with hw:X or when used with either alsasrc or osssrc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: High critical
: 0.8.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-16 11:42 UTC by David Mohring
Modified: 2005-01-09 15:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Debug out for device=hw:0 (295.68 KB, text/plain)
2004-10-16 11:47 UTC, David Mohring
Details
osssrc alsasink output (301.20 KB, text/plain)
2004-10-16 11:49 UTC, David Mohring
Details
Dual card Software mixing asound.conf (916 bytes, text/plain)
2004-10-26 15:20 UTC, David Mohring
Details
gst-launch --gst-debug=*alsa*:5 alsasrc device=hw:1 ! audioconvert ! audioscale ! alsasink device=hw:0 2>&1 | tee gst-launch-alsa.log (5.48 KB, text/plain)
2004-10-26 18:32 UTC, David Mohring
Details
gst-launch --gst-debug=*alsa*:5 alsasrc device=hw:1 ! audioconvert ! audioscale ! alsasink device=dmix0 2>&1 | tee gst-launch-alsadmix.log (11.83 KB, text/plain)
2004-10-26 18:37 UTC, David Mohring
Details

Description David Mohring 2004-10-16 11:42:55 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
Comment 1 David Mohring 2004-10-16 11:47:02 UTC
Created attachment 32667 [details]
Debug out for device=hw:0 

gst-launch-0.8 sinesrc ! alsasink device=hw:0
Comment 2 David Mohring 2004-10-16 11:49:20 UTC
Created attachment 32668 [details]
osssrc alsasink output
Comment 3 Ronald Bultje 2004-10-16 12:13:37 UTC
The correct pipeline is:

gst-launch-0.8 sinesrc ! audioconvert ! audioscale ! alsasink device=hw:0
Comment 4 David Mohring 2004-10-16 13:33:54 UTC
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.
Comment 5 Ronald Bultje 2004-10-18 09:24:18 UTC
Did you enable any input port using alsamixer, gnome volume control or anything
similar?
Comment 6 David Mohring 2004-10-19 00:50:14 UTC
"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?
Comment 7 Ronald Bultje 2004-10-19 05:42:22 UTC
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.
Comment 8 David Mohring 2004-10-19 07:52:17 UTC
Both Mic and Capture Record flags were set.
  
Comment 9 Ronald Bultje 2004-10-19 16:43:37 UTC
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.
Comment 10 Jerone Young 2004-10-26 07:26:23 UTC
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).
Comment 11 Jerone Young 2004-10-26 07:28:56 UTC
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).
Comment 12 Ronald Bultje 2004-10-26 08:39:36 UTC
Your pipeline is plain wrong. Try gst-launch-0.8 sinesrc ! audioconvert !
audioscale ! alsasink and see if that works.
Comment 13 David Mohring 2004-10-26 15:20:54 UTC
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.
Comment 14 David Mohring 2004-10-26 15:22:22 UTC
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

Comment 15 Ronald Bultje 2004-10-26 16:31:19 UTC
Can you attach the output of the last command with the commandline option
--gst-debug=*alsa*:5?
Comment 16 David Mohring 2004-10-26 18:32:31 UTC
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
Comment 17 David Mohring 2004-10-26 18:37:30 UTC
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
Comment 18 Jerone Young 2004-10-27 00:51:29 UTC
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. 
Comment 19 Ronald Bultje 2004-11-10 20:19:16 UTC
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.
Comment 20 Ronald Bultje 2005-01-09 15:08:00 UTC
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.