Fix audio only from headphones in HP Pavilion DV7 with Mint 20

After BIOS upgrade, audio has not worked corretly, and audio did not appear from speaker but headphones worked, so the cure seems to be in Mint 20 to edit /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf file by adding lines and after editding restart pulseaudio.

sudo nano /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf

….. add lines

[Element Speaker]
switch = off
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

[Element Headphone]
required-any = any
switch = mute
volume = off

….. save, quit and restart pulseaudio

Ctrl o
Ctrl x

pulseaudio -k && pulseaudio --start

To test sounds, run

aplay -l

You can test the output using command. If card 0 and device 0

aplay -D plughw:0,0 /usr/share/sounds/alsa/Front_Center.wav