[ltp] Volume buttons turn microphone on
Phil
linux-thinkpad@linux-thinkpad.org
Fri, 11 May 2007 14:37:45 +0100
Thanks. I'll give amixer a look.
Skype offers both ALSA and OSS as possibles, I've got mine set to ALSA.
However what I really want to know is how the volume buttons cause my
sound levels to be set. If I knew that I could intercept and stop it
messing with the mike and instead mess with the master volume (probably
using amixer).
Cheers
Phil
Richard Neill wrote:
>
>
> Phil wrote:
>> Hi
>>
>> I'm running Ubuntu 7.04 on a T60 2007-63G. Everything seems to work
>> well (although suspend to ram failed today for the first time :-( but
>> I have a problem with the keyboard volume buttons. Instead of
>> raising/lowering Master volume they raise/lower the Playback
>> Microphone volume. Looking in /etc/acpi it seems that the button
>> presses fire the vol[up|down]btn.sh scripts, which use acpi_fakekey
>> to insert a KEY_VOLUMEUP/DOWN keypress, but I can't work out what
>> happens next.
>>
>> Incidentally initiating a call on skype also frigs with the
>> microphone recording settings - reducing the level so that the other
>> party can't hear what I'm saying, but I can't anywhere to configure
>> this.
>
> amixer is probably what you want here - you can use it to fix the
> mixer as you want it - just discard existing scripts.
>
> As for skype, I think skype uses the OSS sound system, not ALSA. THat
> means that it uses a different interface, and probably requires
> exclusive access to the sound card. How about a wrapper script:
> skypewrapper.sh
>
>
> #!/bin/bash
> alsactl -f levels.tmp store #save mixer levels
> skype &
> skype_pid=$! #pid of skype
> sleep 1
> amixer sset [SOMETHING] #fix the Mic levels.
> wait $skype_pid #wait for skype to close
> alsactl -f levels.tmp store #restore mixer levels
>
>
> Or, you could try ekiga instead.
>
> HTH,
>
> Richard