Longer title: wiki not yet edittable but is now wrong in some sections. These are tests run on 64 bit 11.1.x GOAL for intel analog users with
aplay -l
showing analog is card 1, swap the index.
Goal 2 so aplay -l will show analog has card 0 and if no pulseaudio is running....alsamixer will show analog mixer levels. You can still run pulseaudio but then you will need
alsamixer -c0
Unless specified below, assume no ~/.asoundrc, no /etc/asound.conf, no entry for intel in /etc/modprobe.conf, no script autoload with Desktop, no entry for intel in bootlocal.sh, no blacklist bootcode. Each test is independent of files for the other tests, but I will mention if I re-use some files. It is deliberate that I have named files with different names to help trouble-shoot if needed.
FAILS=aplay -l shows analog on card 1 or higher........PASS=aplay -l shows analog on card=0
Test 1 FAILS
Boot with bootcode of blacklist=snd_hda_intel
alsaconfig and alsa in your boot list
Manually load intel module by
$ sudo modprobe snd_hda_intel index=1
Test 2 FAILS
alsaconfig and alsa in your boot list
$ echo '/sbin/modprobe -r snd_hda_intel
/sbin/modprobe snd_hda_intel index=1' >> /opt/bootlocal.sh
Reboot with backup enabled
Test 3 FAILS
alsaconfig and alsa in your boot list
Create a home asoundrc config with
$ echo 'pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
} ' > ~/.asoundrc
https://www.alsa-project.org/wiki/AsoundrcThere are more complicated configs that can be made. This is just to swap cards.
Reboot with backup enabled
Test 4 FAILS
alsaconfig and alsa in your boot list
$ sudo echo 'options snd_hda_intel index=1 ' >> /etc/modprobe.conf && echo 'etc/modprobe.conf ' >> /opt/.filetool.lst
Reboot with backup enabled.
Test 5 PASS
Remove alsa-config and alsa from boot list
Keep /etc/modprobe.conf and /opt/.filetool.lst
Reboot with backup enabled
Manually load TCEs with
$ tce-load -i alsa-config alsa
###########################
Independent now save mixer levels
###########################
ref
https://linux.die.net/man/1/alsactlWith test 5 success time to save mixer levels by
alsamixer
# set your mixer levels, if you see your analog device
# press ESCape key to exit alsamixer
$ sudo alsactl store && echo 'usr/local/etc/alsa/asound.state' >> /opt/.filetool.lst
Test 6 PASS
No reboot
Keep /etc/modprobe.conf and /opt/.filetool.lst
$ echo '#!/bin/sh
tce-load -i alsa-config alsa
sudo alsactl restore ' > ~/.local/bin/intel && chmod 744 ~/.local/bin/intel
Reboot with backup enabled
$ intel
Test 7 for non-wayland users PASS.................This is my current setupReboot
Keep /etc/modprobe.conf, /opt/.filetool.lst and ~/.local/bin/intel
echo '~/.local/bin/intel ' > ~/.X.d/intel-swap && chmod 644 ~/.X.d/intel-swap
Reboot with backup enabled
In case its not obvious, test 7 means that on each boot up,
alsamixer shows card 0
aplay -l shows analog with card index=0
and my mixer levels are correct.
No alsa-config nor alsa are in my boot list
and I have files:
~/.X.d/intel-swap
~/.local/bin/intel
/etc/modprobe.conf
/opt/.filetool.lst
/usr/local/etc/alsa/asound.state
/opt/.filetool.lst reads (in addition to your other lines)
etc/modprobe.conf
usr/local/etc/alsa/asound.state
~/.local/bin/intel reads
#!/bin/sh
tce-load -i alsa-config alsa
sudo alsactl restore
~/.X.d/intel-swap reads
~/.local/bin/intel
/etc/modprobe.conf reads
options snd_hda_intel index=1
Hope this helps.