Skip to content

ASoC: Add q6voice ready for FP5 with dynamic bit rate#27

Open
wrenix wants to merge 36 commits into
sc7280-mainline:sc7280-7.0.yfrom
wrenix:sc7280-7.0.y-voice
Open

ASoC: Add q6voice ready for FP5 with dynamic bit rate#27
wrenix wants to merge 36 commits into
sc7280-mainline:sc7280-7.0.yfrom
wrenix:sc7280-7.0.y-voice

Conversation

@wrenix

@wrenix wrenix commented Apr 28, 2026

Copy link
Copy Markdown

This PR is more then the branch of @bhush9 :
sc7280-6.18.y...bhush9:linux:sc7280-6.18.y-q6voice

So i hope it is okay to improve your work and bring it upstream.

Most of the additional patches are from sdm760:

PS @valpackett : If you like i will signed-off the last commit by your name+mail (ping me for the correct signature)

@wrenix wrenix changed the title Add q6voice for FP5 ASoc: Add q6voice ready for FP5 Apr 28, 2026
@wrenix wrenix changed the title ASoc: Add q6voice ready for FP5 ASoC: Add q6voice ready for FP5 Apr 28, 2026
@wrenix wrenix force-pushed the sc7280-7.0.y-voice branch from 72e978c to e021656 Compare April 28, 2026 22:22
@valpackett

Copy link
Copy Markdown

ASoC: qdsp6: q6voice-dai: add tdm

Do we have any devices using TDM with this SoC?


I'll need senary MI2S for dubai though:

patch here
From 443c0f835be6bd4d7726b2cfd8902cd72a91111c Mon Sep 17 00:00:00 2001
From: Val Packett <val@packett.cool>
Date: Mon, 6 Apr 2026 23:50:24 -0300
Subject: [PATCH] ASoC: qdsp6: q6voice-dai: add routes for Senary MI2S

Signed-off-by: Val Packett <val@packett.cool>
---
 sound/soc/qcom/qdsp6/q6voice-dai.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/sound/soc/qcom/qdsp6/q6voice-dai.c b/sound/soc/qcom/qdsp6/q6voice-dai.c
index 93318d10e145..4ef5becb4bdf 100644
--- a/sound/soc/qcom/qdsp6/q6voice-dai.c
+++ b/sound/soc/qcom/qdsp6/q6voice-dai.c
@@ -198,6 +198,8 @@ static const struct snd_kcontrol_new cs_voice_tx_mixer_controls[] = {
 		       q6voice_get_mixer_capture, q6voice_put_mixer_capture),
 	SOC_SINGLE_EXT("QUIN_MI2S_TX", QUINARY_MI2S_TX, CS_VOICE, 1, 0,
 		       q6voice_get_mixer_capture, q6voice_put_mixer_capture),
+	SOC_SINGLE_EXT("SEN_MI2S_TX", SENARY_MI2S_TX, CS_VOICE, 1, 0,
+		       q6voice_get_mixer_capture, q6voice_put_mixer_capture),
 };
 
 static const struct snd_kcontrol_new voicemmode1_tx_mixer_controls[] = {
@@ -211,6 +213,8 @@ static const struct snd_kcontrol_new voicemmode1_tx_mixer_controls[] = {
 		       q6voice_get_mixer_capture, q6voice_put_mixer_capture),
 	SOC_SINGLE_EXT("QUIN_MI2S_TX", QUINARY_MI2S_TX, VOICEMMODE1, 1, 0,
 		       q6voice_get_mixer_capture, q6voice_put_mixer_capture),
+	SOC_SINGLE_EXT("SEN_MI2S_TX", SENARY_MI2S_TX, VOICEMMODE1, 1, 0,
+		       q6voice_get_mixer_capture, q6voice_put_mixer_capture),
 };
 
 static const struct snd_kcontrol_new primary_mi2s_rx_mixer_controls[] = {
@@ -248,6 +252,13 @@ static const struct snd_kcontrol_new quinary_mi2s_rx_mixer_controls[] = {
 		       q6voice_get_mixer_playback, q6voice_put_mixer_playback),
 };
 
