diff mbox series

[alsa-ucm-conf] codecs/rt5672: Remove Intel SST specific HeadsetMic workaround

Message ID 20210209210101.76119-1-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series [alsa-ucm-conf] codecs/rt5672: Remove Intel SST specific HeadsetMic workaround | expand

Commit Message

Hans de Goede Feb. 9, 2021, 9:01 p.m. UTC
There used to be an issue with the HeadsetMic on BYT devices with
a rt5672 codec only being recorded on the left channel, while the
right channel recorded silence.

The ucm2/codecs/rt5672/HeadsetMic.conf contains a workaround for
this which changes the SST record-stream demuxer settings to
use "slot 0" for both the left and right channels when recording
from the HeadsetMic.

There are 2 problems with this workaround:

1. It uses SST specific mixer settings causing things to break
when using the SOF driver.

2. Files under uc2m/codecs should be architecture agnostic and should
not depend on platform dependent mixer settings such as the SST driver
mixer settings.

The problem which the workaround used to work around has since been
fixed in the kernel by switching the wire format from TDM/DSP A to I2S:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ceb8a36d023d4bb4ffca3474a452fb1dfaa0ef2

This fix has landed in 5.8 and has been backported to all recent
stable kernel releases.

Since this is fixed in the kernel now, we can drop the workaround,
fixing the 2 problems mentioned above.

This was tested on a ThinkPad 8 tablet, which is the same device as
where the HeadsetMic problem was originally noticed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/codecs/rt5672/HeadsetMic.conf | 7 -------
 1 file changed, 7 deletions(-)

Comments

Jaroslav Kysela Feb. 11, 2021, 7:16 p.m. UTC | #1
Dne 09. 02. 21 v 22:01 Hans de Goede napsal(a):
> There used to be an issue with the HeadsetMic on BYT devices with
> a rt5672 codec only being recorded on the left channel, while the
> right channel recorded silence.
> 
> The ucm2/codecs/rt5672/HeadsetMic.conf contains a workaround for
> this which changes the SST record-stream demuxer settings to
> use "slot 0" for both the left and right channels when recording
> from the HeadsetMic.
> 
> There are 2 problems with this workaround:
> 
> 1. It uses SST specific mixer settings causing things to break
> when using the SOF driver.
> 
> 2. Files under uc2m/codecs should be architecture agnostic and should
> not depend on platform dependent mixer settings such as the SST driver
> mixer settings.
> 
> The problem which the workaround used to work around has since been
> fixed in the kernel by switching the wire format from TDM/DSP A to I2S:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0ceb8a36d023d4bb4ffca3474a452fb1dfaa0ef2
> 
> This fix has landed in 5.8 and has been backported to all recent
> stable kernel releases.
> 
> Since this is fixed in the kernel now, we can drop the workaround,
> fixing the 2 problems mentioned above.
> 
> This was tested on a ThinkPad 8 tablet, which is the same device as
> where the HeadsetMic problem was originally noticed.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

The patch was applied to the alsa-ucm-conf repository.

					Jaroslav
diff mbox series

Patch

diff --git a/ucm2/codecs/rt5672/HeadsetMic.conf b/ucm2/codecs/rt5672/HeadsetMic.conf
index a764d82..fc061b0 100644
--- a/ucm2/codecs/rt5672/HeadsetMic.conf
+++ b/ucm2/codecs/rt5672/HeadsetMic.conf
@@ -12,11 +12,6 @@  SectionDevice."Headset" {
 		cset "name='RECMIXR BST1 Switch' on"
 		cset "name='Sto1 ADC MIXL ADC1 Switch' on"
 		cset "name='Sto1 ADC MIXR ADC1 Switch' on"
-		# For unknown reasons the headset mic sound is only recorded
-		# on the left channel, we tweak the data-stream reception to
-		# use the left samples for both slots, so that we get a stereo
-		# stream with the mic sound on both channels
-		cset "name='codec_in rx deinterleaver codec_in0_1' 1"
 	]
 
 	DisableSequence [
@@ -25,8 +20,6 @@  SectionDevice."Headset" {
 		cset "name='RECMIXR BST1 Switch' off"
 		cset "name='Sto1 ADC MIXL ADC1 Switch' off"
 		cset "name='Sto1 ADC MIXR ADC1 Switch' off"
-		# Undo data-stream reception mono-mix workaround
-		cset "name='codec_in rx deinterleaver codec_in0_1' 2"
 	]
 
 	Value {