Skip to content

Commit 1a0f59b

Browse files
committed
Merge tag 'asoc-fix-v6.13-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.13 A few final driver specific fixes - a couple of x86 ID field changes, plus bug fixes for simple-card-utils and nau8824.
2 parents 5cb4e5b + 75a7f7d commit 1a0f59b

File tree

4 files changed

+35
-13
lines changed

4 files changed

+35
-13
lines changed

include/sound/simple_card_utils.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ struct simple_util_priv {
8989
#define simple_props_to_dai_codec(props, i) ((props)->codec_dai + i)
9090
#define simple_props_to_codec_conf(props, i) ((props)->codec_conf + i)
9191

92+
/* has the same effect as simple_priv_to_props(). Preferred over
93+
* simple_priv_to_props() when dealing with PCM runtime data as
94+
* the ID stored in rtd->id may not be a valid array index.
95+
*/
96+
#define runtime_simple_priv_to_props(priv, rtd) \
97+
((priv)->dai_props + ((rtd)->dai_link - (priv)->dai_link))
98+
9299
#define for_each_prop_dlc_cpus(props, i, cpu) \
93100
for ((i) = 0; \
94101
((i) < (props)->num.cpus) && \

sound/soc/codecs/nau8824.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,13 @@ static const struct snd_kcontrol_new nau8824_snd_controls[] = {
368368
SOC_ENUM("DAC Oversampling Rate", nau8824_dac_oversampl_enum),
369369

370370
SOC_SINGLE_TLV("Speaker Right DACR Volume",
371-
NAU8824_REG_CLASSD_GAIN_1, 8, 0x1f, 0, spk_vol_tlv),
371+
NAU8824_REG_CLASSD_GAIN_1, 8, 0x19, 0, spk_vol_tlv),
372372
SOC_SINGLE_TLV("Speaker Left DACL Volume",
373-
NAU8824_REG_CLASSD_GAIN_2, 0, 0x1f, 0, spk_vol_tlv),
373+
NAU8824_REG_CLASSD_GAIN_2, 0, 0x19, 0, spk_vol_tlv),
374374
SOC_SINGLE_TLV("Speaker Left DACR Volume",
375-
NAU8824_REG_CLASSD_GAIN_1, 0, 0x1f, 0, spk_vol_tlv),
375+
NAU8824_REG_CLASSD_GAIN_1, 0, 0x19, 0, spk_vol_tlv),
376376
SOC_SINGLE_TLV("Speaker Right DACL Volume",
377-
NAU8824_REG_CLASSD_GAIN_2, 8, 0x1f, 0, spk_vol_tlv),
377+
NAU8824_REG_CLASSD_GAIN_2, 8, 0x19, 0, spk_vol_tlv),
378378

379379
SOC_SINGLE_TLV("Headphone Right DACR Volume",
380380
NAU8824_REG_ATT_PORT0, 8, 0x1f, 0, hp_vol_tlv),

sound/soc/generic/simple-card-utils.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ int simple_util_startup(struct snd_pcm_substream *substream)
296296
{
297297
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
298298
struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card);
299-
struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id);
299+
struct simple_dai_props *props = runtime_simple_priv_to_props(priv, rtd);
300300
struct simple_util_dai *dai;
301301
unsigned int fixed_sysclk = 0;
302302
int i1, i2, i;
@@ -357,7 +357,7 @@ void simple_util_shutdown(struct snd_pcm_substream *substream)
357357
{
358358
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
359359
struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card);
360-
struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id);
360+
struct simple_dai_props *props = runtime_simple_priv_to_props(priv, rtd);
361361
struct simple_util_dai *dai;
362362
int i;
363363

@@ -448,7 +448,7 @@ int simple_util_hw_params(struct snd_pcm_substream *substream,
448448
struct simple_util_dai *pdai;
449449
struct snd_soc_dai *sdai;
450450
struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card);
451-
struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id);
451+
struct simple_dai_props *props = runtime_simple_priv_to_props(priv, rtd);
452452
unsigned int mclk, mclk_fs = 0;
453453
int i, ret;
454454

@@ -517,7 +517,7 @@ int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
517517
struct snd_pcm_hw_params *params)
518518
{
519519
struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card);
520-
struct simple_dai_props *dai_props = simple_priv_to_props(priv, rtd->id);
520+
struct simple_dai_props *dai_props = runtime_simple_priv_to_props(priv, rtd);
521521
struct simple_util_data *data = &dai_props->adata;
522522
struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
523523
struct snd_interval *channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
@@ -628,7 +628,7 @@ static int simple_init_for_codec2codec(struct snd_soc_pcm_runtime *rtd,
628628
int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd)
629629
{
630630
struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card);
631-
struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id);
631+
struct simple_dai_props *props = runtime_simple_priv_to_props(priv, rtd);
632632
struct simple_util_dai *dai;
633633
int i, ret;
634634

sound/soc/intel/boards/sof_sdw.c

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,17 +608,32 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
608608
.callback = sof_sdw_quirk_cb,
609609
.matches = {
610610
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
611-
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "3838")
611+
DMI_MATCH(DMI_PRODUCT_NAME, "83JX")
612612
},
613-
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS),
613+
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
614614
},
615615
{
616616
.callback = sof_sdw_quirk_cb,
617617
.matches = {
618618
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
619-
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "3832")
619+
DMI_MATCH(DMI_PRODUCT_NAME, "83LC")
620620
},
621-
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS),
621+
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
622+
},
623+
{
624+
.callback = sof_sdw_quirk_cb,
625+
.matches = {
626+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
627+
DMI_MATCH(DMI_PRODUCT_NAME, "83MC")
628+
},
629+
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
630+
}, {
631+
.callback = sof_sdw_quirk_cb,
632+
.matches = {
633+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
634+
DMI_MATCH(DMI_PRODUCT_NAME, "83NM")
635+
},
636+
.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
622637
},
623638
{
624639
.callback = sof_sdw_quirk_cb,

0 commit comments

Comments
 (0)