Lines Matching defs:ac97
8 #include <sound/ac97/codec.h>
9 #include <sound/ac97/compat.h>
10 #include <sound/ac97/controller.h>
20 static void compat_ac97_reset(struct snd_ac97 *ac97)
22 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
29 static void compat_ac97_warm_reset(struct snd_ac97 *ac97)
31 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
38 static void compat_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
41 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
44 actrl->ops->write(actrl, ac97->num, reg, val);
47 static unsigned short compat_ac97_read(struct snd_ac97 *ac97,
50 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
53 return actrl->ops->read(actrl, ac97->num, reg);
69 struct snd_ac97 *ac97;
72 ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL);
73 if (ac97 == NULL)
76 ac97->private_data = adev;
77 ac97->bus = &compat_soc_ac97_bus;
79 ac97->dev.parent = &adev->dev;
80 ac97->dev.release = compat_ac97_release;
81 dev_set_name(&ac97->dev, "%s-compat", dev_name(&adev->dev));
82 ret = device_register(&ac97->dev);
84 put_device(&ac97->dev);
88 return ac97;
92 void snd_ac97_compat_release(struct snd_ac97 *ac97)
94 device_unregister(&ac97->dev);
98 int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id,
101 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data);
106 compat_ac97_warm_reset(ac97);
112 compat_ac97_reset(ac97);
113 compat_ac97_warm_reset(ac97);