aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl4030.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-12-08 14:17:58 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-12-09 05:49:29 -0500
commit64089b84abfe2f26a864ebd968429302dcb071de (patch)
tree47827fc4436e4e331b93e1e8cacdf27f6a0a12ac /sound/soc/codecs/twl4030.c
parent958e792c7c8f06a9e666adb0ed94fff2cf90156f (diff)
ASoC: Register non-AC97 codec DAIs
Currently this is done at module probe time since ASoC ties in codec device probe to the instantiation of the entire ASoC device. Subsequent patches will refactor the codec drivers to handle probing separately. Note that the core does not yet use this information. AC97 is special since the codec is controlled over the AC97 link but we want to give the machine driver a chance to set up the system before trying to instantiate since it may need to do configuration before the AC97 link will operate Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r--sound/soc/codecs/twl4030.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 358aa2b1aae2..373daa486cea 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -358,7 +358,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
358 .put = snd_soc_put_volsw_r2_twl4030, \ 358 .put = snd_soc_put_volsw_r2_twl4030, \
359 .private_value = (unsigned long)&(struct soc_mixer_control) \ 359 .private_value = (unsigned long)&(struct soc_mixer_control) \
360 {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ 360 {.reg = reg_left, .rreg = reg_right, .shift = xshift, \
361 .max = xmax, .invert = xinvert} } 361 .rshift = xshift, .max = xmax, .invert = xinvert} }
362#define SOC_SINGLE_TLV_TWL4030(xname, xreg, xshift, xmax, xinvert, tlv_array) \ 362#define SOC_SINGLE_TLV_TWL4030(xname, xreg, xshift, xmax, xinvert, tlv_array) \
363 SOC_DOUBLE_TLV_TWL4030(xname, xreg, xshift, xshift, xmax, \ 363 SOC_DOUBLE_TLV_TWL4030(xname, xreg, xshift, xshift, xmax, \
364 xinvert, tlv_array) 364 xinvert, tlv_array)
@@ -1275,6 +1275,18 @@ struct snd_soc_codec_device soc_codec_dev_twl4030 = {
1275}; 1275};
1276EXPORT_SYMBOL_GPL(soc_codec_dev_twl4030); 1276EXPORT_SYMBOL_GPL(soc_codec_dev_twl4030);
1277 1277
1278static int __devinit twl4030_init(void)
1279{
1280 return snd_soc_register_dai(&twl4030_dai);
1281}
1282module_init(twl4030_init);
1283
1284static void __exit twl4030_exit(void)
1285{
1286 snd_soc_unregister_dai(&twl4030_dai);
1287}
1288module_exit(twl4030_exit);
1289
1278MODULE_DESCRIPTION("ASoC TWL4030 codec driver"); 1290MODULE_DESCRIPTION("ASoC TWL4030 codec driver");
1279MODULE_AUTHOR("Steve Sakoman"); 1291MODULE_AUTHOR("Steve Sakoman");
1280MODULE_LICENSE("GPL"); 1292MODULE_LICENSE("GPL");