]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2023 18:05:27 +0000 (20:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2023 18:05:27 +0000 (20:05 +0200)
added patches:
alsa-usb-audio-fix-microphone-sound-on-opencomm2-headset.patch
asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch

queue-5.15/alsa-usb-audio-fix-microphone-sound-on-opencomm2-headset.patch [new file with mode: 0644]
queue-5.15/asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/alsa-usb-audio-fix-microphone-sound-on-opencomm2-headset.patch b/queue-5.15/alsa-usb-audio-fix-microphone-sound-on-opencomm2-headset.patch
new file mode 100644 (file)
index 0000000..c15bce2
--- /dev/null
@@ -0,0 +1,43 @@
+From 6a83d6f3bb3c329a73e3483651fb77b78bac1878 Mon Sep 17 00:00:00 2001
+From: WhaleChang <whalechang@google.com>
+Date: Fri, 6 Oct 2023 12:48:49 +0800
+Subject: ALSA: usb-audio: Fix microphone sound on Opencomm2 Headset
+
+From: WhaleChang <whalechang@google.com>
+
+commit 6a83d6f3bb3c329a73e3483651fb77b78bac1878 upstream.
+
+When a Opencomm2 Headset is connected to a Bluetooth USB dongle,
+the audio playback functions properly, but the microphone does not work.
+
+In the dmesg logs, there are messages indicating that the init_pitch
+function fails when the capture process begins.
+
+The microphone only functions when the ep pitch control is not set.
+
+Toggling the pitch control off bypasses the init_piatch function
+and allows the microphone to work.
+
+Signed-off-by: WhaleChang <whalechang@google.com>
+Link: https://lore.kernel.org/r/20231006044852.4181022-1-whalechang@google.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/quirks.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -1725,7 +1725,11 @@ void snd_usb_audioformat_attributes_quir
+               /* mic works only when ep packet size is set to wMaxPacketSize */
+               fp->attributes |= UAC_EP_CS_ATTR_FILL_MAX;
+               break;
+-
++      case USB_ID(0x3511, 0x2b1e): /* Opencomm2 UC USB Bluetooth dongle */
++              /* mic works only when ep pitch control is not set */
++              if (stream == SNDRV_PCM_STREAM_CAPTURE)
++                      fp->attributes &= ~UAC_EP_CS_ATTR_PITCH_CONTROL;
++              break;
+       }
+ }
diff --git a/queue-5.15/asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch b/queue-5.15/asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch
new file mode 100644 (file)
index 0000000..7dd285c
--- /dev/null
@@ -0,0 +1,53 @@
+From 197c53c8ecb34f2cd5922f4bdcffa8f701a134eb Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.wang@nxp.com>
+Date: Tue, 19 Sep 2023 17:42:13 +0800
+Subject: ASoC: fsl_sai: Don't disable bitclock for i.MX8MP
+
+From: Shengjiu Wang <shengjiu.wang@nxp.com>
+
+commit 197c53c8ecb34f2cd5922f4bdcffa8f701a134eb upstream.
+
+On i.MX8MP, the BCE and TERE bit are binding with mclk
+enablement, if BCE and TERE are cleared the MCLK also be
+disabled on output pin, that cause the external codec (wm8960)
+in wrong state.
+
+Codec (wm8960) is using the mclk to generate PLL clock,
+if mclk is disabled before disabling PLL, the codec (wm8960)
+won't generate bclk and frameclk when sysclk switch to
+MCLK source in next test case.
+
+The test case:
+$aplay -r44100 test1.wav (PLL source)
+$aplay -r48000 test2.wav (MCLK source)
+aplay: pcm_write:2127: write error: Input/output error
+
+Fixes: 269f399dc19f ("ASoC: fsl_sai: Disable bit clock with transmitter")
+Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+Link: https://lore.kernel.org/r/1695116533-23287-1-git-send-email-shengjiu.wang@nxp.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/fsl/fsl_sai.c |    9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/sound/soc/fsl/fsl_sai.c
++++ b/sound/soc/fsl/fsl_sai.c
+@@ -557,10 +557,15 @@ static void fsl_sai_config_disable(struc
+ {
+       unsigned int ofs = sai->soc_data->reg_offset;
+       bool tx = dir == TX;
+-      u32 xcsr, count = 100;
++      u32 xcsr, count = 100, mask;
++
++      if (sai->soc_data->mclk_with_tere && sai->mclk_direction_output)
++              mask = FSL_SAI_CSR_TERE;
++      else
++              mask = FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE;
+       regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx, ofs),
+-                         FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE, 0);
++                         mask, 0);
+       /* TERE will remain set till the end of current frame */
+       do {
index e33d8984d71b49b8c9315f49c68dfa9f216981d0..ecf92ba308f2fdeb07001ad8385adebc7951fd32 100644 (file)
@@ -12,3 +12,5 @@ lib-test_meminit-fix-off-by-one-error-in-test_pages.patch
 hid-logitech-hidpp-fix-kernel-crash-on-receiver-usb-disconnect.patch
 quota-fix-slow-quotaoff.patch
 net-prevent-address-rewrite-in-kernel_bind.patch
+alsa-usb-audio-fix-microphone-sound-on-opencomm2-headset.patch
+asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch