mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
ASoC: tegra: Fix kcontrol put callback in AHUB
commit a4e37950c9e9b126f9cbee79b8ab94a94646dcf1 upstream.
The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the AHUB driver accordingly.
Fixes: 16e1bcc2caf4 ("ASoC: tegra: Add Tegra210 based AHUB driver")
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-12-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -62,6 +62,7 @@ static int tegra_ahub_put_value_enum(struct snd_kcontrol *kctl,
|
|||||||
unsigned int *item = uctl->value.enumerated.item;
|
unsigned int *item = uctl->value.enumerated.item;
|
||||||
unsigned int value = e->values[item[0]];
|
unsigned int value = e->values[item[0]];
|
||||||
unsigned int i, bit_pos, reg_idx = 0, reg_val = 0;
|
unsigned int i, bit_pos, reg_idx = 0, reg_val = 0;
|
||||||
|
int change = 0;
|
||||||
|
|
||||||
if (item[0] >= e->items)
|
if (item[0] >= e->items)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@@ -86,12 +87,14 @@ static int tegra_ahub_put_value_enum(struct snd_kcontrol *kctl,
|
|||||||
|
|
||||||
/* Update widget power if state has changed */
|
/* Update widget power if state has changed */
|
||||||
if (snd_soc_component_test_bits(cmpnt, update[i].reg,
|
if (snd_soc_component_test_bits(cmpnt, update[i].reg,
|
||||||
update[i].mask, update[i].val))
|
update[i].mask,
|
||||||
snd_soc_dapm_mux_update_power(dapm, kctl, item[0], e,
|
update[i].val))
|
||||||
|
change |= snd_soc_dapm_mux_update_power(dapm, kctl,
|
||||||
|
item[0], e,
|
||||||
&update[i]);
|
&update[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return change;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tegra210_ahub_write_ram(struct regmap *regmap, unsigned int reg_ctrl,
|
void tegra210_ahub_write_ram(struct regmap *regmap, unsigned int reg_ctrl,
|
||||||
|
|||||||
Reference in New Issue
Block a user