The application doesn't recognise headphones

Bug #1009930 reported by Ricardo Hernández
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Audio Recorder
Fix Released
Medium
moma

Bug Description

When i plug my headphones, gnome (and pulseaudio) changes my default output to headphones and disabling the speakers. The problems is that audio-recorder doesn't show the headphones as an alternative to choose. It only choose the microphone and the internal speakers

One example is that i'm using audio-recorder with clementine to record some radio streaming. The folders are created perfectly for each song it is playing but no sound is recorded really.

I guess is an issue in how you query the pulseaudio sinks, because it actually changes dinamically when i connect and disconnect my headphones

For the record i'm using Ubuntu 12.04 with default Unity

description: updated
moma (osmoma)
Changed in audio-recorder:
importance: Undecided → Medium
assignee: nobody → moma (osmoma)
Revision history for this message
moma (osmoma) wrote :
Download full text (3.2 KiB)

Hello Ricardo,
Would you like to test the devices and recording from the command line?

0) First, take a listing of available "Source" devices with the "pactl" command.
pactl comes from the "pulseaudio-utils" package, so apt-get it first.

$ pactl list | grep -A2 'Source #'
Notice that the "Source" word may have been translated to your language (depending on the language setting), so check the listing with "pactl list" command first.

1) Now you should have the device names.
Re-check the listing *with* or *without* your headphones plugged in. [ I believe the device listing is exactly the same, unless your headphone has also a microphone and you connect it to the USB-connector.]

Do you simply connect your headphones to the 3.5mm headphone jacket? Like this one? http://www.phonescoop.com/glossary/term.php?gid=440

This is the device listing from my computer. I show only the device names/ids here. Ok?
$ pactl list | grep -A2 'Source #'
Name: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
(sound card we can record from).

Name: alsa_input.pci-0000_00_1b.0.analog-stereo
(mic input on a sound card).

Name: alsa_output.pci-0000_06_01.0.analog-stereo.monitor
(sound card we can record from).

Name: alsa_input.pci-0000_06_01.0.analog-stereo
(mic input on a sound card).

Name: alsa_input.usb-Creative_Ltd._VF0610_WebCam<snip>.analog-mono
(webcam with microphone).

Some device names end with a ".monitor" label. These IDs can tap (record) audio from a real audio-card. Eg. in my case the output device is "alsa_output.pci-0000_00_1b.0.analog-stereo" (not shown in the Source listing). This is the real sound-card with loudspeakers. This is Output only. We CANNOT record from it. BUT we can record from its ".monitor" device that is "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor". Ok?

2) Now, test the recording with various device names.
Create a GStreamer pipeline for recording. Take the device id for the above listing and put it into the device="xxxx" argument. Like this:

$ gst-launch-0.10 pulsesrc device="alsa_output.pci-0000_06_01.0.analog-stereo.monitor" ! queue ! audioconvert ! vorbisenc ! oggmux ! filesink location=test.oga

Play some music or speak to the microphone, etc!
Notice: the gst-launch command comes from "gstreamer0.10-tools" package. Sudo apt-get it.

Here the filesink location="test.oga", so it outputs OGG audio to test.oga file. Replay it:
$ totem test.oga

Other samples of GStreamer pipelines for recording with various file formats:
http://ubuntuforums.org/showpost.php?p=9589123&postcount=4

Please check also this guide:
http://www.oz9aec.net/index.php/gstreamer/365-pulseaudio-device-names

Please reply and post your findings here.
-----
3) Check also this.
You may need to change the sound configuration on some computer systems. Please take a look at this picture.
http://bildr.no/image/1168830.jpeg
Install and start "pavucontrol" and set the configuration to "Analog Stereo Output" and test the recording. This may fix the recording if you get "empty" audio files. Unfortunately "Analog Stereo Output" will disable microphone input etc. I've seen cases where simply changing the settings back and forth and saving'em helps to...

Read more...

Changed in audio-recorder:
status: New → Incomplete
Revision history for this message
Ricardo Hernández (richerve) wrote :

Thank you a lot for a complete response and sorry because i didn't have time to reply before

The fact is that when i restart my laptop, it works perfectly. Maybe i was updating the system and pulseaudio was updating too.

I install pactl and confirm what are you saying, because this is a laptop it only shows "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" when headphones are connected or disconnected.

The application works great now, and i like it a lot, congratulations for a good work

Revision history for this message
moma (osmoma) wrote : Re: [Bug 1009930] Re: The application doesn't recognise headphones

Very good Ricardo.
You are always welcome to send me suggestions and modifications.

Off topic:
I do also work with a desktop-radio that can interact with the recorder.
Here is a pretty good station list: http://home.online.no/~osmoma//radio/ to
begin with.

Bom fim de semana
Osmo Antero

On Sat, Jun 9, 2012 at 3:01 AM, Ricardo Hernández <
<email address hidden>> wrote:

> Thank you a lot for a complete response and sorry because i didn't have
> time to reply before
>
> The fact is that when i restart my laptop, it works perfectly. Maybe i
> was updating the system and pulseaudio was updating too.
>
> I install pactl and confirm what are you saying, because this is a
> laptop it only shows "alsa_output.pci-0000_00_1b.0.analog-
> stereo.monitor" when headphones are connected or disconnected.
>
> The application works great now, and i like it a lot, congratulations
> for a good work
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1009930
>
> Title:
> The application doesn't recognise headphones
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/audio-recorder/+bug/1009930/+subscriptions
>
>

moma (osmoma)
Changed in audio-recorder:
status: Incomplete → Fix Released
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.