[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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
This commit is contained in:
Liam Girdwood 2007-05-10 19:27:27 +02:00 • committed by Jaroslav Kysela
commit a68660e0c6
4 changed files with 20 additions and 4 deletions

View file

@ -22,7 +22,7 @@
#include <sound/control.h>
#include <sound/ac97_codec.h>
#define SND_SOC_VERSION "0.13.0"
#define SND_SOC_VERSION "0.13.1"
/*
* Convenience kcontrol builders
@ -83,6 +83,7 @@
#define SND_SOC_DAI_AC97 0x1
#define SND_SOC_DAI_I2S 0x2
#define SND_SOC_DAI_PCM 0x4
#define SND_SOC_DAI_AC97_BUS 0x8 /* for custom i.e. non ac97_codec.c */
/*
* DAI hardware audio formats
@ -278,6 +279,7 @@ struct snd_soc_cpu_ops {
struct snd_soc_codec_dai {
char *name;
int id;
unsigned char type;
/* DAI capabilities */
struct snd_soc_pcm_stream playback;