luisbocanegra / luisbocanegra/linux-guide-split-audio-ports
[Help request]: Not work for SOF drivers
- Dominant language
- Shell
- Stars
- 120
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
**Describe your problem**
It seems this guide wont work for devices with SOF drivers(mine is `sof-hda-dsp`).
Since my device includes a cirrus amplifier and it requires sof driver to work properly, I didn't try to switch to `snd-hda-intel` driver.
According to https://github.com/thesofproject/sof/issues/8834 , seems SOF driver currently doesn't support `indep_hp` parameter and provides only one pcm stream for headphone and speaker(also proved by result of command `aplay -l`).
If I disable auto-mute in `alsamixer` and manually unmute the speaker, the sound will play on both headphone and speaker. But they have same sound stream so I can't route sound from different apps to different devices.
I have to declare that it works in windows with stock driver without any configuration so this is not thing about hardware limitation but driver's.
I post this here as a reminder for me and others. Thanks for your wonderful guide!
**System information**
- **Operating System**: NixOS
- **Kernel Version**: 6.17.7
- **Manufacturer**: Lenovo
- **Product Name**: ThinkBook 16p Gen 5
- **Type of device (laptop, desktop...)**: Laptop
Fill with output of each command
**`pactl info`**
```yaml
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 895
Tile Size: 65472
User Name: isning
Host Name: laptop
Server Name: PulseAudio (on PipeWire 1.4.9)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink
Default Source: alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Mic1__source
Cookie: e40d:c83e
```
**Codecs `cat /proc/asound/card*/codec#* | grep -E 'Codec|Vendor Id|Subsystem Id|Address'`**
```yaml
Codec: Realtek ALC287
Address: 0
Vendor Id: 0x10ec0287
Subsystem Id: 0x17aa38f9
```
**Cards `pactl list cards`**
```yaml
Card #51
Name: alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic
Driver: alsa
Owner Module: n/a
Properties:
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "1"
api.alsa.card.longname = "LENOVO-21N5-ThinkBook16pG5IRX-LNVNB161216"
api.alsa.card.name = "sof-hda-dsp"
api.alsa.path = "hw:1"
api.alsa.split-enable = "true"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio1"
api.dbus.ReserveDevice1.Priority = "-20"
device.api = "alsa"
device.bus = "pci"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
device.description = "Raptor Lake High Definition Audio Controller"
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 = "28514969"
device.product.id = "0x7a50"
device.product.name = "Raptor Lake High Definition Audio Controller"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1"
device.vendor.id = "0x8086"
device.vendor.name = "Intel Corporation"
media.class = "Audio/Device"
spa.object.id = "4"
factory.id = "15"
client.id = "44"
object.id = "51"
object.serial = "51"
object.path = "alsa:acp:sofhdadsp"
alsa.card = "1"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "LENOVO-21N5-ThinkBook16pG5IRX-LNVNB161216"
alsa.driver_name = "snd_soc_skl_hda_dsp"
alsa.mixer_name = "Realtek ALC287"
alsa.components = "HDA:10ec0287,17aa38f9,00100002 cfg-dmics:2"
alsa.id = "sofhdadsp"
device.string = "1"
Profiles:
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
HiFi (Headphones, Mic1, Mic2): Play HiFi quality Music (Headphones, Mic1, Mic2) (sinks: 1, sources: 2, priority: 8500, available: no)
HiFi (Mic1, Mic2, Speaker): Play HiFi quality Music (Mic1, Mic2, Speaker) (sinks: 1, sources: 2, priority: 8400, available: yes)
pro-audio: Pro Audio (sinks: 2, sources: 3, priority: 1, available: yes)
Active Profile: HiFi (Mic1, Mic2, Speaker)
Ports:
[Out] Speaker: Speaker (type: Speaker, priority: 100, latency offset: 0 usec, availability unknown)
Properties:
port.type = "speaker"
device.icon_name = "audio-speakers"
card.profile.port = "0"
Part of profile(s): HiFi (Mic1, Mic2, Speaker)
[In] Mic2: Stereo Microphone (type: Mic, priority: 200, latency offset: 0 usec, availability group: Mic, not available)
Properties:
port.type = "mic"
port.availability-group = "Mic"
device.icon_name = "audio-input-microphone"
card.profile.port = "1"
Part of profile(s): HiFi (Mic1, Mic2, Speaker), HiFi (Headphones, Mic1, Mic2)
[In] Mic1: Digital Microphone (type: Mic, priority: 100, latency offset: 0 usec, availability unknown)
Properties:
port.type = "mic"
device.icon_name = "audio-input-microphone"
card.profile.port = "2"
Part of profile(s): HiFi (Mic1, Mic2, Speaker), HiFi (Headphones, Mic1, Mic2)
[Out] Headphones: Headphones (type: Headphones, priority: 200, latency offset: 0 usec, availability group: Headphone, not available)
Properties:
port.type = "headphones"
port.availability-group = "Headphone"
device.icon_name = "audio-headphones"
card.profile.port = "3"
Part of profile(s): HiFi (Headphones, Mic1, Mic2)
```
**Sinks before and after: `pactl list sinks`**
W/o headphone connected
```yaml
Sink #193
State: RUNNING
Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink
Description: Raptor Lake High Definition Audio Controller Speaker
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 29493 / 45% / -20.81 dB, front-right: 29493 / 45% / -20.81 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__Speaker__sink.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "1"
alsa.card_name = "sof-hda-dsp"
alsa.class = "generic"
alsa.components = "HDA:10ec0287,17aa38f9,00100002 cfg-dmics:2"
alsa.device = "0"
alsa.driver_name = "snd_soc_skl_hda_dsp"
alsa.id = "HDA Analog (*)"
alsa.long_card_name = "LENOVO-21N5-ThinkBook16pG5IRX-LNVNB161216"
alsa.mixer_device = "_ucm0003.hw:sofhdadsp"
alsa.mixer_name = "Realtek ALC287"
alsa.name = ""
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.sync.id = "00000000:00000000:00000000:00000000"
api.alsa.card.longname = "LENOVO-21N5-ThinkBook16pG5IRX-LNVNB161216"
api.alsa.card.name = "sof-hda-dsp"
api.alsa.open.ucm = "true"
api.alsa.path = "hw:sofhdadsp"
api.alsa.pcm.card = "1"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "0"
device.api = "alsa"
device.bus = "pci"
device.class = "sound"
device.icon_name = "audio-speakers"
device.id = "51"
device.profile.description = "Speaker"
device.profile.name = "HiFi: Speaker: sink"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Raptor Lake High Definition Audio Controller"
node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink"
node.nick = "Speaker"
node.pause-on-idle = "false"
object.path = "alsa:acp:sofhdadsp:0:playback"
port.group = "playback"
priority.driver = "1000"
priority.session = "1000"
factory.id = "19"
clock.quantum-limit = "8192"
client.id = "44"
node.driver = "true"
node.loop.name = "data-loop.0"
library.name = "audioconvert/libspa-audioconvert"
object.id = "118"
object.serial = "193"
node.max-latency = "4096/48000"
api.alsa.period-size = "1024"
api.alsa.period-num = "8"
api.alsa.headroom = "24"
node.driver-id = "118"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "1"
api.alsa.split-enable = "true"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio1"
api.dbus.ReserveDevice1.Priority = "-20"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
device.enum.api = "udev"
device.name = "alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic"
device.nick = "sof-hda-dsp"
device.plugged.usec = "28514969"
device.product.id = "0x7a50"
device.product.name = "Raptor Lake High Definition Audio Controller"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1"
device.vendor.id = "0x8086"
device.vendor.name = "Intel Corporation"
spa.object.id = "4"
device.string = "1"
Ports:
[Out] Speaker: Speaker (type: Speaker, priority: 100, availability unknown)
Active Port: [Out] Speaker
Formats:
pcm
```
With headphone connected
```yaml
Sink #938
State: RUNNING
Name: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink
Description: Raptor Lake High Definition Audio Controller Headphones
Driver: PipeWire
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 4294967295
Mute: no
Volume: front-left: 0 / 0% / -inf dB, front-right: 0 / 0% / -inf 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__Headphones__sink.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.card = "1"
alsa.card_name = "sof-hda-dsp"
alsa.class = "generic"
alsa.components = "HDA:10ec0287,17aa38f9,00100002 cfg-dmics:2"
alsa.device = "0"
alsa.driver_name = "snd_soc_skl_hda_dsp"
alsa.id = "HDA Analog (*)"
alsa.long_card_name = "LENOVO-21N5-ThinkBook16pG5IRX-LNVNB161216"
alsa.mixer_device = "_ucm0003.hw:sofhdadsp"
alsa.mixer_name = "Realtek ALC287"
alsa.name = ""
alsa.resolution_bits = "16"
alsa.subclass = "generic-mix"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.sync.id = "00000000:00000000:00000000:00000000"
api.alsa.card.longname = "LENOVO-21N5-ThinkBook16pG5IRX-LNVNB161216"
api.alsa.card.name = "sof-hda-dsp"
api.alsa.open.ucm = "true"
api.alsa.path = "hw:sofhdadsp"
api.alsa.pcm.card = "1"
api.alsa.pcm.stream = "playback"
audio.channels = "2"
audio.position = "FL,FR"
card.profile.device = "3"
device.api = "alsa"
device.bus = "pci"
device.class = "sound"
device.icon_name = "audio-headphones"
device.id = "51"
device.profile.description = "Headphones"
device.profile.name = "HiFi: Headphones: sink"
device.routes = "1"
factory.name = "api.alsa.pcm.sink"
media.class = "Audio/Sink"
device.description = "Raptor Lake High Definition Audio Controller"
node.name = "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Headphones__sink"
node.nick = "Headphones"
node.pause-on-idle = "false"
object.path = "alsa:acp:sofhdadsp:3:playback"
port.group = "playback"
priority.driver = "1000"
priority.session = "1000"
factory.id = "19"
clock.quantum-limit = "8192"
client.id = "44"
node.driver = "true"
node.loop.name = "data-loop.0"
library.name = "audioconvert/libspa-audioconvert"
object.id = "106"
object.serial = "938"
node.max-latency = "4096/48000"
api.alsa.period-size = "1024"
api.alsa.period-num = "8"
api.alsa.headroom = "24"
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "1"
api.alsa.split-enable = "true"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio1"
api.dbus.ReserveDevice1.Priority = "-20"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
device.enum.api = "udev"
device.name = "alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic"
device.nick = "sof-hda-dsp"
device.plugged.usec = "28514969"
device.product.id = "0x7a50"
device.product.name = "Raptor Lake High Definition Audio Controller"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1"
device.vendor.id = "0x8086"
device.vendor.name = "Intel Corporation"
spa.object.id = "4"
device.string = "1"
Ports:
[Out] Headphones: Headphones (type: Headphones, priority: 200, availability group: Headphone, available)
Active Port: [Out] Headphones
Formats:
pcm
```
**Aplay before and after `aplay -l`**
W/o headphone connected
```yaml
card 1: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 31: HDA Analog Deep Buffer (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
```
With headphone connected
```yaml
card 1: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 31: HDA Analog Deep Buffer (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the guide's handling of SOF devices and the linked SOF issue about the missing indep_hp parameter. Reproduce the reported state with aplay -l, alsamixer, and the supplied pactl outputs. Done means establishing whether separate streams are supported for this hardware and documenting a verified limitation or path forward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- audio-video-rtc, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100