Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set the default sound card in Linux system

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report