Skip to contentSkip to conversation

ucm2: sof-soundwire: fix TAS2783 and RT721 volume on ASUS ProArt PX13

DISCUSSION GitHub pull_request - opened 1 participant 4 messages Dec 4 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

alsa-project/alsa-ucm-conf pull request #941 was opened from cathay4t:

This series fixes the internal speaker and headphone hardware volume/mute on the ASUS ProArt PX13 HN7306EA (AMD ACP SoundWire, RT721 + 2x TAS2783).

## Problem

The UCM Speaker and Headphones devices only mapped their playback PCMs, so PipeWire's ACP fell back to software volume/mute controls.

- TAS2783: the two amplifiers expose one mono Speaker Volume control each plus per-amplifier DAPM speaker switches. There is no stereo Speaker Playback Volume/Switch pair for ACP to bind.
- TAS2783: BootSequence used Left Spk, Right Spk, Left Spk2 and Right Spk2, but the actual controls are Left Spk Switch etc.
- RT721: the Headphones device did not map rt721 FU05 Playback Volume or Headphone Switch.

## Changes

- 35a2d19 ucm2: sof-soundwire: expose TAS2783 speaker hardware volume Create a stereo Speaker Playback Volume/Switch from the two mono TAS2783 volume controls and the two speaker switches, and bind it to the Speaker device. This is limited to the two-amplifier topology; one- and four-amplifier systems keep the existing behavior.
- 148f822 ucm2: codecs/tas2783: fix speaker switch names in BootSequence Use the real DAPM control names.
- 11845f5 ucm2: sof-soundwire/rt721: expose headphone hardware volume Bind rt721 FU05 Playback Volume and Headphone Switch to the Headphones device.

## Testing

Tested on ASUS ProArt PX13 HN7306EA (AMD ACP SoundWire, RT721 + 2x TAS2783) with kernel 7.4.0-rc5:

- alsaucm -c hw:1 dump text with the new tree shows:
- Speaker: PlaybackMixer, PlaybackMixerElem "Speaker"
- Headphones: PlaybackMixer, PlaybackVolume, PlaybackSwitch
- The TAS2783 virtual Speaker Playback Volume maps left/right correctly:
setting 150,160 updates tas2783-1 to 150 and tas2783-2 to 160.
- The TAS2783 virtual Speaker Playback Switch toggles both Left Spk Switch and Right Spk Switch.
- rt721 FU05 Playback Volume is stereo, range 0..87, 0.75 dB step; Headphone Switch is present.

## Notes

- The TAS2783 remap is intentionally two-amplifier only. Four-amplifier systems keep the existing software-volume fallback.
- The RT721 PlaybackSwitch is set unconditionally. Systems without the machine-driver Headphone Switch keep hardware volume and fall back to software mute.

Request URL : https://github.com/alsa-project/alsa-ucm-conf/pull/941
Patch URL : https://github.com/alsa-project/alsa-ucm-conf/pull/941.patch
Repository URL: https://github.com/alsa-project/alsa-ucm-conf

#2 lore raw
In reply to a message not in the archive

alsa-project/alsa-ucm-conf pull request #941 was edited from cathay4t:

This series fixes the internal speaker and headphone hardware volume/mute on the ASUS ProArt PX13 HN7306EA (AMD ACP SoundWire, RT721 + 2x TAS2783).

## Problem

The UCM Speaker and Headphones devices only mapped their playback PCMs, so PipeWire's ACP fell back to software volume/mute controls.

- TAS2783: the two amplifiers expose one mono Speaker Volume control each plus per-amplifier DAPM speaker switches. There is no stereo Speaker Playback Volume/Switch pair for ACP to bind.
- TAS2783: BootSequence used Left Spk, Right Spk, Left Spk2 and Right Spk2, but the actual controls are Left Spk Switch etc.
- RT721: the Headphones device did not map rt721 FU05 Playback Volume or Headphone Switch.

## Changes