+static const struct snd_kcontrol_new senary_mi2s_rx_mixer_controls[] = {
+	SOC_SINGLE_EXT("CS-Voice", SENARY_MI2S_RX, CS_VOICE, 1, 0,
+		       q6voice_get_mixer_playback, q6voice_put_mixer_playback),
+	SOC_SINGLE_EXT("VoiceMMode1", SENARY_MI2S_RX, VOICEMMODE1, 1, 0,
+		       q6voice_get_mixer_playback, q6voice_put_mixer_playback),
+};
+
 static const struct snd_soc_dapm_widget q6voice_dapm_widgets[] = {
 	SND_SOC_DAPM_AIF_IN("CS-VOICE_DL1", "CS-VOICE Playback", 0, SND_SOC_NOPM, 0, 0),
 	SND_SOC_DAPM_AIF_OUT("CS-VOICE_UL1", "CS-VOICE Capture", 0, SND_SOC_NOPM, 0, 0),
@@ -274,6 +285,9 @@ static const struct snd_soc_dapm_widget q6voice_dapm_widgets[] = {
 	SND_SOC_DAPM_MIXER("QUIN_MI2S_RX Voice Mixer", SND_SOC_NOPM, 0, 0,
 			   quinary_mi2s_rx_mixer_controls,
 			   ARRAY_SIZE(quinary_mi2s_rx_mixer_controls)),
+	SND_SOC_DAPM_MIXER("SEN_MI2S_RX Voice Mixer", SND_SOC_NOPM, 0, 0,
+			   senary_mi2s_rx_mixer_controls,
+			   ARRAY_SIZE(senary_mi2s_rx_mixer_controls)),
 };
 
 static const struct snd_soc_dapm_route q6voice_dapm_routes[] = {
@@ -282,12 +296,14 @@ static const struct snd_soc_dapm_route q6voice_dapm_routes[] = {
 	{ "CS-Voice Capture Mixer",	"TERT_MI2S_TX",	"TERT_MI2S_TX" },
 	{ "CS-Voice Capture Mixer",	"QUAT_MI2S_TX",	"QUAT_MI2S_TX" },
 	{ "CS-Voice Capture Mixer",	"QUIN_MI2S_TX",	"QUIN_MI2S_TX" },
+	{ "CS-Voice Capture Mixer",	"SEN_MI2S_TX",	"SEN_MI2S_TX" },
 	{ "CS-VOICE_UL1",		NULL,		"CS-Voice Capture Mixer" },
 	{ "VoiceMMode1 Capture Mixer",	"PRI_MI2S_TX",	"PRI_MI2S_TX" },
 	{ "VoiceMMode1 Capture Mixer",	"SEC_MI2S_TX",	"SEC_MI2S_TX" },
 	{ "VoiceMMode1 Capture Mixer",	"TERT_MI2S_TX",	"TERT_MI2S_TX" },
 	{ "VoiceMMode1 Capture Mixer",	"QUAT_MI2S_TX",	"QUAT_MI2S_TX" },
 	{ "VoiceMMode1 Capture Mixer",	"QUIN_MI2S_TX",	"QUIN_MI2S_TX" },
+	{ "VoiceMMode1 Capture Mixer",	"SEN_MI2S_TX",	"SEN_MI2S_TX" },
 	{ "VOICEMMODE1_UL1",		NULL,		"VoiceMMode1 Capture Mixer" },
 
 	{ "PRI_MI2S_RX Voice Mixer",	"CS-Voice",	"CS-VOICE_DL1" },
@@ -295,17 +311,20 @@ static const struct snd_soc_dapm_route q6voice_dapm_routes[] = {
 	{ "TERT_MI2S_RX Voice Mixer",	"CS-Voice",	"CS-VOICE_DL1" },
 	{ "QUAT_MI2S_RX Voice Mixer",	"CS-Voice",	"CS-VOICE_DL1" },
 	{ "QUIN_MI2S_RX Voice Mixer",	"CS-Voice",	"CS-VOICE_DL1" },
+	{ "SEN_MI2S_RX Voice Mixer",	"CS-Voice",	"CS-VOICE_DL1" },
 	{ "PRI_MI2S_RX Voice Mixer",	"VoiceMMode1",	"VOICEMMODE1_DL1" },
 	{ "SEC_MI2S_RX Voice Mixer",	"VoiceMMode1",	"VOICEMMODE1_DL1" },
 	{ "TERT_MI2S_RX Voice Mixer",	"VoiceMMode1",	"VOICEMMODE1_DL1" },
 	{ "QUAT_MI2S_RX Voice Mixer",	"VoiceMMode1",	"VOICEMMODE1_DL1" },
 	{ "QUIN_MI2S_RX Voice Mixer",	"VoiceMMode1",	"VOICEMMODE1_DL1" },
+	{ "SEN_MI2S_RX Voice Mixer",	"VoiceMMode1",	"VOICEMMODE1_DL1" },
 
 	{ "PRI_MI2S_RX",		NULL,		"PRI_MI2S_RX Voice Mixer" },
 	{ "SEC_MI2S_RX",		NULL,		"SEC_MI2S_RX Voice Mixer" },
 	{ "TERT_MI2S_RX",		NULL,		"TERT_MI2S_RX Voice Mixer" },
 	{ "QUAT_MI2S_RX",		NULL,		"QUAT_MI2S_RX Voice Mixer" },
 	{ "QUIN_MI2S_RX",		NULL,		"QUIN_MI2S_RX Voice Mixer" },
+	{ "SEN_MI2S_RX",		NULL,		"SEN_MI2S_RX Voice Mixer" },
 };
 
 static unsigned int q6voice_reg_read(struct snd_soc_component *component,
-- 
2.53.0

If you like i will signed-off the last commit by your name+mail (ping me for the correct signature)

I can give you my entire commit:

patch here
From 2287b3efbd60d6693151a640a511c32a75467220 Mon Sep 17 00:00:00 2001
From: Val Packett <val@packett.cool>
Date: Mon, 20 Apr 2026 15:54:45 -0300
Subject: [PATCH] ASoC: qdsp6: q6voice: default to NONE topology for TX

On kodiak + wcd9375, only this topology seems to work so far for the mic.

Signed-off-by: Val Packett <val@packett.cool>
---
 sound/soc/qcom/qdsp6/q6voice.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6voice.c b/sound/soc/qcom/qdsp6/q6voice.c
index 461a5eceb3cf..bb27cb7c0d0b 100644
--- a/sound/soc/qcom/qdsp6/q6voice.c
+++ b/sound/soc/qcom/qdsp6/q6voice.c
@@ -13,6 +13,7 @@
 #include "q6mvm.h"
 #include "q6voice-common.h"
 
+#define VSS_IVOCPROC_TOPOLOGY_ID_NONE		0x00010F70
 #define VSS_IVOCPROC_TOPOLOGY_ID_TX_SM_ECNS		0x00010F71
 #define VSS_IVOCPROC_TOPOLOGY_ID_RX_DEFAULT		0x00010F77
 
@@ -267,7 +268,7 @@ struct q6voice *q6voice_create(struct device *dev, bool cvd_v2_3)
 
 		p->v = v;
 		p->type = path;
-		p->tx_topo = VSS_IVOCPROC_TOPOLOGY_ID_TX_SM_ECNS;
+		p->tx_topo = VSS_IVOCPROC_TOPOLOGY_ID_NONE;
 		p->rx_topo = VSS_IVOCPROC_TOPOLOGY_ID_RX_DEFAULT;
 		mutex_init(&p->lock);
 	}
-- 
2.53.0

but yes feel free to put my From+S-o-b on any version of the same change.

@wrenix wrenix force-pushed the sc7280-7.0.y-voice branch from e021656 to bc8d81a Compare April 29, 2026 05:53
@wrenix

wrenix commented Apr 29, 2026

Copy link
Copy Markdown
Author

good point for TDM i drop it and add/change the patches to yours.

I try to build and test the kernel with additional patches for MI2S now.
Hope i got everything related to MI2S, i skip the internals ( e.g. the FP5 has no audiojack).

@wrenix wrenix force-pushed the sc7280-7.0.y-voice branch 2 times, most recently from edc09d6 to cba22bf Compare April 29, 2026 07:49
@wrenix wrenix marked this pull request as draft April 29, 2026 07:58
@z3ntu

z3ntu commented Apr 29, 2026

Copy link
Copy Markdown
Member

Hope i got everything related to MI2S, i skip the internals ( e.g. the FP5 has no audiojack).

It does have - in a slightly obscure way. It supports analog audio over USB-C which uses the same playback path from WCD9385 that a 3.5mm headphone jack would use. So also that call audio path is in-scope.

@valpackett

Copy link
Copy Markdown

Same on my moto (but with wcd9375). USB-C jack is only currently supported on wcd939x (which has its own mux even). I've tried to get similar code to work in the 937x driver but didn't manage to do it yet

@z3ntu

z3ntu commented Apr 29, 2026

Copy link
Copy Markdown
Member

I've got WIP for the WCD9385 of that which sorta works. I should probably send at least an RFC upstream so it's somewhere visible.

@wrenix wrenix force-pushed the sc7280-7.0.y-voice branch from cba22bf to e9a77b2 Compare April 29, 2026 14:05
@wrenix

wrenix commented Apr 29, 2026

Copy link
Copy Markdown
Author

Current i got not ASoC-qdsp6-q6dsp-lpass-ports-add-internal-mi2s-support.patch to apply. Maybe it take some time/days till i got it working.

Lot of private stuff todo the next days.

@wrenix wrenix force-pushed the sc7280-7.0.y-voice branch 3 times, most recently from f89d8ce to b702c9b Compare April 30, 2026 07:56
@wrenix

wrenix commented Apr 30, 2026

Copy link
Copy Markdown
Author

With the current patches (last commit b702c9bf05826687ae84e45b2cd49742dbad0fef), i was able to compile the kernel.
But sadly it does not work.

Maybe lets get working just FP5 and later you add MI2S for
https://wiki.postmarketos.org/wiki/Motorola_Edge_30_(motorola-dubai)

dmesg:

[   38.057702] Mass Storage Function, version: 2009/09/11
[   38.057708] LUN: removable file: (no medium)
[   38.063281] file system registered
[   38.273064] [drm:dpu_crtc_get_vblank_counter] *ERROR* no encoder found for crtc 0
[   38.793217]  MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1, possibly missing ALSA mixer-based routing or UCM profile
[   38.895668] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.895693] aw88261 2-0035: mode1 iis signal check error
[   38.898973] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.898999] aw88261 2-0034: mode1 iis signal check error
[   38.899582] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.899594] aw88261 2-0035: mode1 iis signal check error
[   38.901699] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.901717] aw88261 2-0034: mode1 iis signal check error
[   38.902371] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.902379] aw88261 2-0035: mode1 iis signal check error
[   38.904622] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.904650] aw88261 2-0034: mode1 iis signal check error
[   38.905726] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.905743] aw88261 2-0035: mode1 iis signal check error
[   38.907383] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.907401] aw88261 2-0034: mode1 iis signal check error
[   38.909122] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.909143] aw88261 2-0035: mode1 iis signal check error
[   38.910089] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.910104] aw88261 2-0034: mode1 iis signal check error
[   38.911872] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.911892] aw88261 2-0035: mode1 iis signal check error
[   38.913055] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.913079] aw88261 2-0034: mode1 iis signal check error
[   38.914636] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.914649] aw88261 2-0035: mode1 iis signal check error
[   38.915818] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.915831] aw88261 2-0034: mode1 iis signal check error
[   38.918568] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.918584] aw88261 2-0034: mode1 iis signal check error
[   38.920925] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.920935] aw88261 2-0035: mode1 iis signal check error
[   38.921601] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.921611] aw88261 2-0034: mode1 iis signal check error
[   38.923734] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.923756] aw88261 2-0035: mode1 iis signal check error
[   38.924483] aw88261 2-0034: check pll lock fail,reg_val:0x0000
[   38.924507] aw88261 2-0034: mode1 iis signal check error
[   38.926474] aw88261 2-0035: check pll lock fail,reg_val:0x0000
[   38.926484] aw88261 2-0035: mode1 iis signal check error
[   38.927194] aw88261 2-0034: mode2 check iis failed
[   38.927200] aw88261 2-0034: pll check failed cannot start
[   38.928354] aw88261 2-0034: aw88261 device start failed. retry = 0
[   38.930075] aw88261 2-0035: mode2 check iis failed
[   38.930085] aw88261 2-0035: pll check failed cannot start
[   38.933412] aw88261 2-0035: aw88261 device start failed. retry = 0

