Cannot record using alsa + gstreamer framework

Bug #34597 reported by John Dong
22
Affects Status Importance Assigned to Milestone
GStreamer
Unknown
Medium
gst-plugins (Ubuntu)
Fix Released
Medium
Unassigned
gst-plugins-base0.10 (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

Whenever I try to use ALSA as the default GStreamer plugin, it fails to open the device:

jdong@shuttle:~$ gstreamer-properties
gstreamer-properties-Message: Skipping unavailable plugin 'artsdsink'
gstreamer-properties-Message: Skipping unavailable plugin 'polypsink'
gstreamer-properties-Message: Skipping unavailable plugin 'sdlvideosink'
gstreamer-properties-Message: Skipping unavailable plugin 'v4lmjpegsrc'
gstreamer-properties-Message: Skipping unavailable plugin 'qcamsrc'
gstreamer-properties-Message: Skipping unavailable plugin 'v4l2src'
gstreamer-properties-Message: Skipping unavailable plugin 'esdmon'
gstreamer-properties-Message: Skipping unavailable plugin 'polypsrc'
gstreamer-properties-Message: Error running pipeline 'ALSA - Advanced Linux Sound Architecture': Could not open resource for reading. [gstalsasrc.c(526): gst_alsasrc_open (): /pipeline0/alsasrc1:
Recording open error: Invalid argument]
gstreamer-properties-Message: Error running pipeline 'ALSA - Advanced Linux Sound Architecture': Could not open resource for reading. [gstalsasrc.c(526): gst_alsasrc_open (): /pipeline1/alsasrc2:
Recording open error: Invalid argument]

This is a Dapper system, fully upgraded.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. When do you get those messages? When starting the application or when trying to play a sound? What soundcard do you have?

Martin any idea on that?

Changed in gst-plugins:
assignee: nobody → desktop-bugs
status: Unconfirmed → Needs Info
Revision history for this message
John Dong (jdong) wrote :

Sound Recorder refuses to do any recording, period. This error is trying to test the ALSA input pipeline through gstreamer-properties.

Revision history for this message
John Dong (jdong) wrote :

Fixed; stupid asound.conf software mixing!

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 34597] Cannot record using alsa + gstreamer framework

Hi John,

John Dong [2006-03-18 14:42 -0000]:
> Public bug report changed:
> https://launchpad.net/malone/bugs/34597
>
> Comment:
> Fixed; stupid asound.conf software mixing!

Can you please explain this a bit? Is it something you changed
locally, which broke gstreamer? Or does Ubuntu provide a wrong
default?

Thank you,

Martin

--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org

In a world without walls and fences, who needs Windows and Gates?

Revision history for this message
Vytas (vytas) wrote :

I can confirm this on my system too

$ cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
                     HDA Intel at 0xffa3c000 irq 169

gstreamer-properties:
I try to test alsa input source, and it fails with the message that it was unable to construct the pipeline.

I haven't tweaked any asound.conf's

Revision history for this message
John Dong (jdong) wrote :

It was my fault; I set up /etc/asound.conf with software mixing, which
apparently broke recording. The default Ubuntu configuration works fine.

Sorry about the trouble.

On 3/28/06, Martin Pitt <email address hidden> wrote:
>
> Public bug report changed:
> https://launchpad.net/malone/bugs/34597
>
> Comment:
> Hi John,
>
> John Dong [2006-03-18 14:42 -0000]:
> > Public bug report changed:
> > https://launchpad.net/malone/bugs/34597
> >
> > Comment:
> > Fixed; stupid asound.conf software mixing!
>
> Can you please explain this a bit? Is it something you changed
> locally, which broke gstreamer? Or does Ubuntu provide a wrong
> default?
>
> Thank you,
>
> Martin
>
> --
> Martin Pitt http://www.piware.de
> Ubuntu Developer http://www.ubuntu.com
> Debian Developer http://www.debian.org
>
> In a world without walls and fences, who needs Windows and Gates?
>

Revision history for this message
Martin Pitt (pitti) wrote :

Hi John,

John Dong [2006-03-28 13:12 -0000]:
> Public bug report changed:
> https://launchpad.net/malone/bugs/34597
>
> Comment:
> It was my fault; I set up /etc/asound.conf with software mixing, which
> apparently broke recording. The default Ubuntu configuration works fine.

Alright, then I guess we can close this bug.

 status rejected

> Sorry about the trouble.

No worries, thanks for your help with resolving this.

Martin

