So fett, ich richte Mikrofoneinstellungen ein:

$ amixer set "Rear Mic" 90% mute cap $ amixer set "Rear Mic Boost" 80% 

Aber danach einige sys. Update, meine Standard-Rekodierungs-Chanell wurde in "Front Mic" geändert:

$ amixer sget "Input Source" Simple mixer control "Input Source",0 Capabilities: cenum Items: "Front Mic" "Rear Mic" "Line" "CD" "Mix" Item0: "Front Mic" 

So ändern Sie "Input Source" bis "Read Mic" mit Amixer? (Derzeit mache ich es manuell mit alsamixer oder kmix – ich würde es gerne beim Start automatisieren).

Antwort

Ich habe gefunden Lösung hier:

dort habe ich gefunden:

$ amixer -c0 cset iface=MIXER,name="Input Source",index=1 "Front Mic" # (Record from Front Mic) 

leicht modifiziert entsprechend meiner Soundkarte und Einrichtung (Standard-Soundkarte, Bestellung verschiedener Artikel):

$ amixer cset name="Input Source",index=0 "Rear Mic" 

Antwort

Ich habe ein System, in dem ich Standard-Motherboard-Sound habe Karte + WebCAM-Soundkarte + externe USB-Soundkarte = Insgesamt 3 Soundkarten.

Jetzt möchte ich eine bestimmte Soundkarte von 3 stummschalten / die Stummschaltung aufheben. In diesem Fall kann ich dies mit der folgenden Methode tun:

zeige mir alle Karten im System

$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: CA0132 Analog [CA0132 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: U0x11110x2222 [USB Device 0x1111:0x2222], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0 

, also möchte ich die Karte 2 verwenden, die ein USB-Mikrofon und ein Lautsprecher
$ amixer -c2 Simple mixer control "Speaker",0 Capabilities: pvolume pswitch pswitch-joined penum Playback channels: Front Left - Front Right Limits: Playback 0 - 151 Mono: Front Left: Playback 44 [29%] [-20.13dB] [on] Front Right: Playback 44 [29%] [-20.13dB] [on] Simple mixer control "Mic",0 Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined penum Playback channels: Mono Capture channels: Mono Limits: Playback 0 - 32 Capture 0 - 16 Mono: Playback 32 [100%] [47.81dB] [on] Capture 16 [100%] [23.81dB] [on] Simple mixer control "Auto Gain Control",0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] 

Jetzt habe ich in dieser Soundkarte 4 Balken

1) Lautsprecher 2) Mikrofon 3) Mikrofon (Aufnahme) 4) Auto Gain

Mein Problem ist, wenn ich einfach Amixer sset Capture Cap oder Toggle mache, dann funktioniert es nicht.

Ich muss einen Weg verwenden, der alles für die Mikrofonaufnahme auf 0% und stumm schalten kann Wenn es erforderlich ist, setzen Sie es auf 70% zurück, ohne dies hatte ich keine Wahl mehr. Als ALSA-Fehler sollten sie so etwas wie pulseaudio pactl

# Now this does MUTE for device 2 $ amixer -c2 sset Mic 0dB Simple mixer control "Mic",0 Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined penum Playback channels: Mono Capture channels: Mono Limits: Playback 0 - 32 Capture 0 - 16 Mono: Playback 0 [0%] [0.00dB] [on] Capture 0 [0%] [0.00dB] [on] # Unmute for device 2 $ amixer -c2 sset Mic 70dB Simple mixer control "Mic",0 Capabilities: pvolume pvolume-joined cvolume cvolume-joined pswitch pswitch-joined cswitch cswitch-joined penum Playback channels: Mono Capture channels: Mono Limits: Playback 0 - 32 Capture 0 - 16 Mono: Playback 32 [100%] [47.81dB] [on] Capture 16 [100%] [23.81dB] [on] 

Antwort

hinzufügen Sie können den Parameter sset verwenden. Von man amixer:

 set or sset <SCONTROL> <PARAMETER> ... Sets the simple mixer control contents. The parameter can be the volume either as a percentage from 0% to 100% with % suffix, a dB gain with dB suffix (like -12.5dB), or an exact hardware value. The dB gain can be used only for the mixer elements with available dB information. When plus(+) or minus(-) letter is appended after volume value, the volume is incremented or decremented from the current value, respectively. The parameters cap, nocap, mute, unmute, toggle are used to change capture (recording) and muting for the group specified. The optional modifiers can be put as extra parameters to specify the stream direction or channels to apply. The modifiers playback and capture specify the stream, and the modifiers front, rear, center, woofer are used to spec‐ ify channels to be changed. A simple mixer control must be specified. Only one device can be controlled at a time. 

In Ihrem Fall sollte es so einfach sein wie ( NICHT GETESTET )

$ amixer sset "Input Source",0,"Rear Mic" 

Kommentare

  • Es funktioniert nicht $ amixer sset 'Input Source',0,'Rear Mic' gibt Folgendes zurück: Specify what you want to set....
  • Eine geringfügige Änderung von Herrn Shunz ' funktioniert für mich: $ amixer sset 'Input Source' 'Rear Mic' funktioniert für mich.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.