@wrenix wrenix force-pushed the sc7280-7.0.y-voice branch 5 times, most recently from 3ced794 to a9ca06f Compare April 30, 2026 15:23
@wrenix

wrenix commented Apr 30, 2026

Copy link
Copy Markdown
Author

the current version looks better, make some call checks tomorrow.

@valpackett

Copy link
Copy Markdown

reg_val:0x0000

@wrenix during the call?

At least for me, with the sdm670 patches / cvd2.3 initialization, initially only outgoing (mic) audio worked but the speakers didn't. (Before the sdm670 stuff, only the speakers worked, somehow… but they shouldn't've??) Though interestingly you did not set the cvd2.3 property for fp5 there so it shooouldn't be using the new initialization at all.

The reason it didn't work was the whole 32-bit hack for AW88261 (as the call audio was 16-bit anyway), which I then got rid of. I'm still iterating on that patchset,

here's the latest WIP version I have for just what we need here
From 7535bb03419c46df2a7c21c849c036cd70a5b87c Mon Sep 17 00:00:00 2001
From: Val Packett <val@packett.cool>
Date: Sun, 19 Apr 2026 22:55:14 -0300
Subject: [PATCH] ASoC: codecs: aw88261: support changing sample rate and bit
 width

The aw88261 driver only worked with 32-bit 48kHz streams so far due to
the lack of a proper PLL initialization sequence. Fix by selecting all
the necessary PLL settings based on what was passed to us in the
hw_params DAI callback. This replaces the strange downstream routine
that tries two divider modes in sequence.

