Jump to content

audio issues with laptop

Hi all so I basically I have been trying to install Linux on my laptop(link, specs and model number on the link down below) and right now I am currently using windows because whenever I try to install any linux distro the audio does not work I suspect this may be a driver problem since I have a HP laptop and many others have reported this for different models. If someone can give me a patch or fix for this it will really be appreciated 🙂

 

Link:

https://www.hp.com/us-en/shop/ConfigureView?langId=-1&storeId=10151&catalogId=10051&catEntryId=3074457345620810818&urlLangId=&quantity=1

specs:

32gb ram @ 3200mhz

Intel core i7-13700H

1tb nvme

sound devices are appended below(uses a B&o speakers if that helps too):

image.png.eae10acbd1821fc35ff365131fe5790d.png

 

Link to comment
Share on other sites

Link to post
Share on other sites

Try boot Manjaro with proprietary driver. 

| Intel i7-3770@4.2Ghz | Asus Z77-V | Zotac 980 Ti Amp! Omega | DDR3 1800mhz 4GB x4 | 300GB Intel DC S3500 SSD | 512GB Plextor M5 Pro | 2x 1TB WD Blue HDD |
 | Enermax NAXN82+ 650W 80Plus Bronze | Fiio E07K | Grado SR80i | Cooler Master XB HAF EVO | Logitech G27 | Logitech G600 | CM Storm Quickfire TK | DualShock 4 |

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, xAcid9 said:

Try boot Manjaro with proprietary driver. 

will check it out as soon as possible but I need a solution for vannila arch since I am not a big fan of manjaro (eos is the better version of it imo)

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, goatedpenguin said:

will check it out as soon as possible but I need a solution for vannila arch since I am not a big fan of manjaro (eos is the better version of it imo)

Did you check if the system actually detect your audio device? Can you share output of

pactl list sinks

 

| Intel i7-3770@4.2Ghz | Asus Z77-V | Zotac 980 Ti Amp! Omega | DDR3 1800mhz 4GB x4 | 300GB Intel DC S3500 SSD | 512GB Plextor M5 Pro | 2x 1TB WD Blue HDD |
 | Enermax NAXN82+ 650W 80Plus Bronze | Fiio E07K | Grado SR80i | Cooler Master XB HAF EVO | Logitech G27 | Logitech G600 | CM Storm Quickfire TK | DualShock 4 |

Link to comment
Share on other sites

Link to post
Share on other sites

I am running windows now on my main laptop I can try to give the output on a liveusb

Link to comment
Share on other sites

Link to post
Share on other sites

here is the output(got it from the manjaro liveusb booted with proprietary drivers):

