Changes between Version 2 and Version 3 of ventana/audio
- Timestamp:
- 06/30/2020 07:08:52 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ventana/audio
v2 v3 26 26 ==== Line Level Audio Output 27 27 common {{{amixer}}} settings for Analog audio output (make sure to look at {{{/proc/asound/cards}}} to find the correct device number to use with the -c option below): 28 * Determine Device number: 29 {{{#!bash 30 # cat /proc/asound/cards 31 0 [DWHDMI ]: dw-hdmi-ahb-aud - DW-HDMI 32 DW-HDMI rev 0x0a, irq 22 33 1 [sgtl5000audio ]: sgtl5000-audio - sgtl5000-audio 34 sgtl5000-audio 35 2 [tda1997xaudio ]: tda1997x-audio - tda1997x-audio 36 tda1997x-audio 37 # card=$(cat /proc/asound/cards | grep sgtl5000audio | awk '{ print $1}') 38 }}} 39 - the above output shows that device '0' is HDMI out, device '1' is analog audio in/out, and device '2' is HDMI audio in. This device numbering can change from kernel to kernel depending on driver init order so we use grep and awk to get the card number for the 'sgtl5000audio' device 28 40 * Output (Line out) 29 41 {{{#!bash 42 # get card number for sgtl5000audio device 43 card=$(cat /proc/asound/cards | grep sgtl5000audio | awk '{ print $1}') 30 44 # unmute output 31 amixer -c 0sset Lineout on45 amixer -c $card sset Lineout on 32 46 # set output level to max 33 amixer -c 0sset PCM 100%47 amixer -c $card sset PCM 100% 34 48 }}} 35 49 * Input (Line in) 36 50 {{{#!bash 51 # get card number for sgtl5000audio device 52 card=$(cat /proc/asound/cards | grep sgtl5000audio | awk '{ print $1}') 37 53 # set capture mux 38 amixer -c 0sset "Capture Mux" LINE_IN39 amixer -c 0sset "Line In Function" on54 amixer -c $card sset "Capture Mux" LINE_IN 55 amixer -c $card sset "Line In Function" on 40 56 # set capture gain 41 amixer -c 0sset "Capture" 857 amixer -c $card sset "Capture" 8 42 58 # enable it 43 amixer -c 0sset "Capture" cap59 amixer -c $card sset "Capture" cap 44 60 }}} 45 61 … … 52 68 common {{{amixer}}} settings for headphone level audio: 53 69 {{{#!bash 70 # get card number for sgtl5000audio device 71 card=$(cat /proc/asound/cards | grep sgtl5000audio | awk '{ print $1}') 54 72 # Set zero cross detect gain 55 amixer -c 0sset Headphone Playback ZC 60%73 amixer -c $card sset Headphone Playback ZC 60% 56 74 # unmute output 57 amixer -c 0sset Headphone on75 amixer -c $card sset Headphone on 58 76 # set output level to max 59 amixer -c 0sset PCM 100%77 amixer -c $card sset PCM 100% 60 78 }}} 61 79