diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /sound/mips/sgio2audio.c | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'sound/mips/sgio2audio.c')
-rw-r--r-- | sound/mips/sgio2audio.c | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c index 01a03efdc8b..717604c00f0 100644 --- a/sound/mips/sgio2audio.c +++ b/sound/mips/sgio2audio.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/module.h> | ||
34 | 33 | ||
35 | #include <asm/ip32/ip32_ints.h> | 34 | #include <asm/ip32/ip32_ints.h> |
36 | #include <asm/ip32/mace.h> | 35 | #include <asm/ip32/mace.h> |
@@ -237,7 +236,7 @@ static int sgio2audio_source_put(struct snd_kcontrol *kcontrol, | |||
237 | } | 236 | } |
238 | 237 | ||
239 | /* dac1/pcm0 mixer control */ | 238 | /* dac1/pcm0 mixer control */ |
240 | static struct snd_kcontrol_new sgio2audio_ctrl_pcm0 = { | 239 | static struct snd_kcontrol_new sgio2audio_ctrl_pcm0 __devinitdata = { |
241 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 240 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
242 | .name = "PCM Playback Volume", | 241 | .name = "PCM Playback Volume", |
243 | .index = 0, | 242 | .index = 0, |
@@ -249,7 +248,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_pcm0 = { | |||
249 | }; | 248 | }; |
250 | 249 | ||
251 | /* dac2/pcm1 mixer control */ | 250 | /* dac2/pcm1 mixer control */ |
252 | static struct snd_kcontrol_new sgio2audio_ctrl_pcm1 = { | 251 | static struct snd_kcontrol_new sgio2audio_ctrl_pcm1 __devinitdata = { |
253 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 252 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
254 | .name = "PCM Playback Volume", | 253 | .name = "PCM Playback Volume", |
255 | .index = 1, | 254 | .index = 1, |
@@ -261,7 +260,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_pcm1 = { | |||
261 | }; | 260 | }; |
262 | 261 | ||
263 | /* record level mixer control */ | 262 | /* record level mixer control */ |
264 | static struct snd_kcontrol_new sgio2audio_ctrl_reclevel = { | 263 | static struct snd_kcontrol_new sgio2audio_ctrl_reclevel __devinitdata = { |
265 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 264 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
266 | .name = "Capture Volume", | 265 | .name = "Capture Volume", |
267 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | 266 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, |
@@ -272,7 +271,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_reclevel = { | |||
272 | }; | 271 | }; |
273 | 272 | ||
274 | /* record level source control */ | 273 | /* record level source control */ |
275 | static struct snd_kcontrol_new sgio2audio_ctrl_recsource = { | 274 | static struct snd_kcontrol_new sgio2audio_ctrl_recsource __devinitdata = { |
276 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 275 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
277 | .name = "Capture Source", | 276 | .name = "Capture Source", |
278 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | 277 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, |
@@ -282,7 +281,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_recsource = { | |||
282 | }; | 281 | }; |
283 | 282 | ||
284 | /* line mixer control */ | 283 | /* line mixer control */ |
285 | static struct snd_kcontrol_new sgio2audio_ctrl_line = { | 284 | static struct snd_kcontrol_new sgio2audio_ctrl_line __devinitdata = { |
286 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 285 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
287 | .name = "Line Playback Volume", | 286 | .name = "Line Playback Volume", |
288 | .index = 0, | 287 | .index = 0, |
@@ -294,7 +293,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_line = { | |||
294 | }; | 293 | }; |
295 | 294 | ||
296 | /* cd mixer control */ | 295 | /* cd mixer control */ |
297 | static struct snd_kcontrol_new sgio2audio_ctrl_cd = { | 296 | static struct snd_kcontrol_new sgio2audio_ctrl_cd __devinitdata = { |
298 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 297 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
299 | .name = "Line Playback Volume", | 298 | .name = "Line Playback Volume", |
300 | .index = 1, | 299 | .index = 1, |
@@ -306,7 +305,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_cd = { | |||
306 | }; | 305 | }; |
307 | 306 | ||
308 | /* mic mixer control */ | 307 | /* mic mixer control */ |
309 | static struct snd_kcontrol_new sgio2audio_ctrl_mic = { | 308 | static struct snd_kcontrol_new sgio2audio_ctrl_mic __devinitdata = { |
310 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 309 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
311 | .name = "Mic Playback Volume", | 310 | .name = "Mic Playback Volume", |
312 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | 311 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, |
@@ -317,7 +316,7 @@ static struct snd_kcontrol_new sgio2audio_ctrl_mic = { | |||
317 | }; | 316 | }; |
318 | 317 | ||
319 | 318 | ||
320 | static int snd_sgio2audio_new_mixer(struct snd_sgio2audio *chip) | 319 | static int __devinit snd_sgio2audio_new_mixer(struct snd_sgio2audio *chip) |
321 | { | 320 | { |
322 | int err; | 321 | int err; |
323 | 322 | ||
@@ -726,7 +725,7 @@ static struct snd_pcm_ops snd_sgio2audio_capture_ops = { | |||
726 | */ | 725 | */ |
727 | 726 | ||
728 | /* create a pcm device */ | 727 | /* create a pcm device */ |
729 | static int snd_sgio2audio_new_pcm(struct snd_sgio2audio *chip) | 728 | static int __devinit snd_sgio2audio_new_pcm(struct snd_sgio2audio *chip) |
730 | { | 729 | { |
731 | struct snd_pcm *pcm; | 730 | struct snd_pcm *pcm; |
732 | int err; | 731 | int err; |
@@ -834,8 +833,8 @@ static struct snd_device_ops ops = { | |||
834 | .dev_free = snd_sgio2audio_dev_free, | 833 | .dev_free = snd_sgio2audio_dev_free, |
835 | }; | 834 | }; |
836 | 835 | ||
837 | static int snd_sgio2audio_create(struct snd_card *card, | 836 | static int __devinit snd_sgio2audio_create(struct snd_card *card, |
838 | struct snd_sgio2audio **rchip) | 837 | struct snd_sgio2audio **rchip) |
839 | { | 838 | { |
840 | struct snd_sgio2audio *chip; | 839 | struct snd_sgio2audio *chip; |
841 | int i, err; | 840 | int i, err; |
@@ -914,7 +913,7 @@ static int snd_sgio2audio_create(struct snd_card *card, | |||
914 | return 0; | 913 | return 0; |
915 | } | 914 | } |
916 | 915 | ||
917 | static int snd_sgio2audio_probe(struct platform_device *pdev) | 916 | static int __devinit snd_sgio2audio_probe(struct platform_device *pdev) |
918 | { | 917 | { |
919 | struct snd_card *card; | 918 | struct snd_card *card; |
920 | struct snd_sgio2audio *chip; | 919 | struct snd_sgio2audio *chip; |
@@ -958,7 +957,7 @@ static int snd_sgio2audio_probe(struct platform_device *pdev) | |||
958 | return 0; | 957 | return 0; |
959 | } | 958 | } |
960 | 959 | ||
961 | static int snd_sgio2audio_remove(struct platform_device *pdev) | 960 | static int __devexit snd_sgio2audio_remove(struct platform_device *pdev) |
962 | { | 961 | { |
963 | struct snd_card *card = platform_get_drvdata(pdev); | 962 | struct snd_card *card = platform_get_drvdata(pdev); |
964 | 963 | ||
@@ -969,11 +968,22 @@ static int snd_sgio2audio_remove(struct platform_device *pdev) | |||
969 | 968 | ||
970 | static struct platform_driver sgio2audio_driver = { | 969 | static struct platform_driver sgio2audio_driver = { |
971 | .probe = snd_sgio2audio_probe, | 970 | .probe = snd_sgio2audio_probe, |
972 | .remove = snd_sgio2audio_remove, | 971 | .remove = __devexit_p(snd_sgio2audio_remove), |
973 | .driver = { | 972 | .driver = { |
974 | .name = "sgio2audio", | 973 | .name = "sgio2audio", |
975 | .owner = THIS_MODULE, | 974 | .owner = THIS_MODULE, |
976 | } | 975 | } |
977 | }; | 976 | }; |
978 | 977 | ||
979 | module_platform_driver(sgio2audio_driver); | 978 | static int __init alsa_card_sgio2audio_init(void) |
979 | { | ||
980 | return platform_driver_register(&sgio2audio_driver); | ||
981 | } | ||
982 | |||
983 | static void __exit alsa_card_sgio2audio_exit(void) | ||
984 | { | ||
985 | platform_driver_unregister(&sgio2audio_driver); | ||
986 | } | ||
987 | |||
988 | module_init(alsa_card_sgio2audio_init) | ||
989 | module_exit(alsa_card_sgio2audio_exit) | ||