From a68660e0c63d8f7ab8725f9e771119c08e9f953b Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Thu, 10 May 2007 19:27:27 +0200 Subject: [ALSA] ASoC AC97 device reg bugfix This patch fixes a bug whereby AC97 bus device data was being clobbered when AC97 codecs using the generic ac97_codec.c driver were being registered. Codecs that didn't use the generic driver were unaffected (e.g. WM9712, WM9713). Changes:- o Add new AC97 codec class for custom (or need bus dev registration) AC97 codecs. o Only register/deregister this custom codec device with the AC97 bus. The generic AC97 driver already does this for generic codec devices. This may be related to bug #3038 :- https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3038 Signed-off-by: Liam Girdwood Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/soc/codecs/ac97.c | 1 + sound/soc/codecs/wm9712.c | 1 + 2 files changed, 2 insertions(+) (limited to 'sound/soc/codecs') diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index f3b3b9efbb61..0b8a6f8b3668 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -45,6 +45,7 @@ static int ac97_prepare(struct snd_pcm_substream *substream) struct snd_soc_codec_dai ac97_dai = { .name = "AC97 HiFi", + .type = SND_SOC_DAI_AC97, .playback = { .stream_name = "AC97 Playback", .channels_min = 1, diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 264413a00cac..986b5d59cefa 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -544,6 +544,7 @@ static int ac97_aux_prepare(struct snd_pcm_substream *substream) struct snd_soc_codec_dai wm9712_dai[] = { { .name = "AC97 HiFi", + .type = SND_SOC_DAI_AC97_BUS, .playback = { .stream_name = "HiFi Playback", .channels_min = 1, -- cgit v1.2.3