[pulseaudio-discuss] Change sound via acpid
John W
jwdevel at gmail.com
Wed Dec 30 23:13:54 PST 2015
On 12/30/15, John W <jwdevel at gmail.com> wrote:
> On 12/22/15, Tanu Kaskinen <tanuk at iki.fi> wrote:
>>
>> amixer -c0 set Master toggle
>>
>> "-c0" may refer to the wrong sound card, though (and it may refer to a
>> different sound card after rebooting). "-cNAME" is better, where NAME
>> is the sound card name shown in brackets in /proc/asound/cards.
>>
>
> I have tried the "-c" option, and it has ... "sort of" success (:
>
> ...
>
> I am not at the machine right now, but can provide the full output
> from that process later.
>
Here's that behavior I was describing:
$ amixer get Master # run as the "normal" user, who spawned pulseaudio
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 65536 [100%] [on]
Front Right: Playback 65536 [100%] [on]
$ # I can hear sound right now
$ sudo amixer -c 0 set Master mute
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 127
Mono: Playback 127 [100%] [0.00dB] [off]
$ # I hear no sound - this is good!
$ sudo amixer -c 0 set Master unmute
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 127
Mono: Playback 127 [100%] [0.00dB] [on]
$ # Alas, it is still muted ):
$ amixer get Master
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 65536 [100%] [off]
Front Right: Playback 65536 [100%] [off]
$ # Notice the [off] for the L/R outputs, above
$ amixer set Master unmute
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 65536 [100%] [on]
Front Right: Playback 65536 [100%] [on]
$ # Now, I can hear sound again. But I had to run a non-root
command to do that.
-John
More information about the pulseaudio-discuss
mailing list