General TC > General TC Talk

[wiki][intel analog] New tests and possible solution (test 7) to swap cards

(1/1)

aus9:
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
--- Code: ---aplay -l
--- End code ---
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
--- Code: ---alsamixer -c0
--- End code ---
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

--- Code: ---$ sudo modprobe snd_hda_intel index=1
--- End code ---

Test 2 FAILS
alsaconfig and alsa in your boot list

--- Code: ---$ echo '/sbin/modprobe -r snd_hda_intel
/sbin/modprobe snd_hda_intel index=1' >> /opt/bootlocal.sh
--- End code ---
Reboot with backup enabled

Test 3 FAILS
alsaconfig and alsa in your boot list
Create a home asoundrc config with

--- Code: ---$ echo 'pcm.!default {
        type hw
        card 1
}

ctl.!default {
        type hw           
        card 1
} ' > ~/.asoundrc

--- End code ---
https://www.alsa-project.org/wiki/Asoundrc
There 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

--- Code: ---$ sudo echo 'options snd_hda_intel index=1 ' >> /etc/modprobe.conf  && echo 'etc/modprobe.conf ' >> /opt/.filetool.lst 
--- End code ---

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

--- Code: ---$ tce-load -i alsa-config alsa
--- End code ---

###########################
Independent now save mixer levels
###########################
ref
https://linux.die.net/man/1/alsactl
With test 5 success time to save mixer levels by

--- Code: ---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 
--- End code ---


Test 6 PASS
No reboot
Keep /etc/modprobe.conf and /opt/.filetool.lst

--- Code: ---$ echo '#!/bin/sh
tce-load -i alsa-config alsa
sudo alsactl restore ' > ~/.local/bin/intel && chmod 744 ~/.local/bin/intel   
--- End code ---
Reboot with backup enabled

--- Code: ---$ intel
--- End code ---


Test 7 for non-wayland users PASS.................This is my current setup
Reboot
Keep /etc/modprobe.conf, /opt/.filetool.lst and ~/.local/bin/intel

--- Code: --- echo  '~/.local/bin/intel   ' > ~/.X.d/intel-swap && chmod 644 ~/.X.d/intel-swap
--- End code ---
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:

--- Quote ---~/.X.d/intel-swap
~/.local/bin/intel
/etc/modprobe.conf
 /opt/.filetool.lst
/usr/local/etc/alsa/asound.state
--- End quote ---

/opt/.filetool.lst reads (in addition to your other lines)

--- Quote ---etc/modprobe.conf
usr/local/etc/alsa/asound.state
--- End quote ---

~/.local/bin/intel  reads

--- Quote ---#!/bin/sh
tce-load -i alsa-config alsa
sudo alsactl restore
--- End quote ---

~/.X.d/intel-swap reads

--- Quote ---~/.local/bin/intel
--- End quote ---

/etc/modprobe.conf reads

--- Quote ---options snd_hda_intel index=1
--- End quote ---

Hope this helps.

aus9:
In addition as per wiki Rich suggests some members may need


--- Code: ---alsactl init
--- End code ---
I wrote that poorly IMHO it should have been written with a sudo prefix.

I don't need it but for some you may need to modify

~/.local/bin/intel  reads

--- Quote ---#!/bin/sh
tce-load -i alsa-config alsa
sudo alsactl init
sudo alsactl restore
--- End quote ---

and you may need that init command before being able to see your mixer levels with alsamixer

Navigation

[0] Message Index

Go to full version