This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 502293 - Cannot capture audio directly from PCM channel
Cannot capture audio directly from PCM channel
Status: CLOSED DUPLICATE of bug 496200
Product: Fedora
Classification: Fedora
Component: alsa-utils (Show other bugs)
11
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Jaroslav Kysela
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-23 05:08 EDT by Davide Cescato
Modified: 2009-10-29 12:33 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-29 04:21:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Davide Cescato 2009-05-23 05:08:21 EDT
Description of problem:

I would like to have a complete capture of my GNOME session, including
both the images displayed on my screen and the sound played by my
speakers. recordmydesktop does the job well as far as video capture is
concerned, but audio capture does not work as I wish. I would like
recordmydesktop to capture the sound from the PCM channel, but it
currently captures from the microphone(s) only.


Version-Release number of selected component (if applicable):

http://www.alsa-project.org/db/?f=e0516aa374b4fb12e42351e219a2cbf1ebd09c86

F11 rawhide updated as of 2009-05-22. Here are the versions of a few packages I estimate as relevant:
kernel-2.6.29.3-155.fc11.x86_64
alsa-lib-1.0.20-1.fc11.x86_64
alsa-utils-1.0.20-3.fc11.x86_64
pulseaudio-0.9.15-11.fc11.x86_64
alsa-plugins-pulseaudio-1.0.18-3.fc11.x86_64
gstreamer-0.10.22-3.fc11.x86_64
gtk-recordmydesktop-0.3.8-1.fc11.noarch
recordmydesktop-0.3.8.1-1.fc11.x86_64
gnome-media-2.26.0-6.fc11.x86_64
gst-mixer-2.26.0-2.fc11.x86_64


How reproducible:

always


Steps to Reproduce:

1. run rgtk-recordMyDesktop
2. start recording with sound
3. try again after changing settings in alsamixer -c0

  
Actual results:

Sound capture always goes through the active microphone (be it the notebook's internal microphone or a plugged-in external microphone). There is no way to capture the PCM channel directly. alsamixer -c0 does not offer a "CAPTUR" switch on the PCM channel.


Expected results:

Possibility to capture audio from directly the PCM channel and not from the active microphone.


Additional info:

The notebook is a Lenovo Thinkpad W500.

If I run alsamixer -c0, I see the following information:
Card: HDA Intel
Chip: Conexant CX20561 (Hermosa)

The following things are quite puzzling to me:
* the channels for the three microphones (internal, external, docking)
  appear under "Playback" but not under "Capture"
* none of the channels (including PCM) has a "capture" switch

If I run alsamixer without the -c0 option, I get only
Card: PulseAudio
Chip: PulseAudio
with a single "Master" playback channel and a single (switchable)
"Capture" channel.

I suspect the source of the problem lies within alsa, but it could
also be pulseaudio, or even gstreamer?

I also wonder if bug 487794 is related, since it is about a Conexant cx20561 (Hermosa) codec. I am not affected by that bug, though.
Comment 1 Davide Cescato 2009-06-06 04:53:19 EDT
Since there was no reaction so far, I wonder if I have filed the bug under the correct component. Should it be reassigned to alsa-lib, gnome-media, gstreamer, pulseaudio?
Comment 2 Jaroslav Kysela 2009-06-06 05:13:16 EDT
The hardware does not support requested feature (unless you turn on analog loopback which is also not supported on all codecs - see 'amixer controls').

You can obtain playback PCM stream using tee plugin (alsa-lib) or use snd-aloop kernel driver.

Regarding PA - I don't know if it's possible to capture playback stream in PA.
Comment 3 Bug Zapper 2009-06-09 12:25:28 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Davide Cescato 2009-06-10 17:46:48 EDT
Thanks for your reply. It looks like there is no 'Analog Loopback' mixer control with my codec, as 'amixer controls' returns
numid=4,iface=MIXER,name='Master Playback Switch'
numid=3,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'

So I have to try the other two options. Could you point me to some documentation about the ALSA tee plugin? 

And... Could you please confirm that snd-aloop is not packaged for Fedora? If this is the case, I will mark this bug as a duplicate of bug 496200.
Comment 5 Jaroslav Kysela 2009-07-29 04:21:14 EDT
alsa-lib example (the string after -D is device name for alsa-lib):

aplay -D tee:SLAVE=\"plughw:0\",FILE=/tmp/abcd.raw <some_wav_file>

And yes, snd-aloop is not in mainstream or Fedora kernels.

*** This bug has been marked as a duplicate of bug 496200 ***
Comment 6 Brandon 2009-10-29 12:33:16 EDT
I think that snd-aloop is not in the kernel because of pulse-audio..

I installed pavucontrol. pulseaudio volume control


launch pavcontrol, select input devices.

select the drop down menu at the bottom right and select 'all input devices'

then you will see 'monitor of <your sound card>' my was SB Audigy so I selected that.

then I used pulse to record in recordmydesktop and It worked I had sound. that is if you want to record sound from your desktop and not from your microphone, if you want your microphone select the device that is your microphone.

Note You need to log in before you can comment on or make changes to this bug.