Changed in gst-plugins:
status: Needs Info → Rejected
Revision history for this message
Vytas (vytas) wrote :

Should I open a new report or reopen this :( Seems that you missed my comment

Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, Vytas, I didn't see it. I just reopen this bug, no need to create a new one.

Changed in gst-plugins:
status: Rejected → Unconfirmed
Revision history for this message
Vytas (vytas) wrote : some gstreamer debug

part of
GST_DEBUG=3 gstreamer-properties

when I try to test input sink

Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote :

This is serious problem. First of all, I can't record anything with GNOME Sound Recorder now (I got filled one bug about similar problem some time ago #30434) with newest Dapper upgrades. I can record though with arecord: arecord --device default -f cd tests.wav.
But 'gst-launch-0.10 alsasrc device=default ! flacenc ! filesink location=test.flac' creates just file, but writes nothing in it, t.i. it keeps size zero. Even default doesn't work. However, using audiotestsrc instead of alsasrc works, so problem seems to be in gstreamer-alsa plugin, especially in alsasrc.

Revision history for this message
Jono Bacon (jonobacon) wrote :

I am also experiencing this bug, and I see it as a serious problem. It basically blocks the ability to record audio on many laptops.

I filed a bug against GStreamer on the GNOME bugzilla and I included plenty of debugging information.

See http://bugzilla.gnome.org/show_bug.cgi?id=336614

  Jono

Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote : Pipeline debug

This is pipeline debugging with:

export GST_DEBUG=*:5
export GST_DEBUG_NO_COLOR=1
gst-launch-0.10 alsasrc device=default ! flacenc ! filesink location=flac.flac

Last lines I could grab it. Most interesting part IMHO is
LOG (0x81e3ab0 - 0:00:03.020496000) GST_REFCOUNTING(32500) gstobject.c(364):gst_object_ref:<alsasrc0> 0x81c6078 ref 2->3
DEBUG (0x81e3ab0 - 0:00:03.020567000) basesrc(32500) gstbasesrc.c(1195):gst_base_src_get_range:<alsasrc0> calling create offset 18446744073709551615 0
LOG (0x81e3ab0 - 0:00:03.020660000) GST_BUFFER(32500) gstbuffer.c(239):gst_buffer_init: init 0x81f7a98
LOG (0x81e3ab0 - 0:00:03.020722000) GST_BUFFER(32500) gstbuffer.c(262):gst_buffer_new: new 0x81f7a98
LOG (0x81e3ab0 - 0:00:03.020786000) GST_BUFFER(32500) gstbuffer.c(288):gst_buffer_new_and_alloc: new 0x81f7a98 of size 1764
DEBUG (0x81e3ab0 - 0:00:03.020849000) ringbuffer(32500) gstringbuffer.c(1299):gst_ring_buffer_read: pointer at 0, sample 0, read from 0-0, len 441, diff 0, segtotal 13, segsize 1764
DEBUG (0x81e3ab0 - 0:00:03.020938000) ringbuffer(32500) gstringbuffer.c(1129):wait_segment:<audiosrcringbuffer0> not allowed to start
DEBUG (0x81e3ab0 - 0:00:03.021002000) ringbuffer(32500) gstringbuffer.c(1347):gst_ring_buffer_read:<audiosrcringbuffer0> stopped processing
LOG (0x81e3ab0 - 0:00:03.021064000) GST_REFCOUNTING(32500) gstminiobject.c(293):gst_mini_object_unref: 0x81f7a98 unref 1->0
LOG (0x81e3ab0 - 0:00:03.021125000) GST_BUFFER(32500) gstbuffer.c(182):gst_buffer_finalize: finalize 0x81f7a98
DEBUG (0x81e3ab0 - 0:00:03.021191000) baseaudiosrc(32500) gstbaseaudiosrc.c(369):gst_base_audio_src_create: ringbuffer stopped
DEBUG (0x81e3ab0 - 0:00:03.021257000) basesrc(32500) gstbasesrc.c(1410):gst_base_src_loop:<alsasrc0> pausing task, reason wrong-state
DEBUG (0x81e3ab0 - 0:00:03.021332000) task(32500) gsttask.c(458):gst_task_pause:<task0> Pausing task 0x81e4460
LOG (0x81e3ab0 - 0:00:03.021398000) GST_REFCOUNTING(32500) gstobject.c(412):gst_object_unref:<alsasrc0> 0x81c6078 unref 3->2

Revision history for this message
Daniel T Chen (crimsun) wrote :

Would those of you experiencing this bug please attach output from ``tail -2 /proc/asound/oss/sndstat''?

Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote :

result of 'trail -2 /proc/asound/oss/sndstat':
1: mixer10
2: Realtek ALC650E

I have two cards (lspci):
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50) (Builtin card)
0000:00:14.0 Multimedia audio controller: VIA Technologies Inc. ICE1712 [Envy24] PCI Multi-Channel I/O Controller (rev 02) (Terratech EWS88MT)