Signed-off-by: Val Packett <val@packett.cool>
---
 sound/soc/codecs/aw88261.c | 253 ++++++++++++++++++++++++++++---------
 sound/soc/codecs/aw88261.h | 114 ++++++++++++++++-
 2 files changed, 304 insertions(+), 63 deletions(-)

diff --git a/sound/soc/codecs/aw88261.c b/sound/soc/codecs/aw88261.c
index a6805d5405cd..c5bb9fcbc242 100644
--- a/sound/soc/codecs/aw88261.c
+++ b/sound/soc/codecs/aw88261.c
@@ -13,6 +13,7 @@
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
 #include <sound/soc.h>
+#include <sound/pcm_params.h>
 #include "aw88261.h"
 #include "aw88395/aw88395_data_type.h"
 #include "aw88395/aw88395_device.h"
@@ -158,7 +159,7 @@ static int aw88261_dev_get_iis_status(struct aw_device *aw_dev)
 	return ret;
 }
 
-static int aw88261_dev_check_mode1_pll(struct aw_device *aw_dev)
+static int aw88261_dev_check_pll(struct aw_device *aw_dev)
 {
 	int ret, i;
 
@@ -175,71 +176,158 @@ static int aw88261_dev_check_mode1_pll(struct aw_device *aw_dev)
 	return -EPERM;
 }
 