- fec8ba0 ucm2: sof-soundwire: expose TAS2783 speaker hardware volume Create a stereo Speaker Playback Volume/Switch from the two mono TAS2783 volume controls and the two speaker switches, and bind it to the Speaker device. This is limited to the two-amplifier topology; one- and four-amplifier systems keep the existing behavior.
- 269581a ucm2: codecs/tas2783: fix speaker switch names in BootSequence Use the real DAPM control names.
- f2f2113 ucm2: sof-soundwire/rt721: expose headphone hardware volume Bind rt721 FU05 Playback Volume and Headphone Switch to the Headphones device.

## Testing

Tested on ASUS ProArt PX13 HN7306EA (AMD ACP SoundWire, RT721 + 2x TAS2783) with kernel 7.4.0-rc5:

- alsaucm -c hw:1 dump text with the new tree shows:
- Speaker: PlaybackMixer, PlaybackMixerElem "Speaker"
- Headphones: PlaybackMixer, PlaybackVolume, PlaybackSwitch
- The TAS2783 virtual Speaker Playback Volume maps left/right correctly:
setting 150,160 updates tas2783-1 to 150 and tas2783-2 to 160.
- The TAS2783 virtual Speaker Playback Switch toggles both Left Spk Switch and Right Spk Switch.
- rt721 FU05 Playback Volume is stereo, range 0..87, 0.75 dB step; Headphone Switch is present.

## Notes

- The TAS2783 remap is intentionally two-amplifier only. Four-amplifier systems keep the existing software-volume fallback.
- The RT721 PlaybackSwitch is set unconditionally. Systems without the machine-driver Headphone Switch keep hardware volume and fall back to software mute.

Request URL : https://github.com/alsa-project/alsa-ucm-conf/pull/941
Patch URL : https://github.com/alsa-project/alsa-ucm-conf/pull/941.patch
Repository URL: https://github.com/alsa-project/alsa-ucm-conf

#3 lore raw
In reply to a message not in the archive

alsa-project/alsa-ucm-conf pull request #941 was edited from cathay4t:

This series fixes the internal speaker and headphone hardware volume/mute on the ASUS ProArt PX13 HN7306EA (AMD ACP SoundWire, RT721 + 2x TAS2783).

## Problem

The UCM Speaker and Headphones devices only mapped their playback PCMs, so PipeWire's ACP fell back to software volume/mute controls.

- TAS2783: the two amplifiers expose one mono Speaker Volume control each plus per-amplifier DAPM speaker switches. There is no stereo Speaker Playback Volume/Switch pair for ACP to bind.
- TAS2783: BootSequence used Left Spk, Right Spk, Left Spk2 and Right Spk2, but the actual controls are Left Spk Switch etc.
- RT721: the Headphones device did not map rt721 FU05 Playback Volume or Headphone Switch.

## Changes

- fec8ba0 ucm2: sof-soundwire: expose TAS2783 speaker hardware volume Create a stereo Speaker Playback Volume/Switch from the two mono TAS2783 volume controls and the two speaker switches, and bind it to the Speaker device. This is limited to the two-amplifier topology; one- and four-amplifier systems keep the existing behavior.
- 269581a ucm2: codecs/tas2783: fix speaker switch names in BootSequence Use the real DAPM control names.
- 38386b5 ucm2: sof-soundwire/rt721: expose headphone hardware volume and mute Bind the Headphones device to the rt721 FU05 mixer element and create a virtual rt721 FU05 Playback Switch from Headphone Switch. Guard the remap with HeadsetCodec1 for RT721 headset configurations.

## Testing

Tested on ASUS ProArt PX13 HN7306EA (AMD ACP SoundWire, RT721 + 2x TAS2783) with kernel 7.4.0-rc5-00107:

- Speaker: tas2783-1/tas2783-2 change 153,153 -> 174,174 -> 153,153 when the sink volume changes 40% -> 60% -> 40%.
- Speaker mute toggles Left Spk Switch and Right Spk Switch off/on.
- Headphones: rt721 FU05 changes 32,32 -> 70,70 -> 32,32 when the sink volume changes 20% -> 60% -> 20%.
- Headphones mute toggles Headphone Switch off/on.
- PipeWire reports HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME for the Headphones sink and HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME for the Speaker sink.
- alsaucm -c hw:1 dump text shows the expected PlaybackMixer, PlaybackMixerElem, PlaybackVolume and PlaybackSwitch values.
- No TAS2783/ASoC errors appeared after reboot with the updated kernel.

## Notes

- The TAS2783 remap is intentionally two-amplifier only. Four-amplifier systems keep the existing software-volume fallback.
- The RT721 virtual switch remap is guarded by HeadsetCodec1, so it is only added for RT721 headset configurations.

Request URL : https://github.com/alsa-project/alsa-ucm-conf/pull/941
Patch URL : https://github.com/alsa-project/alsa-ucm-conf/pull/941.patch
Repository URL: https://github.com/alsa-project/alsa-ucm-conf

#4 lore raw
In reply to a message not in the archive

alsa-project/alsa-ucm-conf pull request #941 was edited from cathay4t:

This series fixes the internal speaker and headphone hardware volume/mute on the ASUS ProArt PX13 HN7306EA (AMD ACP SoundWire, RT721 + 2x TAS2783).

## Problem

The UCM Speaker and Headphones devices only mapped their playback PCMs, so PipeWire's ACP fell back to software volume/mute controls.

- TAS2783: the two amplifiers expose one mono Speaker Volume control each plus per-amplifier DAPM speaker switches. There is no stereo Speaker Playback Volume/Switch pair for ACP to bind.
- TAS2783: BootSequence used Left Spk, Right Spk, Left Spk2 and Right Spk2, but the actual controls are Left Spk Switch etc.
- RT721: the Headphones device exposed rt721 FU05 Playback Volume and Headphone Switch as separate controls. ACP derives the switch name from PlaybackMixerElem, so it could not bind them as a hardware volume/mute pair.

## Changes

- fec8ba0 ucm2: sof-soundwire: expose TAS2783 speaker hardware volume Create a stereo Speaker Playback Volume/Switch from the two mono TAS2783 volume controls and the two speaker switches, and bind it to the Speaker device. This is limited to the two-amplifier topology; one- and four-amplifier systems keep the existing behavior.
- 269581a ucm2: codecs/tas2783: fix speaker switch names in BootSequence Use the real DAPM control names.
- 38386b5 ucm2: sof-soundwire/rt721: expose headphone hardware volume and mute Bind the Headphones device to the rt721 FU05 mixer element and create a virtual rt721 FU05 Playback Switch from Headphone Switch. Guard the remap with HeadsetCodec1 for RT721 headset configurations.

## Testing

Tested on ASUS ProArt PX13 HN7306EA (AMD ACP SoundWire, RT721 + 2x TAS2783) with kernel 7.4.0-rc5-00107:

- Speaker: tas2783-1/tas2783-2 change 153,153 -> 174,174 -> 153,153 when the sink volume changes 40% -> 60% -> 40%.
- Speaker mute toggles Left Spk Switch and Right Spk Switch off/on.
- Headphones: rt721 FU05 changes 32,32 -> 70,70 -> 32,32 when the sink volume changes 20% -> 60% -> 20%.
- Headphones mute toggles Headphone Switch off/on.
- Both Speaker and Headphones sinks report
HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME.
- alsaucm -c hw:1 dump text shows the expected PlaybackMixer, PlaybackMixerElem, PlaybackVolume and PlaybackSwitch values.
- The card remained stable during the final test; there was no new ASoC error or card reset.

## Notes

- The TAS2783 remap is intentionally two-amplifier only. Four-amplifier systems keep the existing software-volume fallback.
- The RT721 virtual switch remap is guarded by HeadsetCodec1, so it is only added for RT721 headset configurations.

Request URL : https://github.com/alsa-project/alsa-ucm-conf/pull/941
Patch URL : https://github.com/alsa-project/alsa-ucm-conf/pull/941.patch
Repository URL: https://github.com/alsa-project/alsa-ucm-conf