mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
ASoC: ak4118: Update to use new component control notify helper
Update the driver to use the new ASoC core control notify helper. This also fixes a bug where the control would not be found if the CODEC was given a name prefix. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com Link: https://lore.kernel.org/r/20230512122838.243002-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org
This commit is contained in:
parent
ace9ed54bd
commit
476d942e50
1 changed files with 2 additions and 9 deletions
|
@ -264,8 +264,6 @@ static irqreturn_t ak4118_irq_handler(int irq, void *data)
|
|||
struct ak4118_priv *ak4118 = data;
|
||||
struct snd_soc_component *component = ak4118->component;
|
||||
struct snd_kcontrol_new *kctl_new;
|
||||
struct snd_kcontrol *kctl;
|
||||
struct snd_ctl_elem_id *id;
|
||||
unsigned int i;
|
||||
|
||||
if (!component)
|
||||
|
@ -273,13 +271,8 @@ static irqreturn_t ak4118_irq_handler(int irq, void *data)
|
|||
|
||||
for (i = 0; i < ARRAY_SIZE(ak4118_iec958_controls); i++) {
|
||||
kctl_new = &ak4118_iec958_controls[i];
|
||||
kctl = snd_soc_card_get_kcontrol(component->card,
|
||||
kctl_new->name);
|
||||
if (!kctl)
|
||||
continue;
|
||||
id = &kctl->id;
|
||||
snd_ctl_notify(component->card->snd_card,
|
||||
SNDRV_CTL_EVENT_MASK_VALUE, id);
|
||||
|
||||
snd_soc_component_notify_control(component, kctl_new->name);
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
|
Loading…
Reference in a new issue