Revision history for this message
Vytas (vytas) wrote :

$ tail -2 /proc/asound/oss/sndstat
Mixers:
0: Realtek ALC880

$ cat /proc/asound/cards
0 [Intel ]: HDA-Intel - HDA Intel
                     HDA Intel at 0xffa3c000 irq 169

$ cat /proc/asound/pcm
00-00: ALC880 Analog : ALC880 Analog : playback 1 : capture 2
00-01: ALC880 Analog : ALC880 Analog : capture 2

Revision history for this message
Jono Bacon (jonobacon) wrote : Debug output when trying to record with Sound Recorder

To provide some debugging info, I did this:

export GST_DEBUG=*:5
export GST_DEBUG_NO_COLOR=1
gnome-sound-recorder noinput.txt 2>&1

Revision history for this message
Mante (mante) wrote :

SAME FOR ME. Doesn't work. I'm trying on a note pc. Panasonic Cf-Y4.
Here are the test i tried.
Launching from console gstreamer-properties
I receive:
gstreamer-properties-Message: Skipping unavailable plugin 'artsdsink'
gstreamer-properties-Message: Skipping unavailable plugin 'polypsink'
gstreamer-properties-Message: Skipping unavailable plugin 'sdlvideosink'
gstreamer-properties-Message: Skipping unavailable plugin 'v4lmjpegsrc'
gstreamer-properties-Message: Skipping unavailable plugin 'qcamsrc'
gstreamer-properties-Message: Skipping unavailable plugin 'v4l2src'
gstreamer-properties-Message: Skipping unavailable plugin 'esdmon'
gstreamer-properties-Message: Skipping unavailable plugin 'polypsrc'

Audio output works but If I select
both alsa (alsasrc) or oss (osssrc) I receive n error message that the test pipeline cannot be created.

I don't quite understand the meaning of the test above, however

gst-launch-0.10 alsasrc device=default ! flacenc ! filesink location=flac.flac

produce:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: audioclock0

I must press ctrl-c to stop
----------------------------------------------------------
tail -2 /proc/asound/oss/sndstat

Mixers:
0: SigmaTel STAC9750,51
----------------------------------------------------------
 cat /proc/asound/cards
0 [ICH6 ]: ICH4 - Intel ICH6
                     Intel ICH6 with STAC9750,51 at 0xb0040800, irq 209
---------------------------------------------------------

cat /proc/asound/pcm
00-00: Intel ICH : Intel ICH6 : playback 1 : capture 1
00-01: Intel ICH - MIC ADC : Intel ICH6 - MIC ADC : capture 1
00-02: Intel ICH - MIC2 ADC : Intel ICH6 - MIC2 ADC : capture 1
00-03: Intel ICH - ADC2 : Intel ICH6 - ADC2 : capture 1
00-04: Intel ICH - IEC958 : Intel ICH6 - IEC958 : playback 1

Hope can help!

Revision history for this message
j^ (j) wrote :

i juist recocmpiled gst-plugins-base0.10-0.10.5 without
10_audiosink-lockup.patch
and it works again...

Revision history for this message
j^ (j) wrote : update 10_audiosink-lockup.patch to not break alsasrc

adds another change from cvs to make alsasrc work again.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the patch, that upload fixes the issue:

 gst-plugins-base0.10 (0.10.5-0ubuntu3) dapper; urgency=low
 .
   * debian/patches/10_audiosink-lockup.patch:
     - patch update by j^ <email address hidden>, fix alsasrc (Ubuntu: #34597, #35733)

Changed in gst-plugins:
status: Unconfirmed → Fix Released
Revision history for this message
Pēteris Krišjānis (pecisk-gmail) wrote :

I can confirm that it works now. Thanks j^ for fixing and everyone for debug info.

Revision history for this message
Jono Bacon (jonobacon) wrote :

Likewise. Works fine here now. Thanks! :)

Changed in gst-plugins:
status: Unconfirmed → Fix Released
Changed in gstreamer:
importance: Unknown → Medium
status: Invalid → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.