aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-07-21 15:53:01 -0400
committerMark Brown <broonie@kernel.org>2015-07-23 12:33:28 -0400
commit7361fbeaeaab5282bbfc88f1f6fe4cf034f7623c (patch)
tree7eb363e1a32f5791aa5ca52f693b097809c159f6 /include/sound
parent5f1d980ee9b6353f18765bfa6774a5a08d6cb944 (diff)
ASoC: ac97: Add support for resetting device before registration
AC97 devices need to be initially reset before they can be used. Currently each driver does this on its own. Add support for resetting the device to core in snd_soc_new_ac97_codec(). If the caller supplies a device ID and device ID mask the function will reset the device and verify that it has the correct ID, if it does not a error is returned. This will allow to remove custom code with similar functionality from individual drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 93df8bf9d54a..42d144a4b7ba 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -526,7 +526,8 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg,
526 526
527#ifdef CONFIG_SND_SOC_AC97_BUS 527#ifdef CONFIG_SND_SOC_AC97_BUS
528struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec); 528struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec);
529struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); 529struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
530 unsigned int id, unsigned int id_mask);
530void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); 531void snd_soc_free_ac97_codec(struct snd_ac97 *ac97);
531 532
532int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops); 533int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops);