Commit 1a0f59b0 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge tag 'asoc-fix-v6.13-rc7' of...

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.
parents 5cb4e5b0 75a7f7d6
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -89,6 +89,13 @@ struct simple_util_priv {
#define simple_props_to_dai_codec(props, i)	((props)->codec_dai + i)
#define simple_props_to_codec_conf(props, i)	((props)->codec_conf + i)

/* has the same effect as simple_priv_to_props(). Preferred over
 * simple_priv_to_props() when dealing with PCM runtime data as
 * the ID stored in rtd->id may not be a valid array index.
 */
#define runtime_simple_priv_to_props(priv, rtd)				\
	((priv)->dai_props + ((rtd)->dai_link - (priv)->dai_link))

#define for_each_prop_dlc_cpus(props, i, cpu)				\
	for ((i) = 0;							\
	     ((i) < (props)->num.cpus) &&				\
+4 −4
Original line number Diff line number Diff line
@@ -368,13 +368,13 @@ static const struct snd_kcontrol_new nau8824_snd_controls[] = {
	SOC_ENUM("DAC Oversampling Rate", nau8824_dac_oversampl_enum),

	SOC_SINGLE_TLV("Speaker Right DACR Volume",
		NAU8824_REG_CLASSD_GAIN_1, 8, 0x1f, 0, spk_vol_tlv),
		NAU8824_REG_CLASSD_GAIN_1, 8, 0x19, 0, spk_vol_tlv),
	SOC_SINGLE_TLV("Speaker Left DACL Volume",
		NAU8824_REG_CLASSD_GAIN_2, 0, 0x1f, 0, spk_vol_tlv),
		NAU8824_REG_CLASSD_GAIN_2, 0, 0x19, 0, spk_vol_tlv),
	SOC_SINGLE_TLV("Speaker Left DACR Volume",
		NAU8824_REG_CLASSD_GAIN_1, 0, 0x1f, 0, spk_vol_tlv),
		NAU8824_REG_CLASSD_GAIN_1, 0, 0x19, 0, spk_vol_tlv),
	SOC_SINGLE_TLV("Speaker Right DACL Volume",
		NAU8824_REG_CLASSD_GAIN_2, 8, 0x1f, 0, spk_vol_tlv),
		NAU8824_REG_CLASSD_GAIN_2, 8, 0x19, 0, spk_vol_tlv),

	SOC_SINGLE_TLV("Headphone Right DACR Volume",
		NAU8824_REG_ATT_PORT0, 8, 0x1f, 0, hp_vol_tlv),
+5 −5
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ int simple_util_startup(struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
	struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card);
	struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id);
	struct simple_dai_props *props = runtime_simple_priv_to_props(priv, rtd);
	struct simple_util_dai *dai;
	unsigned int fixed_sysclk = 0;
	int i1, i2, i;
@@ -357,7 +357,7 @@ void simple_util_shutdown(struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
	struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card);
	struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id);
	struct simple_dai_props *props = runtime_simple_priv_to_props(priv, rtd);
	struct simple_util_dai *dai;
	int i;

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

@@ -517,7 +517,7 @@ int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
				   struct snd_pcm_hw_params *params)
{
	struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card);
	struct simple_dai_props *dai_props = simple_priv_to_props(priv, rtd->id);
	struct simple_dai_props *dai_props = runtime_simple_priv_to_props(priv, rtd);
	struct simple_util_data *data = &dai_props->adata;
	struct snd_interval *rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
	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,
int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd)
{
	struct simple_util_priv *priv = snd_soc_card_get_drvdata(rtd->card);
	struct simple_dai_props *props = simple_priv_to_props(priv, rtd->id);
	struct simple_dai_props *props = runtime_simple_priv_to_props(priv, rtd);
	struct simple_util_dai *dai;
	int i, ret;

+19 −4
Original line number Diff line number Diff line
@@ -608,17 +608,32 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
		.callback = sof_sdw_quirk_cb,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "3838")
			DMI_MATCH(DMI_PRODUCT_NAME, "83JX")
		},
		.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS),
		.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
	},
	{
		.callback = sof_sdw_quirk_cb,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "3832")
			DMI_MATCH(DMI_PRODUCT_NAME, "83LC")
		},
		.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS),
		.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
	},
	{
		.callback = sof_sdw_quirk_cb,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "83MC")
		},
		.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
	},	{
		.callback = sof_sdw_quirk_cb,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "83NM")
		},
		.driver_data = (void *)(SOC_SDW_SIDECAR_AMPS | SOC_SDW_CODEC_MIC),
	},
	{
		.callback = sof_sdw_quirk_cb,