[pulseaudio-discuss] permanent microphone boost
Colin Guthrie
gmane at colin.guthr.ie
Mon May 3 05:27:57 PDT 2010
'Twas brillig, and Piscium at 03/05/10 12:19 did gyre and gimble:
> The output of the two commands is below, as you requested, separated by a line of asterisks.
>
> I thought of putting it in files and attaching them, though I don't know if the mailing list accepts attachments. Does it?
It does accept attachements, but if they get too big, it will require
moderation. It's not a problem in this case (although most mail clients
word wrap at 72ish characters, yours does not so it means the inline
paste is not mangled. Normally tho', your mail client should word wrap
at ~72 chars for general readability. In this case it's to our advantage
that it is not doing that :p
Anyway, on to the real issue:
First of all look at the sink (you'll see why in a moment):
> 1 sink(s) available.
> * index: 0
> name: <alsa_output.pci-0000_00_1f.5.analog-stereo>
> driver: <module-alsa-card.c>
> flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
> state: SUSPENDED
> suspend cause: IDLE
> priority: 9959
> volume: 0: 28% 1: 28%
> 0: -33.00 dB 1: -33.00 dB
> balance 0.00
> base volume: 63%
> -12.00 dB
> volume steps: 65537
> muted: no
> current latency: 0.00 ms
> max request: 0 KiB
> max rewind: 0 KiB
> monitor source: 1
> sample spec: s16le 2ch 44100Hz
> channel map: front-left,front-right
> Stereo
> used by: 0
> linked by: 0
> configured latency: 0.00 ms; range is 36.00 .. 371.52 ms
> card: 1 <alsa_card.pci-0000_00_1f.5>
> module: 5
> properties:
> alsa.resolution_bits = "16"
> .... snip ....
> ports:
> analog-output;output-amplifier-on: Analog Output / Amplifier (priority 9910)
> analog-output;output-amplifier-off: Analog Output / No Amplifier (priority 9900)
> analog-output-mono;output-amplifier-on: Analog Mono Output / Amplifier (priority 5010)
> analog-output-mono;output-amplifier-off: Analog Mono Output / No Amplifier (priority 5000)
> analog-output-lfe-on-mono;output-amplifier-on: Analog Output (LFE) / Amplifier (priority 4010)
> analog-output-lfe-on-mono;output-amplifier-off: Analog Output (LFE) / No Amplifier (priority 4000)
> active port: <analog-output;output-amplifier-on>
This list of ports is the interesting thing. As you can see the port
names are made up of a base name and some options. In this case the
basename is "analog-output" and the option is "output-amplifier-on".
This is basically PA interpreting various mostly indecipherable options
(to most mortals anyway) and trying to present a nice, friendly name to
the user to choose from.
Now let's look at the source:
> 3 source(s) available.
> * index: 2
> name: <alsa_input.pci-0000_00_1f.5.analog-stereo>
> driver: <module-alsa-card.c>
> flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
> state: SUSPENDED
> suspend cause: IDLE
> priority: 9959
> volume: 0: 67% 1: 67%
> 0: -10.50 dB 1: -10.50 dB
> balance 0.00
> base volume: 42%
> -22.50 dB
> volume steps: 65537
> muted: no
> current latency: 0.00 ms
> max rewind: 0 KiB
> sample spec: s16le 2ch 44100Hz
> channel map: front-left,front-right
> Stereo
> used by: 0
> linked by: 0
> configured latency: 0.00 ms; range is 0.50 .. 371.52 ms
> card: 1 <alsa_card.pci-0000_00_1f.5>
> module: 5
> properties:
> alsa.resolution_bits = "16"
> .... snip ....
> ports:
> analog-input-microphone;input-microphone-1: Analog Microphone / Microphone 1 (priority 10020)
> analog-input-microphone;input-microphone-2: Analog Microphone / Microphone 2 (priority 10019)
> analog-input-linein: Analog Line-In (priority 9000)
> analog-input: Analog Input (priority 9000)
> analog-input-video: Analog Video (priority 7000)
> active port: <analog-input-microphone;input-microphone-2>
What is interesting here is that the option to select the mic boost is
missing. THere should be a "mic-boost-on" option in there, but there is not.
This is the raw alsa mixer elment that this should control:
> Simple mixer control 'Mic Boost (+20dB)',0
> Capabilities: pswitch pswitch-joined penum
> Playback channels: Mono
> Mono: Playback [off]
It is parsed due to the rule in:
/usr/share/pulseaudio/alsa-mixer/paths/analog-input-mic.conf.common
near the end you should see a "Mic Boost (+20dB)".
I'm not sure why it's not filtering through to be a valid option here.
I don't fully understand the code that parses this so I'm not 100% sure
where the problem lies right now.
And just for reference to the sink case above for your understanding,
here is the External Amplifier raw mixer control that is turned into an
option for the sink ports:
> Simple mixer control 'External Amplifier',0
> Capabilities: pswitch pswitch-joined penum
> Playback channels: Mono
> Mono: Playback [on]
Like I say I'm not familiar with the code that does all this magic.
Hopefully someone more familair with it (e.g. Lennart!) can comment further.
I'd imagine they will need the following debug however:
Caveat: I presume you have not ~/.pulse/client.conf if you do, interpret
accordingly.
1. echo "autospawn=no" > ~/.pulse/client.conf
2. pulseaudio -k
3. pulseaudio -vvvvv
4. wait until the above settles.
5. ctrl+c
6. rm -f ~/.pulse/client.conf
7. start-pulseaudio-x11
Now copy+paste the output from step 3 to either this mail or a pastebin
etc. (attachment is probably preferred even if it gets stuck for a
little while waiting for moderation).
FWIW, some running apps may misbehave after doing this, so it's probably
best to reboot, but YMMV.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss
mailing list