Sink #62
	State: SUSPENDED
	Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink
	Description: Raptor Lake-P/U/H cAVS HDMI / DisplayPort 3 Output
	Driver: PipeWire
	Sample Specification: s24-32le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 4294967295
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.card = "0"
		alsa.card_name = "sof-hda-dsp"
		alsa.class = "generic"
		alsa.device = "5"
		alsa.driver_name = "snd_soc_skl_hda_dsp"
		alsa.id = "HDMI3 (*)"
		alsa.long_card_name = "HP-HPEnvyLaptop17t_cw000-Type1ProductConfigId-8BDD"
		alsa.mixer_device = "_ucm0001.hw:sofhdadsp"
		alsa.name = ""
		alsa.resolution_bits = "16"
		alsa.subclass = "generic-mix"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		api.alsa.card.longname = "HP-HPEnvyLaptop17t_cw000-Type1ProductConfigId-8BDD"
		api.alsa.card.name = "sof-hda-dsp"
		api.alsa.open.ucm = "true"
		api.alsa.path = "hw:sofhdadsp,5"
		api.alsa.pcm.card = "0"
		api.alsa.pcm.stream = "playback"
		audio.channels = "2"
		audio.position = "FL,FR"
		card.profile.device = "0"
		device.api = "alsa"
		device.class = "sound"
		device.id = "49"
		device.profile.description = "HDMI / DisplayPort 3 Output"
		device.profile.name = "HiFi: hw:sofhdadsp,5: sink"
		device.routes = "1"
		factory.name = "api.alsa.pcm.sink"
		media.class = "Audio/Sink"
		device.description = "Raptor Lake-P/U/H cAVS"
		node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink"
		node.nick = "HDMI / DisplayPort 3 Output"
		node.pause-on-idle = "false"
		object.path = "alsa:pcm:0:hw:sofhdadsp,5:playback"
		priority.driver = "664"
		priority.session = "664"
		factory.id = "18"
		clock.quantum-limit = "8192"
		client.id = "35"
		node.driver = "true"
		factory.mode = "merge"
		audio.adapt.follower = ""
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "62"
		object.serial = "62"
		api.acp.auto-port = "false"
		api.acp.auto-profile = "false"
		api.alsa.card = "0"
		api.alsa.use-acp = "true"
		api.dbus.ReserveDevice1 = "Audio0"
		device.bus = "pci"
		device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
		device.enum.api = "udev"
		device.icon_name = "audio-card-analog-pci"
		device.name = "alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic"
		device.nick = "sof-hda-dsp"
		device.plugged.usec = "15109036"
		device.product.id = "0x51ca"
		device.product.name = "Raptor Lake-P/U/H cAVS"
		device.subsystem = "sound"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
		device.vendor.id = "0x8086"
		device.vendor.name = "Intel Corporation"
		device.string = "0"
	Ports:
		[Out] HDMI3: HDMI / DisplayPort 3 Output (type: HDMI, priority: 700, availability group: HDMI/DP,pcm=5, not available)
	Active Port: [Out] HDMI3
	Formats:
		pcm

Sink #63
	State: SUSPENDED
	Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink
	Description: Raptor Lake-P/U/H cAVS HDMI / DisplayPort 2 Output
	Driver: PipeWire
	Sample Specification: s24-32le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 4294967295
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.card = "0"
		alsa.card_name = "sof-hda-dsp"
		alsa.class = "generic"
		alsa.device = "4"
		alsa.driver_name = "snd_soc_skl_hda_dsp"
		alsa.id = "HDMI2 (*)"
		alsa.long_card_name = "HP-HPEnvyLaptop17t_cw000-Type1ProductConfigId-8BDD"
		alsa.mixer_device = "_ucm0001.hw:sofhdadsp"
		alsa.name = ""
		alsa.resolution_bits = "16"
		alsa.subclass = "generic-mix"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		api.alsa.card.longname = "HP-HPEnvyLaptop17t_cw000-Type1ProductConfigId-8BDD"
		api.alsa.card.name = "sof-hda-dsp"
		api.alsa.open.ucm = "true"
		api.alsa.path = "hw:sofhdadsp,4"
		api.alsa.pcm.card = "0"
		api.alsa.pcm.stream = "playback"
		audio.channels = "2"
		audio.position = "FL,FR"
		card.profile.device = "1"
		device.api = "alsa"
		device.class = "sound"
		device.id = "49"
		device.profile.description = "HDMI / DisplayPort 2 Output"
		device.profile.name = "HiFi: hw:sofhdadsp,4: sink"
		device.routes = "1"
		factory.name = "api.alsa.pcm.sink"
		media.class = "Audio/Sink"
		device.description = "Raptor Lake-P/U/H cAVS"
		node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink"
		node.nick = "HDMI / DisplayPort 2 Output"
		node.pause-on-idle = "false"
		object.path = "alsa:pcm:0:hw:sofhdadsp,4:playback"
		priority.driver = "680"
		priority.session = "680"
		factory.id = "18"
		clock.quantum-limit = "8192"
		client.id = "35"
		node.driver = "true"
		factory.mode = "merge"
		audio.adapt.follower = ""
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "63"
		object.serial = "63"
		api.acp.auto-port = "false"
		api.acp.auto-profile = "false"
		api.alsa.card = "0"
		api.alsa.use-acp = "true"
		api.dbus.ReserveDevice1 = "Audio0"
		device.bus = "pci"
		device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
		device.enum.api = "udev"
		device.icon_name = "audio-card-analog-pci"
		device.name = "alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic"
		device.nick = "sof-hda-dsp"
		device.plugged.usec = "15109036"
		device.product.id = "0x51ca"
		device.product.name = "Raptor Lake-P/U/H cAVS"
		device.subsystem = "sound"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
		device.vendor.id = "0x8086"
		device.vendor.name = "Intel Corporation"
		device.string = "0"
	Ports:
		[Out] HDMI2: HDMI / DisplayPort 2 Output (type: HDMI, priority: 600, availability group: HDMI/DP,pcm=4, not available)
	Active Port: [Out] HDMI2
	Formats:
		pcm