-static int aw88261_dev_check_mode2_pll(struct aw_device *aw_dev)
-{
-	unsigned int reg_val;
-	int ret, i;
-
-	ret = regmap_read(aw_dev->regmap, AW88261_PLLCTRL1_REG, &reg_val);
-	if (ret)
-		return ret;
-
-	reg_val &= (~AW88261_CCO_MUX_MASK);
-	if (reg_val == AW88261_CCO_MUX_DIVIDED_VALUE) {
-		dev_dbg(aw_dev->dev, "CCO_MUX is already divider");
-		return -EPERM;
-	}
-
-	/* change mode2 */
-	ret = regmap_update_bits(aw_dev->regmap, AW88261_PLLCTRL1_REG,
-			~AW88261_CCO_MUX_MASK, AW88261_CCO_MUX_DIVIDED_VALUE);
-	if (ret)
-		return ret;
-
-	for (i = 0; i < AW88261_DEV_SYSST_CHECK_MAX; i++) {
-		ret = aw88261_dev_get_iis_status(aw_dev);
-		if (ret) {
-			dev_err(aw_dev->dev, "mode2 iis signal check error");
-			usleep_range(AW88261_2000_US, AW88261_2000_US + 10);
-		} else {
-			break;
-		}
-	}
-
-	/* change mode1 */
-	ret = regmap_update_bits(aw_dev->regmap, AW88261_PLLCTRL1_REG,
-			~AW88261_CCO_MUX_MASK, AW88261_CCO_MUX_BYPASS_VALUE);
-	if (ret == 0) {
-		usleep_range(AW88261_2000_US, AW88261_2000_US + 10);
-		for (i = 0; i < AW88261_DEV_SYSST_CHECK_MAX; i++) {
-			ret = aw88261_dev_check_mode1_pll(aw_dev);
-			if (ret) {
-				dev_err(aw_dev->dev, "mode2 switch to mode1, iis signal check error");
-				usleep_range(AW88261_2000_US, AW88261_2000_US + 10);
-			} else {
-				break;
-			}
-		}
-	}
-
-	return ret;
-}
-
-static int aw88261_dev_check_syspll(struct aw_device *aw_dev)
+static int aw88261_dev_configure_syspll(struct aw88261 *aw88261)
 {
+	struct aw_device *aw_dev = aw88261->aw_pa;
+	uint32_t sr_value, fs_value, bck_value, inv_value, md_value;
+	bool bypass_divider = true;
 	int ret;
 
-	ret = aw88261_dev_check_mode1_pll(aw_dev);
-	if (ret) {
-		dev_dbg(aw_dev->dev, "mode1 check iis failed try switch to mode2 check");
-		ret = aw88261_dev_check_mode2_pll(aw_dev);
-		if (ret) {
-			dev_err(aw_dev->dev, "mode2 check iis failed");
-			return ret;
-		}
+	switch (aw88261->sample_rate) {
+	case 8000:
+		sr_value = AW88261_I2SSR_8KHZ_VALUE;
+		bypass_divider = false;
+		break;
+	case 11025:
+		sr_value = AW88261_I2SSR_11P025KHZ_VALUE;
+		break;
+	case 12000:
+		sr_value = AW88261_I2SSR_12KHZ_VALUE;
+		break;
+	case 16000:
+		sr_value = AW88261_I2SSR_16KHZ_VALUE;
+		bypass_divider = false;
+		break;
+	case 22050:
+		sr_value = AW88261_I2SSR_22P05KHZ_VALUE;
+		break;
+	case 24000:
+		sr_value = AW88261_I2SSR_24KHZ_VALUE;
+		break;
+	case 32000:
+		sr_value = AW88261_I2SSR_32KHZ_VALUE;
+		bypass_divider = false;
+		break;
+	case 44100:
+		sr_value = AW88261_I2SSR_44P1KHZ_VALUE;
+		break;
+	case 48000:
+		sr_value = AW88261_I2SSR_48KHZ_VALUE;
+		break;
+	case 96000:
+		sr_value = AW88261_I2SSR_96KHZ_VALUE;
+		break;
+	case 192000:
+		sr_value = AW88261_I2SSR_192KHZ_VALUE;
+		break;
+	default:
+		dev_err(aw_dev->dev, "unsupported sample rate %d\n",
+			aw88261->sample_rate);
+		return -EINVAL;
 	}
 
-	return ret;
+	switch (aw88261->bit_width) {
+	case 16:
+		fs_value = AW88261_I2SFS_16_BITS_VALUE;
+		break;
+	case 20:
+		fs_value = AW88261_I2SFS_20_BITS_VALUE;
+		break;
+	case 24:
+		fs_value = AW88261_I2SFS_24_BITS_VALUE;
+		break;
+	case 32:
+		fs_value = AW88261_I2SFS_32_BITS_VALUE;
+		break;
+	default:
+		dev_err(aw_dev->dev, "unsupported bit width %d\n",
+			aw88261->bit_width);
+		return -EINVAL;
+	}
+
+	switch (aw88261->physical_bit_width) {
+	case 16:
+		bck_value = AW88261_I2SBCK_32FS_VALUE;
+		break;
+	case 24:
+		bck_value = AW88261_I2SBCK_48FS_VALUE;
+		break;
+	case 32:
+		bck_value = AW88261_I2SBCK_64FS_VALUE;
+		break;
+	default:
+		dev_err(aw_dev->dev, "unsupported physical bit width %d\n",
+			aw88261->physical_bit_width);
+		return -EINVAL;
+	}
+
+	switch (aw88261->fmt_inv) {
+	case SND_SOC_DAIFMT_NB_NF:
+		inv_value = AW88261_BCKINV_NOT_INVERT_VALUE;
+		break;
+	case SND_SOC_DAIFMT_IB_NF:
+		inv_value = AW88261_BCKINV_INVERTED_VALUE;
+		break;
+	default:
+		dev_err(aw_dev->dev, "unsupported invert mode 0x%x\n",
+			aw88261->fmt_inv);
+		return -EINVAL;
+	}
+
+	switch (aw88261->fmt_format) {
+	case SND_SOC_DAIFMT_I2S:
+		md_value = AW88261_I2SMD_PHILIPS_STANDARD_VALUE;
+		break;
+	case SND_SOC_DAIFMT_MSB:
+		md_value = AW88261_I2SMD_MSB_JUSTIFIED_VALUE;
+		break;
+	case SND_SOC_DAIFMT_LSB:
+		md_value = AW88261_I2SMD_LSB_JUSTIFIED_VALUE;
+		break;
+	default:
+		dev_err(aw_dev->dev, "unsupported DAI format 0x%x\n",
+			aw88261->fmt_format);
+		return -EINVAL;
+	}
+
+	/* PLL divider must be used for 8/16/32 kHz modes */
+	ret = regmap_update_bits(aw_dev->regmap, AW88261_PLLCTRL1_REG,
+			~AW88261_CCO_MUX_MASK, bypass_divider ?
+			AW88261_CCO_MUX_BYPASS_VALUE : AW88261_CCO_MUX_DIVIDED);
+	if (ret)
+		return ret;
+
+	/* The word clock (WCK) defines the beginning of a frame */
+	ret = regmap_update_bits(aw_dev->regmap, AW88261_I2SCTRL1_REG,
+			~AW88261_I2SSR_MASK, sr_value);
+	if (ret)
+		return ret;
+
+	/* The bit clock (BCK) defines the length of a frame */
+	ret = regmap_update_bits(aw_dev->regmap, AW88261_I2SCTRL1_REG,
+			~AW88261_I2SBCK_MASK, bck_value);
+	if (ret)
+		return ret;
+
+	/* The logical frame size is the width of data for 1 slot */
+	ret = regmap_update_bits(aw_dev->regmap, AW88261_I2SCTRL1_REG,
+			~AW88261_I2SFS_MASK, fs_value);
+	if (ret)
+		return ret;
+
+	/* The I2S interface mode (Philips standard, LSB/MSB justified) */
+	ret = regmap_update_bits(aw_dev->regmap, AW88261_I2SCTRL1_REG,
+			~AW88261_I2SMD_MASK, md_value);
+	if (ret)
+		return ret;
+
+	/* The polarity of the bit clock (BCK) */
+	ret = regmap_update_bits(aw_dev->regmap, AW88261_SYSCTRL_REG,
+			~AW88261_BCKINV_MASK, inv_value);
+	if (ret)
+		return ret;
+
+	return aw88261_dev_check_pll(aw_dev);
 }
 
 static int aw88261_dev_check_sysst(struct aw_device *aw_dev)
@@ -558,7 +646,7 @@ static int aw88261_dev_start(struct aw88261 *aw88261)
 	aw88261_dev_pwd(aw_dev, false);
 	usleep_range(AW88261_2000_US, AW88261_2000_US + 10);
 
-	ret = aw88261_dev_check_syspll(aw_dev);
+	ret = aw88261_dev_configure_syspll(aw88261);
 	if (ret) {
 		dev_err(aw_dev->dev, "pll check failed cannot start");
 		goto pll_check_fail;
@@ -712,6 +800,39 @@ static void aw88261_start(struct aw88261 *aw88261, bool sync_start)
 			AW88261_START_WORK_DELAY_MS);
 }
 
