Was it detected by the kernel?
# dmesg | grep 'ALC1220'
[ 85.701194] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC1220: line_outs=3 (0x1b/0x15/0x16/0x0/0x0) type:line
Which card number is it?
# grep -l ALC1220 /proc/asound/card*/codec*
/proc/asound/card1/codec#0
Hence, card1.
Create ~/.asoundrc
making card 1 the default:
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
Install alsa-utils
:
# pacman -S alsa-utils
Check if your ~/.asoundrc
worked by running:
# alsamixer
And notice how in the top-left corner is says "Chip: Realtek ALC1220".
You can just press ESC and unmute from the command line:
# amixer -- sset Master playback -6dB unmute
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 87
Mono: Playback 79 [91%] [-6.00dB] [on]
I'm actually not sure why it says 'Mono' here, but I think because you can't change the volume of left and right channels separately. I get the same output on my other linux box (while listening to stereo music on it).
Run a speaker test:
# speaker-test -c 2
speaker-test 1.2.2
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 8544000
Period size range from 32 to 4272000
Using max buffer size 8544000
Periods = 4
Unable to set hw params for playback: Cannot allocate memory
Setting of hwparams failed: Cannot allocate memory
Oh - that turns out to be broken in kernel 5.6. Might be fixed in 5.7-rc2 and up (I didn't test that; if anyone knows when it is fixed please add in a comment). EDIT: currently on 5.6.13 and this works again.
Instead I ran aplay
on some wav. And it worked.
Or no, it did not.
I got:
# aplay Checkmate.wav
Playing WAVE 'Checkmate.wav' : Unsigned 8 bit, Rate 48000 Hz, Stereo
aplay: set_params:1343: Sample format non available
Available formats:
- S16_LE
- S32_LE
I am not happy with this, but in the meantime worked around whatever is the issue by changing my ~/.asoundrc
to:
pcm.!default {
type plug
slave {
pcm "hw:1,0"
}
}
ctl.!default {
type hw
card 1
}
And then it worked.
EDIT: currently using instead the following ~/.asoundrc
:
# Convert alsa API over jack API.
# For use with for example,
# aplay foo.wav
# or running flash.
# Use this as default.
pcm.!default {
type plug
slave { pcm "jack" }
}
ctl.mixer0 {
type hw
card 1
}
# pcm type jack
pcm.jack {
type jack
playback_ports {
0 system:playback_1
1 system:playback_2
}
capture_ports {
0 system:capture_1
1 system:capture_2
}
}
which is what you want to use when you use JACK to connect to ALSA.
This makes other applications that normally connect to ALSA connect
to JACK instead. Using JACK is a whole new can of worms though, so don't do that until you have everything working smoothly with just pulseaudio.
--End of EDIT
As I am running 5.6.10-arch1-1
my guess is that Christian's patch already made it into my kernel (thanks!).