18 | | == Devices == |
19 | | The following commands are useful when dealing with multiple audio devices (These commands are done on a GW5400 which has multiple sources of audio in/out - different boards will have different devices at varied locations): |
20 | | * see a list of all audio cards: |
21 | | {{{ |
22 | | $ cat /proc/asound/cards |
23 | | 0 [sgtl5000audio ]: sgtl5000-audio - sgtl5000-audio |
24 | | sgtl5000-audio |
25 | | 1 [tda1997xaudio ]: tda1997x-audio - tda1997x-audio |
26 | | tda1997x-audio |
27 | | 2 [imxhdmisoc ]: imx-hdmi-soc - imx-hdmi-soc |
28 | | imx-hdmi-soc |
29 | | }}} |
30 | | * There are 3 audio cards in the system: |
31 | | * 0: sgtl5000audio (Analog Audio in/out) |
32 | | * 1: tda1997xaudio (HDMI Audio in) |
33 | | * 2: imxhdmisoc (HDMI Audio out) |
34 | | * Note that this is only available for playback if the framebuffer is not blanked |
35 | | * see a list of all playback devices: |
36 | | {{{ |
37 | | $ aplay -l |
38 | | **** List of PLAYBACK Hardware Devices **** |
39 | | card 0: sgtl5000audio [sgtl5000-audio], device 0: HiFi sgtl5000-0 [] |
40 | | Subdevices: 1/1 |
41 | | Subdevice #0: subdevice #0 |
42 | | card 2: imxhdmisoc [imx-hdmi-soc], device 0: IMX HDMI TX mxc-hdmi-soc-0 [] |
43 | | Subdevices: 1/1 |
44 | | Subdevice #0: subdevice #0 |
45 | | }}} |
46 | | * the above shows 2 playback capable devices: |
47 | | * card 0: the sgtl5000audio device which has one subdevice (0) - this can be represented as 'hw:0,0' |
48 | | * card 2: the imxhdmisoc device which has one subdevice (0) - this can be represented as 'hw:2,0' |
49 | | * Note that card 1 is not listed as it is an HDMI Audio input only and not capable of playback |
50 | | * see a list of all playback device 'names' |
51 | | {{{ |
52 | | $ aplay -L |
53 | | null |
54 | | Discard all samples (playback) or generate zero samples (capture) |
55 | | sysdefault:CARD=sgtl5000audio |
56 | | sgtl5000-audio, |
57 | | Default Audio Device |
58 | | sysdefault:CARD=imxhdmisoc |
59 | | imx-hdmi-soc, |
60 | | Default Audio Device |
61 | | }}} |
62 | | * the above shows 3 playback devices shown by name (Note that this is the name what can be used with 'aplay -D <devicename>' to specify playback device): |
63 | | * null - a null device |
64 | | * sysdefault:CARD=sgtl5000audio - Analog audio out |
65 | | * sysdefault:CARD=imxhdmisoc - HDMI audio out |
66 | | * see a list of all capture devices: |
67 | | {{{ |
68 | | root@ventana:~# arecord -l |
69 | | **** List of CAPTURE Hardware Devices **** |
70 | | card 0: sgtl5000audio [sgtl5000-audio], device 0: HiFi sgtl5000-0 [] |
71 | | Subdevices: 1/1 |
72 | | Subdevice #0: subdevice #0 |
73 | | card 1: tda1997xaudio [tda1997x-audio], device 0: IMX HDMI RX tda1997x-0 [] |
74 | | Subdevices: 1/1 |
75 | | Subdevice #0: subdevice #0 |
76 | | }}} |
77 | | * the above shows 2 capture capable devices: |
78 | | * card 0: the sgtl5000audio device which has one subdevice (0) - this can be represented as 'hw:0,0' |
79 | | * card 1: the tda1997xaudio device which has one subdevice (0) - this can be represented as 'hw:1,0' |
80 | | * Note that card 2 is not listed as it is an HDMI Audio output only and not capable of capture |
81 | | * see a list of all record device 'names': |
82 | | {{{ |
83 | | $ arecord -L |
84 | | null |
85 | | Discard all samples (playback) or generate zero samples (capture) |
86 | | sysdefault:CARD=sgtl5000audio |
87 | | sgtl5000-audio, |
88 | | Default Audio Device |
89 | | sysdefault:CARD=tda1997xaudio |
90 | | tda1997x-audio, |
91 | | Default Audio Device |
92 | | }}} |
93 | | * the above shows 3 capture devices shown by name (Note that this is the name what can be used with 'arecord -D <devicename>' to specify capture device): |
94 | | * 'null' - a null device |
95 | | * 'sysdefault:CARD=sgtl5000audio' - Analog audio in |
96 | | * 'sysdefault:CARD=tda1997xaudio' - HDMI audio in |
97 | | * display audio controls: |
98 | | {{{ |
99 | | amixer |
100 | | }}} |
101 | | * you can use the '-c <cardno>' parameter to amixer to specify a specific card (card number for /proc/asound/cards such as 'amixer -c 0' for the first card) |
102 | | * see 'amixer -h' for details on setting/getting various controls |
103 | | |
104 | | |
105 | | [=#amixer] |
106 | | == Mixer (mux/gain/volume) == |
107 | | The ALSA mixer controls the muxing of inputs to outputs, capture gains, and volume levels. The settings vary per card. |
108 | | |
109 | | You can use the amixer command to get/set/list available controls per card: |
110 | | * list controls for card0: |
111 | | {{{ |
112 | | amixer -c0 |
113 | | }}} |
114 | | |
115 | | |