I created a drop-in file in my home directory
vi .asoundrc
Then created this config:
pcm.!default {
type hw
card 1
device 0
}
ctl.!default {
type hw
card 1
}
Based on:
aplay -l
with this output:
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CS4206 Analog [CS4206 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: CS4206 Digital [CS4206 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [LED Cinema]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Audio [Display Audio], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
Notes
- The audio player should be restarted
- I manage sound with
alsamixer
. Probably, it’s not the best setup, but I connect Apple Cinema almost never, and I don’t want to mess with pulseaudio or wireplumber as of now.
Based on this communication:
On Arch Linux, how would I change audio output to another source? I’m using ALSA.
On Arch Linux, using ALSA (Advanced Linux Sound Architecture), you can change the audio output to another source by following these steps:
1. List available audio devices
You can use the aplay
command to list all available audio devices:
aplay -l
This will output a list of your available audio cards and devices. Look for lines like this:
card 0: Device [ALSA Device], device 0: ALSA PCM
Note the card
and device
numbers for the output you want to switch to.
2. Configure ALSA to use a specific device
Once you have the card and device numbers, you can specify the default audio device by configuring the .asoundrc
file in your home directory or /etc/asound.conf
for system-wide settings.
For example, if you want to set the default to card 1
and device 0
, your .asoundrc
would look like this:
pcm.!default {
type hw
card 1
device 0
}
ctl.!default {
type hw
card 1
}
3. Test the new audio output
You can test if the new audio output is working by playing a test sound:
speaker-test -D default -c 2
4. Switch devices dynamically
You can also use alsamixer
to interactively switch between audio devices. Run:
alsamixer
Press F6
to select your desired sound card from the available list.
This should switch your audio output to the selected device.