Ubuntu24.04 sof-hda-dsp sound card and headset do not sound, but Bluetooth does

In Windows 11, there is sound, but in ubuntu24, the sound is enabled, but the sound cannot be played, and the headset cannot be used. May not be supported by the driver,

and later studied, using the following code, the sound can be played normally,

echo "options snd-intel-dspcfg dsp_driver=1" | sudo tee /etc/modprobe.d/alsa-base.conf

sudo alsactl init

but the headset still cannot record , and the list does not have the headset option.

ls /dev/video*
/dev/video0 /dev/video1

cat /proc/asound/cards
0 [sofhdadsp ]: sof-hda-dsp - sof-hda-dsp
XIAOMI-RedmiBookPro162024--TM2309


inxi -A
Audio:
Device-1: Intel Meteor Lake-P HD Audio driver: sof-audio-pci-intel-mtl
API: ALSA v: k6.8.0-51-generic status: kernel-api
Server-1: PipeWire v: 1.0.5 status: active


aplay -l
**** PLAYBACK List of hardware devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
subset: 1/1
subset #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
subset: 1/1
subset #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
subset: 1/1
subset #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
subset: 1/1
subset #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 31: Deepbuffer HDA Analog (*) []
subset: 1/1
subset #0: subdevice #0

I understand it is being a long time you posted this. I am using Samsung Galaxy Ion and I experienced similar issue. After frantic efforts and research to resolve this issue, I was able to fix mine using groundwork by joshuagrisham and drlucan of Manjaro Community Forum. I decided to create a script to automate this fix and made it open source which is accessible via galaxybook-linux-setup. You may want to review this and probably tweak it to work for your case.

Welcome to Ubuntu Discourse :slight_smile:

Thank you for your contribution in this area.

Has your script been tested also on later versions and is it only for Samsung Galaxy series?

Thank you so much @rubi1200. I tested my script on 24.04 with kernel Linux 6.14.0-27-generic on my Samsung Galaxy. You can see the details of my issue and device here #80. I strongly believe the script will work on other devices with similar issue. I am also testing on other devices and I would be glad if you could also test. Some devices may only need to modify the hda-verb in case the one I tested mine with doesn’t work for them. That is why I made the script open source. I will be so glad if it works for many other people with similar issues. It took me about 4 days of trials, test and failure. Here is the link to my article on this.
Thank you so much.