Sink #64
	State: SUSPENDED
	Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink
	Description: Raptor Lake-P/U/H cAVS HDMI / DisplayPort 1 Output
	Driver: PipeWire
	Sample Specification: s24-32le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 4294967295
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.card = "0"
		alsa.card_name = "sof-hda-dsp"
		alsa.class = "generic"
		alsa.device = "3"
		alsa.driver_name = "snd_soc_skl_hda_dsp"
		alsa.id = "HDMI1 (*)"
		alsa.long_card_name = "HP-HPEnvyLaptop17t_cw000-Type1ProductConfigId-8BDD"
		alsa.mixer_device = "_ucm0001.hw:sofhdadsp"
		alsa.name = ""
		alsa.resolution_bits = "16"
		alsa.subclass = "generic-mix"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		api.alsa.card.longname = "HP-HPEnvyLaptop17t_cw000-Type1ProductConfigId-8BDD"
		api.alsa.card.name = "sof-hda-dsp"
		api.alsa.open.ucm = "true"
		api.alsa.path = "hw:sofhdadsp,3"
		api.alsa.pcm.card = "0"
		api.alsa.pcm.stream = "playback"
		audio.channels = "2"
		audio.position = "FL,FR"
		card.profile.device = "2"
		device.api = "alsa"
		device.class = "sound"
		device.id = "49"
		device.profile.description = "HDMI / DisplayPort 1 Output"
		device.profile.name = "HiFi: hw:sofhdadsp,3: sink"
		device.routes = "1"
		factory.name = "api.alsa.pcm.sink"
		media.class = "Audio/Sink"
		device.description = "Raptor Lake-P/U/H cAVS"
		node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink"
		node.nick = "HDMI / DisplayPort 1 Output"
		node.pause-on-idle = "false"
		object.path = "alsa:pcm:0:hw:sofhdadsp,3:playback"
		priority.driver = "696"
		priority.session = "696"
		factory.id = "18"
		clock.quantum-limit = "8192"
		client.id = "35"
		node.driver = "true"
		factory.mode = "merge"
		audio.adapt.follower = ""
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "64"
		object.serial = "64"
		api.acp.auto-port = "false"
		api.acp.auto-profile = "false"
		api.alsa.card = "0"
		api.alsa.use-acp = "true"
		api.dbus.ReserveDevice1 = "Audio0"
		device.bus = "pci"
		device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
		device.enum.api = "udev"
		device.icon_name = "audio-card-analog-pci"
		device.name = "alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic"
		device.nick = "sof-hda-dsp"
		device.plugged.usec = "15109036"
		device.product.id = "0x51ca"
		device.product.name = "Raptor Lake-P/U/H cAVS"
		device.subsystem = "sound"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
		device.vendor.id = "0x8086"
		device.vendor.name = "Intel Corporation"
		device.string = "0"
	Ports:
		[Out] HDMI1: HDMI / DisplayPort 1 Output (type: HDMI, priority: 500, availability group: HDMI/DP,pcm=3, not available)
	Active Port: [Out] HDMI1
	Formats:
		pcm

Sink #65
	State: SUSPENDED
	Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink
	Description: Raptor Lake-P/U/H cAVS Speaker + Headphones
	Driver: PipeWire
	Sample Specification: s32le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 4294967295
	Mute: no
	Volume: front-left: 26214 /  40% / -23.88 dB,   front-right: 26214 /  40% / -23.88 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.card = "0"
		alsa.card_name = "sof-hda-dsp"
		alsa.class = "generic"
		alsa.device = "0"
		alsa.driver_name = "snd_soc_skl_hda_dsp"
		alsa.id = "HDA Analog (*)"
		alsa.long_card_name = "HP-HPEnvyLaptop17t_cw000-Type1ProductConfigId-8BDD"
		alsa.mixer_device = "_ucm0001.hw:sofhdadsp"
		alsa.name = ""
		alsa.resolution_bits = "16"
		alsa.subclass = "generic-mix"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		api.alsa.card.longname = "HP-HPEnvyLaptop17t_cw000-Type1ProductConfigId-8BDD"
		api.alsa.card.name = "sof-hda-dsp"
		api.alsa.open.ucm = "true"
		api.alsa.path = "hw:sofhdadsp"
		api.alsa.pcm.card = "0"
		api.alsa.pcm.stream = "playback"
		audio.channels = "2"
		audio.position = "FL,FR"
		card.profile.device = "3"
		device.api = "alsa"
		device.class = "sound"
		device.id = "49"
		device.profile.description = "Speaker + Headphones"
		device.profile.name = "HiFi: hw:sofhdadsp: sink"
		device.routes = "2"
		factory.name = "api.alsa.pcm.sink"
		media.class = "Audio/Sink"
		device.description = "Raptor Lake-P/U/H cAVS"
		node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink"
		node.nick = "Speaker + Headphones"
		node.pause-on-idle = "false"
		object.path = "alsa:pcm:0:hw:sofhdadsp:playback"
		priority.driver = "1000"
		priority.session = "1000"
		factory.id = "18"
		clock.quantum-limit = "8192"
		client.id = "35"
		node.driver = "true"
		factory.mode = "merge"
		audio.adapt.follower = ""
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "65"
		object.serial = "65"
		api.acp.auto-port = "false"
		api.acp.auto-profile = "false"
		api.alsa.card = "0"
		api.alsa.use-acp = "true"
		api.dbus.ReserveDevice1 = "Audio0"
		device.bus = "pci"
		device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
		device.enum.api = "udev"
		device.icon_name = "audio-card-analog-pci"
		device.name = "alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic"
		device.nick = "sof-hda-dsp"
		device.plugged.usec = "15109036"
		device.product.id = "0x51ca"
		device.product.name = "Raptor Lake-P/U/H cAVS"
		device.subsystem = "sound"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
		device.vendor.id = "0x8086"
		device.vendor.name = "Intel Corporation"
		device.string = "0"
	Ports:
		[Out] Speaker: Speaker (type: Speaker, priority: 100, availability unknown)
		[Out] Headphones: Headphones (type: Headphones, priority: 200, availability group: Headphone, not available)
	Active Port: [Out] Speaker
	Formats:
		pcm

 

Link to comment
Share on other sites

Link to post
Share on other sites

Firstly, the modern sound systems (jack, pulseaudio, pipewire) all sit on top of alsa, so if you are checking that "drivers are working" it's a alsa utils that you want to use to verify this.

aplay is a small sound playback utility for alsa, that has the ability to play .wav files directly without any higher level sound server (like pipewire).

Before you start grab yourself a .wav file for later, and stick it in ~.

