How to set the default sound card in Linux system
This article mainly introduces the Linux system how to set the default sound card, the article is very detailed, has a certain reference value, interested friends must read it!
One: use the command line to view: orangepi@orangepi3:~$ ll / proc/asound/ total 0 dr-xr-xr-x 4 root root 0 Dec 23 02:58. / dr-xr-xr-x 178 root root 0 Jan 1 1970.. / dr-xr-xr-x 4 root root 0 Dec 23 11:02 card0/ dr-xr-xr-x 4 root root 0 Dec 23 11:02 card1/-Rafael-1 root root 0 Dec 23 11:02 cards- Rkashi root root-1 root root 0 Dec 23 11:02 devices-RQM-1 root root 0 Dec 23 11:02 hwdep-RQM-RQM-1 root root 0 Dec 23 11:02 pcm lrwxrwxrwx 1 root root 5 Dec 23 11:02 sndacx00codec-> card1/ lrwxrwxrwx 1 root root 5 Dec 23 11:02 sndhdmi-> card0/-Rafael-1 root root 0 Dec 23 11:02 timers-Rafael- RMui root root-1 root root 0 Dec 23 11:02 version can see that my Linux has two sound cards (sndhdmi and sndacx00-codec)
Second: use alsamixer to view and install a program first
After sudo apt-get install alsa-base-y alsamixer executes the above command, an interface appears, and then press F6
┌── AlsaMixer v1.1.3 ──┐ │ Card: sndacx00-codec F1 : Help │ │ Chip: F2: System information │ │ View: F3: [Playback] F4: Capture F5: All F6: Select sound card │ │ Item: Line Out Mixer [dB gain: 6.00] Esc: Exit │ │ ┌──┐ │▒▒│ │▒▒│ │▒▒│ │▒▒│ │▒▒│ → │ │▒▒┌─ Sound Card ─┐▒▒│ → │ │▒▒│ │▒▒│ │▒▒│ │▒▒│-(default) │▒▒│ → │ │▒▒│ 0 sndhdmi │▒▒│ → │ │▒▒│ │▒▒│ │▒▒│ │▒▒│ 1 sndacx00-codec │▒▒│ → │ │▒▒│ enter device name... │▒▒│ → │ │▒▒│ │▒▒│ │▒▒│ │▒▒└───┘▒▒│ → │ │▒▒│ → │ │▒▒│ → │ │▒▒│ │▒▒│ │▒▒│ │▒▒│ └──┘ └ ──┘ └──┘ ┌──┐ │ MM │ │ OO │ │ OO │ └──┘ │ │ 100100 100100 100100 100 │ │ I2S Mixe I2S Mixe ADC Inpu DAC Mixe DAC Mxie LINEOUT Left DAC Left DAC Left I2S │ │ │ └── ─┘ can see that my Linux has two sound cards (sndhdmi and sndacx00-codec)
Three: use alpay to view orangepi@orangepi3:~$ aplay-l * List of PLAYBACK Hardware Devices * card 0: sndhdmiraw [sndhdmi], device 0: SUNXI-HDMIAUDIO audiohdmi-dai-0 [] Subdevices: 1 Subdevice # 0: subdevice # 0 card 1: sndacx00codec [sndacx00-codec], device 0: SUNXI-AUDIO acx00-dai-0 [] Subdevices: 1 Subdevice # 0: subdevice # 0 you can see that my Linux has two sound cards (sndhdmi and sndacx00-codec)
Four: set the default sound card to modify the profile / etc/asound.conf
If you don't have this file, you can create it yourself.
The sudo touch / etc/asound.conf sudo vi / etc/asound.confasound.conf file is as follows
Defaults.ctl.card 1 defaults.pcm.card 1 defaults.timer.card 1 and above are all the contents of the article "how to set the default sound card in Linux system". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!