+static int aw88261_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
+{
+	struct snd_soc_component *component = dai->component;
+	struct aw88261 *aw88261 = snd_soc_component_get_drvdata(component);
+
+	/* Only store the settings as the regs do get reset when starting */
+	aw88261->fmt_inv = fmt & SND_SOC_DAIFMT_INV_MASK;
+	aw88261->fmt_format = fmt & SND_SOC_DAIFMT_FORMAT_MASK;
+	return 0;
+}
+
+static int aw88261_hw_params(struct snd_pcm_substream *substream,
+	struct snd_pcm_hw_params *params,
+	struct snd_soc_dai *dai)
+{
+	struct snd_soc_component *component = dai->component;
+	struct aw88261 *aw88261 = snd_soc_component_get_drvdata(component);
+
+	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
+		return 0;
+
+	/* Only store the settings as the regs do get reset when starting */
+	aw88261->sample_rate = params_rate(params);
+	aw88261->bit_width = params_width(params);
+	aw88261->physical_bit_width = params_physical_width(params);
+	return 0;
+}
+
+static const struct snd_soc_dai_ops aw88261_dai_ops = {
+	.set_fmt = aw88261_set_fmt,
+	.hw_params = aw88261_hw_params,
+};
+
 static struct snd_soc_dai_driver aw88261_dai[] = {
 	{
 		.name = "aw88261-aif",
@@ -730,6 +851,7 @@ static struct snd_soc_dai_driver aw88261_dai[] = {
 			.rates = AW88261_RATES,
 			.formats = AW88261_FORMATS,
 		},
+		.ops = &aw88261_dai_ops,
 	},
 };
 
@@ -1249,6 +1371,13 @@ static int aw88261_i2c_probe(struct i2c_client *i2c)
 	if (!aw88261)
 		return -ENOMEM;
 
+	/* set defaults */
+	aw88261->sample_rate = 48000;
+	aw88261->bit_width = 24;
+	aw88261->physical_bit_width = 32;
+	aw88261->fmt_inv = SND_SOC_DAIFMT_NB_NF;
+	aw88261->fmt_format = SND_SOC_DAIFMT_I2S;
+
 	mutex_init(&aw88261->lock);
 
 	i2c_set_clientdata(i2c, aw88261);
diff --git a/sound/soc/codecs/aw88261.h b/sound/soc/codecs/aw88261.h
index 1fee589608d6..55e8b40131f9 100644
--- a/sound/soc/codecs/aw88261.h
+++ b/sound/soc/codecs/aw88261.h
@@ -116,6 +116,19 @@
 #define AW88261_VCALK_SHIFT		(0)
 #define AW88261_VCALKL_SHIFT		(0)
 
+#define AW88261_BCKINV_START_BIT	(4)
+#define AW88261_BCKINV_BITS_LEN	(1)
+#define AW88261_BCKINV_MASK	\
+	(~(((1<<AW88261_BCKINV_BITS_LEN)-1) << AW88261_BCKINV_START_BIT))
+
+#define AW88261_BCKINV_NOT_INVERT	(0)
+#define AW88261_BCKINV_NOT_INVERT_VALUE	\
+	(AW88261_BCKINV_NOT_INVERT << AW88261_BCKINV_START_BIT)
+
+#define AW88261_BCKINV_INVERTED	(1)
+#define AW88261_BCKINV_INVERTED_VALUE	\
+	(AW88261_BCKINV_INVERTED << AW88261_BCKINV_START_BIT)
+
 #define AW88261_AMPPD_START_BIT	(1)
 #define AW88261_AMPPD_BITS_LEN		(1)
 #define AW88261_AMPPD_MASK		\
@@ -264,7 +277,98 @@
 #define AW88261_I2STXEN_ENABLE_VALUE	\
 	(AW88261_I2STXEN_ENABLE << AW88261_I2STXEN_START_BIT)
 