aplay -l (lowercase L) will give a summarised list of available hardware for playback.

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI_1 [HDA ATI HDMI], device 3: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 1: ALC1220 Digital [ALC1220 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

From this example you can see that 'card 0' is a gfx card, with device 3 being a plugged in monitor I could "send" sound to, 'card 1' is another gfx card with another monitor plugged in on the device 3 slot. 'card 2' is my actual sound card, with 2 playback devices, device 0 being analogue (re: speaker/headphones jack sockets) and device 1 being the digital S/PDIF socket.

 

We aren't interested in sending sound to monitors with no speakers so we'll ignore cards 0 & 1, and just work with 2. I also don't have anything connected to the S/PDIF, so we aren't interested in card 2 device 1: This leaves the output we want to test as card 2 device 0, represented by hw:2,0. To test the sound we use 

aplay -D hw:2,0 sample.wav

There are 3 results you can get if do this right:

  1. aplay says it's playing the sound, you hear sound
  2. aplay says it's playing the sound, you hear silence
  3. aplay says: audio open error: Device or resource busy

In case of 1, happy days, it works.

In case of 2, almost happy days, the sound is muted, use amixer to fix that

In case of 3, pipewire has exclusive control of that device (but your list-sinks output suggests that isn't the case), kill it will 'killall [propcessname]' and try again.

 

Once you get sound this way, everything else is just settings you have to alter to make your sound server behave the way you want it to by default, but your driver question is answered.

Link to comment
Share on other sites

Link to post
Share on other sites

//sound card listing
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 31: HDA Analog Deep Buffer (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0

//sample.wav audio play output

 

//aplay -D hw:1,0 sample.wav

Playing WAVE 'sample.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz)
please, try the plug plugin

 

Now apparently the sound card listing gave me only card 1 for some reason so I modified the second command and switched it to hw:1,0 instead of hw:2,0

I do not know how to fix this using a mixer if you could help I would appreciate it. Thanks 🙂

 

Link to comment
Share on other sites

Link to post
Share on other sites

Hi all after doing some research I found out that the speakers my systems uses(ALC245) is not currently supported by the linux kernel which sucks, so the only thing I can do for now is either wait or make a patch etc. Thanks for all the help 🙂

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/15/2024 at 1:59 AM, goatedpenguin said:

I do not know how to fix this using a mixer

amixer is the just cli version of alsamixer it's just a volume control app, but it's written for a command line interface. Open up alsamixer instead, press f6 and select the correct card (which seems to be only 1), then press f5 to see all the controls. Make sure nothing that isn't to do with a microphone (at this stage) isn't muted (press 'm' when a channel is selected). Also turn all the channels up to full, apart from master which I'd suggest is about 60%.

 

Play your sound again, see if it makes noise.

 

There is (may be) more to do, but the posts about getting ALC245 to work are ~2 years old, so instead of jumping in at the hdajackretask level (poking at the driver to make it do what you want) best practice is to work backwards and make sure there isn't something simpler causing the issue.

 

hda-jack-retask is a userspace tool for mapping soundcard outputs to real world hardware outputs: Your soundcard driver will report a bunch of outputs to the kernel, then uses a "map" to tell it which of those outputs is front speakers, headphones, mic input etc.

Using the hdajackretask program to manually re-map the outputs is fine, but there are caveats: If anything is using the sound card it'll fail to re-map, and you'll want to capture the "re-mapping" so you can automate it later on (this automation needs to be done before and sound server starts of it fail to re-map as with the program).

I stole this screenshot from an "I fixed it" post:enter image description here

Note the "show unconnected pins" being checked. If your hdajackretask doesn't look exactly the same, post an image here.

 

"Install Boot override" may or may not work depending on your distro/set-up, but don't worry we can always "force" it to work in other ways.

Link to comment
Share on other sites

Link to post
Share on other sites

Just a quick note as to why this is "unsupported": It isn't really unsupported, just there is no official configuration for the driver available in the kernel (the mapping). This is firmly HP's fault, they brought this hardware configuration into existence, and didn't submit a patch to the mainline kernel for it. I don't patch my re-maps into my kernel because they are preferences and not "fixes", but if you get this working I should be able to write the patch for yours.

Link to comment
Share on other sites

Link to post
Share on other sites

Yes I agree HP should be the ones patching this but then again they do sell dedicated laptops for linux which spec wise are really crap so I opted to go for a windows based HP laptop and install linux on that since it had better specs. Coming back to hdjackretask command, I have used this thing to do change the pin config(and I followed yours) however the config always goes away after a reboot. This may be because of pipewire? And I know this sounds random but do you know any online resources where I could learn how to do patches for the kernel so next time I can be more acquainted with these sorts of things?

 

Thanks again.

Link to comment
Share on other sites

Link to post
Share on other sites

45 minutes ago, goatedpenguin said:

I have used this thing to do change the pin config(and I followed yours) however the config always goes away after a reboot

So, if you run it as root, when you click "Apply boot override" it should stick the mappings in /lib/firmware/hda-jack-retask.fw, and make the kernel read them with an entry in /etc/modprobe.d/hda-jack-retask.conf. If both these files are there and it doesn't apply at boot time, post the contents of /lib/firmware/hda-jack-retask.fw and I can write a wrapper script round it.

Link to comment
Share on other sites

Link to post
Share on other sites

[codec]
0x10ec0245 0x103c8bdd 0

[pincfg]
0x12 0x411111f0
0x13 0x40000000
0x14 0x90170151
0x17 0x90170110
0x18 0x411111f0
0x19 0x03a11040
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x40600001
0x1e 0x90170150
0x21 0x03211020



#This output is from the /lib/firmware/hda-jack-retask.fw
#there is no file at /etc/modprobe.d/hda-jack-retask.conf

 

Link to comment
Share on other sites

Link to post
Share on other sites

So this is the script that does the same thing as running hdajackretask and ticking the right boxes etc...

#!/bin/sh
#use aplay|grep to match the correct device and awk|sed get a card number
card=$(aplay -l |grep "sofhdadsp \[sof-hda-dsp\], device 0: HDA Analog"|awk '{print $2}'|sed 's/://')

#insert the number into the correct format for /sys/class/sound/*
CARD="hwC${card}D0"

#push the pin configs
echo "0x12 0x411111f0" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x13 0x40000000" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x14 0x90170151" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x17 0x90170110" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x18 0x411111f0" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x19 0x03a11040" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x1a 0x411111f0" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x1b 0x411111f0" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x1d 0x40600001" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x1e 0x90170150" > /sys/class/sound/${CARD}/user_pin_configs
echo "0x21 0x03211020" > /sys/class/sound/${CARD}/user_pin_configs

#tell kernel to read updated config
echo 1                 > /sys/class/sound/${CARD}/reconfig


You could hardcode the "/sys/class/sound/hwC1D0/user_pin_configs", but if you were to boot with some USB headphone or similar attached, it might shit the bed, so discovery within the script is more robust.

Save this as /bin/soundcard_start.sh

Run chmod u+x /bin/soundcard_start.sh so it's executable

Run soundcard_start.sh as root and check it works.

 

What init system are you using? Then we can write an automation script so it runs at boot.

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks for making the script I am currently running this on a kali linux liveusb(with presistance) since I do not have linux installed on my laptop rn. The init system is systemd and the audio server is I believe pipewire. Thanks 🙂
 

Link to comment
Share on other sites

Link to post
Share on other sites

okay so I ran the script but it gave me an error:

 

/bin/soundcard_start.sh: 22: echo: echo: I/O error, however the pin config was updated in hdjackretask however audio is not working. 😞

 

and the files that written in the script do not exist yet change the hdjackretask idk why tho...

Link to comment
Share on other sites

Link to post
Share on other sites

Quote

/bin/soundcard_start.sh: 22

That's the line that actually pushes the updated config. I can't help but think it's pipewire preventing the config going through.

Try

killall -SIGKILL pipewire; echo 1 > /sys/class/sound/hwC1D0/reconfig

 

Read this too https://www.kernel.org/doc/html/v4.17/sound/hd-audio/notes.html#hd-audio-reconfiguration and the Early Patching section, so we are "singing from the same hymn sheet".

Link to comment
Share on other sites

Link to post
Share on other sites

Okay turns out that I chmoded the script wrongly and after correcting it I got an error that said device or resource busy... And the second command you gave outputed that there was no such file or dir. FYI I have also finished reading the link you have sent me and after doing a bit more investigation I tried playing audio on debian linux that comes prepackaged with pulseaudio, so it can't be pipewire screwing with the audio...

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/20/2024 at 12:23 PM, goatedpenguin said:

I got an error that said device or resource busy

Yeah, that's the sound server "using" the device you are trying to modify. I've never used pipewire, so I can't tell you how to stop it.

I would tell you to just uninstall it until we know ALSA works properly, but your package manager will no doubt try and uninstall deps too, at which point your DE disappears.

 

If anyone knows how to stop pipewire autostarting/running a global daemon etc that'd be useful right now.

On 1/20/2024 at 12:23 PM, goatedpenguin said:

so it can't be pipewire screwing with the audio

As said above, you can't push the modifications whilst it's in use. 

 

On 1/20/2024 at 12:23 PM, goatedpenguin said:

I tried playing audio on debian linux that comes prepackaged with pulseaudio

That's a good idea, you can drop to a tty console, shut down the UI and nerf pulseaudio at the same time.

When you are "testing audio" you need to do it with aplay -D hw:1,0 sample.wav, but because it's a different kernel/distro checking what you are trying to play sound through is still `card 1 device 0` with aplay -l first is a must.

On 1/20/2024 at 12:23 PM, goatedpenguin said:

that there was no such file or dir.

Need to diagnose that, split the command in two and tell me which one caused that specific error, then `ls` the directory it's pointing at.

Link to comment
Share on other sites

Link to post
Share on other sites

23 hours ago, Ralphred said:

 

If anyone knows how to stop pipewire autostarting/running a global daemon etc that'd be useful right now.

I believe we can use systemctl to stop the daemon as well as autostart on the next reboot.

Link to comment
Share on other sites

Link to post
Share on other sites

Sorry for the late reply after doing all the testing I should have mentioned that my headphones do work on all the distros but not the onboard speakers. I guess we can conclude that alsa, pipewire, pulseaudio etc. are not the problem here and that there is no such driver/patch available yet. If only I could just port the audio drivers from Windows to Linux... Anyways after testing aplay -l and then running the command aplay -D hw:0,0 sample.wav. The second command gave me the output down below(note that I did the command on my headphones too which worked.)

 

Output:

 

Playing WAVE '/home/user/file_example_WAV_10MG.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz)
         please, try the plug plugin 
Aborted by signal Interrupt...

 

P.S I had to "Aborted by signal Interrupt... " since it would not stop so disregard that line.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 weeks later...

@goatedpenguinsorry you’ve been going down such an annoying rabbit hole. A couple of things:

 

- The problem you’re running into is actually a speaker problem with Cirrus, not a Realtek problem. (It actually affects a number of laptop brands, including Asus and Dell.) If you plug in headphones, the audio will likely work.

- However, the problem has been caught by other folks, including on the HP forums. There is a fix here: https://github.com/xoocoon/hp-15-ew0xxx-snd-fix

- Even better, if you move to a more recent kernel version, the problem will be largely fixed. The relevant driver support was added in 6.7.1, and while quirks are still necessary from that github fix above, it will be enough to get you going.

 

Now, the speakers are admittedly a bit low on my HP Envy 16 (my machine) compared to Windows, so there may be some value in messing with hdajackretask, but as far as audio goes the kernel mostly has you covered. Using a tool like EasyEffects can get you louder audio but that has its limitations.

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks for the reply I have also gotten another reply from reddit for the same script to be the fix or to compile the 6.7.4 kernel since there have been a lot patches for the cirrus amps etc. Thanks a bunch I will try this fix asap and report back 🙂 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×