-#define AW88261_CCO_MUX_START_BIT	(14)
+#define AW88261_I2SMD_START_BIT	(8)
+#define AW88261_I2SMD_BITS_LEN	(2)
+#define AW88261_I2SMD_MASK	\
+	(~(((1<<AW88261_I2SMD_BITS_LEN)-1) << AW88261_I2SMD_START_BIT))
+
+#define AW88261_I2SMD_PHILIPS_STANDARD	(0)
+#define AW88261_I2SMD_PHILIPS_STANDARD_VALUE	\
+	(AW88261_I2SMD_PHILIPS_STANDARD << AW88261_I2SMD_START_BIT)
+
+#define AW88261_I2SMD_MSB_JUSTIFIED	(1)
+#define AW88261_I2SMD_MSB_JUSTIFIED_VALUE	\
+	(AW88261_I2SMD_MSB_JUSTIFIED << AW88261_I2SMD_START_BIT)
+
+#define AW88261_I2SMD_LSB_JUSTIFIED	(2)
+#define AW88261_I2SMD_LSB_JUSTIFIED_VALUE	\
+	(AW88261_I2SMD_LSB_JUSTIFIED << AW88261_I2SMD_START_BIT)
+
+#define AW88261_I2SFS_START_BIT			(6)
+#define AW88261_I2SFS_BITS_LEN			(2)
+#define AW88261_I2SFS_MASK				\
+	(~(((1<<AW88261_I2SFS_BITS_LEN)-1)<<AW88261_I2SFS_START_BIT))
+
+#define AW88261_I2SFS_16_BITS			(0)
+#define AW88261_I2SFS_16_BITS_VALUE		\
+	(AW88261_I2SFS_16_BITS << AW88261_I2SFS_START_BIT)
+#define AW88261_I2SFS_20_BITS			(1)
+#define AW88261_I2SFS_20_BITS_VALUE		\
+	(AW88261_I2SFS_20_BITS << AW88261_I2SFS_START_BIT)
+#define AW88261_I2SFS_24_BITS			(2)
+#define AW88261_I2SFS_24_BITS_VALUE		\
+	(AW88261_I2SFS_24_BITS << AW88261_I2SFS_START_BIT)
+#define AW88261_I2SFS_32_BITS			(3)
+#define AW88261_I2SFS_32_BITS_VALUE		\
+	(AW88261_I2SFS_32_BITS << AW88261_I2SFS_START_BIT)
+
+#define AW88261_I2SBCK_START_BIT	(4)
+#define AW88261_I2SBCK_BITS_LEN	(2)
+#define AW88261_I2SBCK_MASK	\
+	(~(((1<<AW88261_I2SBCK_BITS_LEN)-1) << AW88261_I2SBCK_START_BIT))
+
+#define AW88261_I2SBCK_32FS	(0)
+#define AW88261_I2SBCK_32FS_VALUE	\
+	(AW88261_I2SBCK_32FS << AW88261_I2SBCK_START_BIT)
+
+#define AW88261_I2SBCK_48FS	(1)
+#define AW88261_I2SBCK_48FS_VALUE	\
+	(AW88261_I2SBCK_48FS << AW88261_I2SBCK_START_BIT)
+
+#define AW88261_I2SBCK_64FS	(2)
+#define AW88261_I2SBCK_64FS_VALUE	\
+	(AW88261_I2SBCK_64FS << AW88261_I2SBCK_START_BIT)
+
+#define AW88261_I2SSR_START_BIT			(0)
+#define AW88261_I2SSR_BITS_LEN			(4)
+#define AW88261_I2SSR_MASK				\
+	(~(((1<<AW88261_I2SSR_BITS_LEN)-1) << AW88261_I2SSR_START_BIT))
+
+#define AW88261_I2SSR_8KHZ				(0)
+#define AW88261_I2SSR_8KHZ_VALUE		\
+	(AW88261_I2SSR_8KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_11P025KHZ			(1)
+#define AW88261_I2SSR_11P025KHZ_VALUE	\
+	(AW88261_I2SSR_11P025KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_12KHZ				(2)
+#define AW88261_I2SSR_12KHZ_VALUE		\
+	(AW88261_I2SSR_12KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_16KHZ				(3)
+#define AW88261_I2SSR_16KHZ_VALUE		\
+	(AW88261_I2SSR_16KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_22P05KHZ			(4)
+#define AW88261_I2SSR_22P05KHZ_VALUE	\
+	(AW88261_I2SSR_22P05KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_24KHZ				(5)
+#define AW88261_I2SSR_24KHZ_VALUE		\
+	(AW88261_I2SSR_24KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_32KHZ				(6)
+#define AW88261_I2SSR_32KHZ_VALUE		\
+	(AW88261_I2SSR_32KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_44P1KHZ			(7)
+#define AW88261_I2SSR_44P1KHZ_VALUE	\
+	(AW88261_I2SSR_44P1KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_48KHZ				(8)
+#define AW88261_I2SSR_48KHZ_VALUE		\
+	(AW88261_I2SSR_48KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_96KHZ				(9)
+#define AW88261_I2SSR_96KHZ_VALUE		\
+	(AW88261_I2SSR_96KHZ << AW88261_I2SSR_START_BIT)
+#define AW88261_I2SSR_192KHZ			(10)
+#define AW88261_I2SSR_192KHZ_VALUE		\
+	(AW88261_I2SSR_192KHZ << AW88261_I2SSR_START_BIT)
+
+#define AW88261_CCO_MUX_START_BIT	(6)
 #define AW88261_CCO_MUX_BITS_LEN	(1)
 #define AW88261_CCO_MUX_MASK		\
 	(~(((1<<AW88261_CCO_MUX_BITS_LEN)-1) << AW88261_CCO_MUX_START_BIT))
@@ -370,7 +474,10 @@
 #define AW88261_START_RETRIES		(5)
 #define AW88261_START_WORK_DELAY_MS	(0)
 
+/* NOTE: 192000 has a reg value donwstream but not listed in datasheet */
 #define AW88261_RATES (SNDRV_PCM_RATE_8000_48000 | \
+			SNDRV_PCM_RATE_12000 | \
+			SNDRV_PCM_RATE_24000 | \
 			SNDRV_PCM_RATE_96000)
 #define AW88261_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
 			SNDRV_PCM_FMTBIT_S24_LE | \
@@ -450,6 +557,11 @@ struct aw88261 {
 	int frcset_en;
 	unsigned int mute_st;
 	unsigned int amppd_st;
+	unsigned int sample_rate;
+	unsigned int bit_width;
+	unsigned int physical_bit_width;
+	unsigned int fmt_inv;
+	unsigned int fmt_format;
 
 	bool phase_sync;
 };
-- 
2.53.0

When applying that patch, you need to also unapply:

  • Revert "FROMGIT ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()"
  • ASoC: qcom: sm8250: Increase MI2S BCLK rate for 32-bit playback
  • ASoC: qcom: q6asm-dai: Advertise S32 format to ALSA while sending 24-bits

@wrenix wrenix marked this pull request as ready for review May 1, 2026 04:58
@wrenix

wrenix commented May 1, 2026

Copy link
Copy Markdown
Author

For me, on my fp5 , calls works again. (with just alsa ucm profil VoiceCall, without HiFi)

And i got an reg_val=0x0011, during startup /wakeup.

the only strange think is, that muting the mic has no effect.


But your patches looks good and i try it.

But i could not find your patches (i have not apply it here)

  • Revert "FROMGIT ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()"
  • ASoC: qcom: sm8250: Increase MI2S BCLK rate for 32-bit playback
  • ASoC: qcom: q6asm-dai: Advertise S32 format to ALSA while sending 24-bits

@wrenix wrenix force-pushed the sc7280-7.0.y-voice branch from a9ca06f to 4fcace8 Compare May 1, 2026 05:19
@valpackett

Copy link
Copy Markdown

But i could not find your patches (i have not apply it here)

No, these three are already here and you need to unapply them when testing my AW88261 fix.

the only strange think is, that muting the mic has no effect.

I don't know what the mute button is even trying to do right now but it's absolutely not trivial. Muting via codec-side controls shooould work, but stream muting isn't possible. Keep in mind how the current hacky q6voice driver works. (q6voiced opens "dummy" streams instead of the driver representing what's really happening in hardware properly (which would be codec2codec)) There's apparently a whole funded project to fix that, sooo just wait.

@wrenix

wrenix commented May 2, 2026

Copy link
Copy Markdown
Author
  • Revert "FROMGIT ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()"
    • not found, so maybe i need "just" the original patch FROMGIT ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup() ? Is it really relevant for sc7280 ?
    • b9c78cb
  • ASoC: qcom: sm8250: Increase MI2S BCLK rate for 32-bit playback
  • ASoC: qcom: q6asm-dai: Advertise S32 format to ALSA while sending 24-bits

i found the other patches and i revert it, kernel build is running


the audio source on pulseaudio/pipewire -> to alsa is muted.
But exactly all the audio happen inside of SoC, so we could not handle it on the default way yet.

I just mean, that this is the only problem i have with calling.

Srinivas Kandagatla and others added 29 commits June 17, 2026 00:51
Start the graph at trigger callback. Staring the graph at prepare does
not make sense as there is no data transfer at this point.
Moving this to trigger will also help cope situation where pipewire
is not happy if display port is not connected during start.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260402081118.348071-12-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit b54a38a)
Link: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
(cherry picked from commit a7f55b1)
Link: https://github.com/msm8916-mainline/linux
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
v2: strlcpy -> strscpy

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
(cherry picked from commit eb82ba2)
Link: https://github.com/msm8916-mainline/linux
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
(cherry picked from commit d04fd7b)
Link: https://github.com/msm8916-mainline/linux
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
This is just a stub for now. Later this would be used for features
like call recording.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
(cherry picked from commit ba9cd1d)
Link: https://github.com/msm8916-mainline/linux
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
q6voice combines the 3 q6voice-related services (q6mvm, q6cvp, q6cvs)
and allows to start/end voice calls at the moment.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
(cherry picked from commit e49b671)
Link: https://github.com/msm8916-mainline/linux
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The Q6 Voice DAI driver exposes the Q6 Voice subsystem to ASoC.
At the moment it provides a single CS-Voice DAI with a hostless FE.
Eventually usage should be simplified using a codec2codec link.

v2: Set AIFs SND_SOC_NOPM
v2.1: Fix __DT_BINDINGS_Q6_VOCIE_H__ typo

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
(cherry picked from commit fe78414)
Link: https://github.com/msm8916-mainline/linux
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Add function to get and set RX/TX ports and use those
to un-hardcode the ports set in q6cvp_session_create() call.

Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org>
[use bool capture instead of enum similar to q6voice_start(),
 add path parameter]
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
(cherry picked from commit 6599fc6)
Link: https://github.com/msm8916-mainline/linux
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Add ALSA controls for voice RX and TX ports.

Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org>
[use mc->shift to mark TX mixers for now to simplify code]
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
(cherry picked from commit 0f30053)
Link: https://github.com/msm8916-mainline/linux
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
VoiceMMode1 is used instead of CS-Voice on newer firmwares.

Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de>
(cherry picked from commit a3e2be3)
Link: https://github.com/msm8953-mainline/linux
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
To use a topology ID, the DSP must first have the topology registered.
Add support for registering topologies from an
ACDB (Audio Calibration DataBase).

No-submit: topologies are useless upstream, unless support is added to q6afe; missing dt-bindings
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The CVD 2.3 revision expects a different initialization sequence.
Implement the commands to make this possible.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Some platforms such as SDM670 have CVD version 2.3. This version
requires different commands to run on creation. Add the initialization
sequence for this version, using a device tree property to determine
which sequence to run.

No-submit: detect the params (channels, bit width, sample rate)
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
For some VoLTE calls between new phones, the topology IDs must be set to
a value in the ACDB. Add RX and TX topology ID parameters to the
functions that send the CREATE_FULL_CONTROL_SESSION command, so the
correct topology IDs can be sent.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The topology ID is now expected by q6cvp. Add the topology ID properties
to the paths with accessors, and pass them to the DSP.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The topology IDs are different between sound card models (smartphones in
the context of the Pixel 3a), and even codecs. As a result, the topology
IDs are not defined by the device tree, but rather by the ALSA
configuration. Add controls to ALSA for the topology ID so they can be
configured per codec.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The stream will be marked stopped after emitting end-of-stream. When
q6asm_dai_prepare is called while stopped, it is assumed that there is
no memory region mapped with different parameters. Keep the stream
marked as running so the prepare callback resets the memory regions.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The client callback for q6voice should not modify the response, as noted
for the other clients in commit 86af3c2 ("ASoC: qcom: Constify APR
callback response data") upstream. Mark the response data as const in
q6voice to be compatible with the API change.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
…kcontrol_to_dapm()

The name of the function changed upstream in commit 2532041 ("ASoC:
soc-dapm: rename snd_soc_dapm_kcontrol_dapm() to
snd_soc_dapm_kcontrol_to_dapm()").

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Signed-off-by: Bhushan Shah <bhushan.shah@machinesoul.in>
Signed-off-by: Val Packett <val@packett.cool>
On kodiak + wcd9375, only this topology seems to work so far for the mic.

Signed-off-by: Val Packett <val@packett.cool>
Signed-off-by: Bhushan Shah <bhushan.shah@machinesoul.in>
Signed-off-by: Bhushan Shah <bhushan.shah@machinesoul.in>
Inline i2c_check_functionality() checks, since the function returns a
boolean status rather than an error code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260329163152.366356-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.

The mentioned robustness is relevant for a planned change to struct
i2c_device_id that replaces .driver_data by an anonymous union.

While touching all these arrays, unify indention and usage of commas.

This patch doesn't modify the compiled arrays, only their representation
in source form benefits. The former was confirmed with x86 and arm64
builds.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/ae2ff4898eb340bd8bcafb7b75443eb4a0ce3e76.1778692164.git.u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
@wrenix wrenix force-pushed the sc7280-7.0.y-voice branch from 665f7b9 to 71cbc9e Compare June 16, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.