diff options
Diffstat (limited to 'sound/soc')
88 files changed, 474 insertions, 114 deletions
diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c index 340311d7fed5..a61ccd2d505f 100644 --- a/sound/soc/au1x/psc-ac97.c +++ b/sound/soc/au1x/psc-ac97.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/device.h> | 21 | #include <linux/device.h> |
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index 0cf2ca61c776..495be6e71931 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/suspend.h> | 22 | #include <linux/suspend.h> |
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c index 67cbfe7283da..5e7aacf3bb5a 100644 --- a/sound/soc/blackfin/bf5xx-ac97-pcm.c +++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/gfp.h> | ||
34 | 34 | ||
35 | #include <sound/core.h> | 35 | #include <sound/core.h> |
36 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
diff --git a/sound/soc/blackfin/bf5xx-ac97.c b/sound/soc/blackfin/bf5xx-ac97.c index e69322978739..523b7fc33f4e 100644 --- a/sound/soc/blackfin/bf5xx-ac97.c +++ b/sound/soc/blackfin/bf5xx-ac97.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/wait.h> | 17 | #include <linux/wait.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
21 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c index c6c6a4a7d948..1d2a1adf2575 100644 --- a/sound/soc/blackfin/bf5xx-i2s-pcm.c +++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/gfp.h> | ||
34 | 34 | ||
35 | #include <sound/core.h> | 35 | #include <sound/core.h> |
36 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
diff --git a/sound/soc/blackfin/bf5xx-tdm-pcm.c b/sound/soc/blackfin/bf5xx-tdm-pcm.c index 5e03bb2f3cd7..6bac1ac1a315 100644 --- a/sound/soc/blackfin/bf5xx-tdm-pcm.c +++ b/sound/soc/blackfin/bf5xx-tdm-pcm.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/slab.h> | ||
33 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <linux/gfp.h> | ||
34 | 34 | ||
35 | #include <sound/core.h> | 35 | #include <sound/core.h> |
36 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index bcfa53271673..1f5e57a4bb7a 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/device.h> | 18 | #include <linux/device.h> |
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index 48e1272892f9..217538423225 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c | |||
@@ -17,6 +17,7 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
22 | #include <linux/device.h> | 23 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c index 39c0f7584e65..042072738cdc 100644 --- a/sound/soc/codecs/ad1980.c +++ b/sound/soc/codecs/ad1980.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/module.h> | 16 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/device.h> | 18 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/ad73311.c b/sound/soc/codecs/ad73311.c index d2fcc601722c..475807bea2c2 100644 --- a/sound/soc/codecs/ad73311.c +++ b/sound/soc/codecs/ad73311.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/device.h> | 17 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c index cc96411ca3e6..f8e75edb27b7 100644 --- a/sound/soc/codecs/ads117x.c +++ b/sound/soc/codecs/ads117x.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
16 | #include <sound/core.h> | 17 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c index 962d74682122..192aebda3029 100644 --- a/sound/soc/codecs/ak4104.c +++ b/sound/soc/codecs/ak4104.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/slab.h> | ||
13 | #include <sound/core.h> | 14 | #include <sound/core.h> |
14 | #include <sound/soc.h> | 15 | #include <sound/soc.h> |
15 | #include <sound/initval.h> | 16 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c index b5917df0d2a8..d4253675b2d3 100644 --- a/sound/soc/codecs/ak4535.c +++ b/sound/soc/codecs/ak4535.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 1254a7ac561e..7528a54102b5 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/pm.h> | 29 | #include <linux/pm.h> |
30 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/slab.h> | ||
32 | #include <sound/core.h> | 33 | #include <sound/core.h> |
33 | #include <sound/pcm.h> | 34 | #include <sound/pcm.h> |
34 | #include <sound/pcm_params.h> | 35 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c index 18fd4475413c..87566932a3b1 100644 --- a/sound/soc/codecs/ak4671.c +++ b/sound/soc/codecs/ak4671.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/slab.h> | ||
18 | #include <sound/soc.h> | 19 | #include <sound/soc.h> |
19 | #include <sound/soc-dapm.h> | 20 | #include <sound/soc-dapm.h> |
20 | #include <sound/initval.h> | 21 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index a7f09f33c560..30d949239def 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/soc.h> | 28 | #include <sound/soc.h> |
28 | #include <sound/initval.h> | 29 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index 203e51f91489..f07a415c753f 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/tty.h> | 16 | #include <linux/tty.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/initval.h> | 20 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c index b9cbaeb09e05..75af2d6e0e78 100644 --- a/sound/soc/codecs/da7210.c +++ b/sound/soc/codecs/da7210.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/slab.h> | ||
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/pcm.h> | 28 | #include <sound/pcm.h> |
28 | #include <sound/pcm_params.h> | 29 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/pcm3008.c b/sound/soc/codecs/pcm3008.c index 2afcd0a8669d..5a5f187a2657 100644 --- a/sound/soc/codecs/pcm3008.c +++ b/sound/soc/codecs/pcm3008.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/initval.h> | 25 | #include <sound/initval.h> |
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c index f18c8b2d96d4..b47ed4f6ab20 100644 --- a/sound/soc/codecs/ssm2602.c +++ b/sound/soc/codecs/ssm2602.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/pm.h> | 33 | #include <linux/pm.h> |
34 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | #include <linux/slab.h> | ||
36 | #include <sound/core.h> | 37 | #include <sound/core.h> |
37 | #include <sound/pcm.h> | 38 | #include <sound/pcm.h> |
38 | #include <sound/pcm_params.h> | 39 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c index e90fe295c655..ee86568545c2 100644 --- a/sound/soc/codecs/stac9766.c +++ b/sound/soc/codecs/stac9766.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
19 | #include <linux/device.h> | 20 | #include <linux/device.h> |
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 40bcbbad07ff..b0bae3508b29 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/slab.h> | ||
28 | #include <sound/core.h> | 29 | #include <sound/core.h> |
29 | #include <sound/pcm.h> | 30 | #include <sound/pcm.h> |
30 | #include <sound/pcm_params.h> | 31 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 5856f7aae4d9..f0e00fd4b435 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/sysfs.h> | 14 | #include <linux/sysfs.h> |
15 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
16 | #include <linux/slab.h> | ||
16 | #include <sound/core.h> | 17 | #include <sound/core.h> |
17 | #include <sound/pcm.h> | 18 | #include <sound/pcm.h> |
18 | #include <sound/pcm_params.h> | 19 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index eafa164a8f86..71a69908ccf6 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/gpio.h> | 41 | #include <linux/gpio.h> |
42 | #include <linux/regulator/consumer.h> | 42 | #include <linux/regulator/consumer.h> |
43 | #include <linux/platform_device.h> | 43 | #include <linux/platform_device.h> |
44 | #include <linux/slab.h> | ||
44 | #include <sound/core.h> | 45 | #include <sound/core.h> |
45 | #include <sound/pcm.h> | 46 | #include <sound/pcm.h> |
46 | #include <sound/pcm_params.h> | 47 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 007fe830be46..65adc77eada1 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
33 | #include <linux/regulator/consumer.h> | 33 | #include <linux/regulator/consumer.h> |
34 | #include <linux/slab.h> | ||
34 | #include <sound/core.h> | 35 | #include <sound/core.h> |
35 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
36 | #include <sound/pcm_params.h> | 37 | #include <sound/pcm_params.h> |
@@ -352,7 +353,7 @@ static int dac33_hard_power(struct snd_soc_codec *codec, int power) | |||
352 | 353 | ||
353 | /* Safety check */ | 354 | /* Safety check */ |
354 | if (unlikely(power == dac33->chip_power)) { | 355 | if (unlikely(power == dac33->chip_power)) { |
355 | dev_warn(codec->dev, "Trying to set the same power state: %s\n", | 356 | dev_dbg(codec->dev, "Trying to set the same power state: %s\n", |
356 | power ? "ON" : "OFF"); | 357 | power ? "ON" : "OFF"); |
357 | goto exit; | 358 | goto exit; |
358 | } | 359 | } |
@@ -589,6 +590,9 @@ static int dac33_set_bias_level(struct snd_soc_codec *codec, | |||
589 | } | 590 | } |
590 | break; | 591 | break; |
591 | case SND_SOC_BIAS_OFF: | 592 | case SND_SOC_BIAS_OFF: |
593 | /* Do not power off, when the codec is already off */ | ||
594 | if (codec->bias_level == SND_SOC_BIAS_OFF) | ||
595 | return 0; | ||
592 | ret = dac33_hard_power(codec, 0); | 596 | ret = dac33_hard_power(codec, 0); |
593 | if (ret != 0) | 597 | if (ret != 0) |
594 | return ret; | 598 | return ret; |
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index fa4fa33a51aa..99b70e5978a2 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/regulator/consumer.h> | 28 | #include <linux/regulator/consumer.h> |
29 | #include <linux/slab.h> | ||
29 | #include <sound/tpa6130a2-plat.h> | 30 | #include <sound/tpa6130a2-plat.h> |
30 | #include <sound/soc.h> | 31 | #include <sound/soc.h> |
31 | #include <sound/soc-dapm.h> | 32 | #include <sound/soc-dapm.h> |
@@ -35,22 +36,11 @@ | |||
35 | 36 | ||
36 | static struct i2c_client *tpa6130a2_client; | 37 | static struct i2c_client *tpa6130a2_client; |
37 | 38 | ||
38 | #define TPA6130A2_NUM_SUPPLIES 2 | ||
39 | static const char *tpa6130a2_supply_names[TPA6130A2_NUM_SUPPLIES] = { | ||
40 | "CPVSS", | ||
41 | "Vdd", | ||
42 | }; | ||
43 | |||
44 | static const char *tpa6140a2_supply_names[TPA6130A2_NUM_SUPPLIES] = { | ||
45 | "HPVdd", | ||
46 | "AVdd", | ||
47 | }; | ||
48 | |||
49 | /* This struct is used to save the context */ | 39 | /* This struct is used to save the context */ |
50 | struct tpa6130a2_data { | 40 | struct tpa6130a2_data { |
51 | struct mutex mutex; | 41 | struct mutex mutex; |
52 | unsigned char regs[TPA6130A2_CACHEREGNUM]; | 42 | unsigned char regs[TPA6130A2_CACHEREGNUM]; |
53 | struct regulator_bulk_data supplies[TPA6130A2_NUM_SUPPLIES]; | 43 | struct regulator *supply; |
54 | int power_gpio; | 44 | int power_gpio; |
55 | unsigned char power_state; | 45 | unsigned char power_state; |
56 | enum tpa_model id; | 46 | enum tpa_model id; |
@@ -135,11 +125,10 @@ static int tpa6130a2_power(int power) | |||
135 | if (data->power_gpio >= 0) | 125 | if (data->power_gpio >= 0) |
136 | gpio_set_value(data->power_gpio, 1); | 126 | gpio_set_value(data->power_gpio, 1); |
137 | 127 | ||
138 | ret = regulator_bulk_enable(ARRAY_SIZE(data->supplies), | 128 | ret = regulator_enable(data->supply); |
139 | data->supplies); | ||
140 | if (ret != 0) { | 129 | if (ret != 0) { |
141 | dev_err(&tpa6130a2_client->dev, | 130 | dev_err(&tpa6130a2_client->dev, |
142 | "Failed to enable supplies: %d\n", ret); | 131 | "Failed to enable supply: %d\n", ret); |
143 | goto exit; | 132 | goto exit; |
144 | } | 133 | } |
145 | 134 | ||
@@ -160,11 +149,10 @@ static int tpa6130a2_power(int power) | |||
160 | if (data->power_gpio >= 0) | 149 | if (data->power_gpio >= 0) |
161 | gpio_set_value(data->power_gpio, 0); | 150 | gpio_set_value(data->power_gpio, 0); |
162 | 151 | ||
163 | ret = regulator_bulk_disable(ARRAY_SIZE(data->supplies), | 152 | ret = regulator_disable(data->supply); |
164 | data->supplies); | ||
165 | if (ret != 0) { | 153 | if (ret != 0) { |
166 | dev_err(&tpa6130a2_client->dev, | 154 | dev_err(&tpa6130a2_client->dev, |
167 | "Failed to disable supplies: %d\n", ret); | 155 | "Failed to disable supply: %d\n", ret); |
168 | goto exit; | 156 | goto exit; |
169 | } | 157 | } |
170 | 158 | ||
@@ -371,8 +359,8 @@ static const struct snd_soc_dapm_widget tpa6130a2_dapm_widgets[] = { | |||
371 | 0, 0, tpa6130a2_supply_event, | 359 | 0, 0, tpa6130a2_supply_event, |
372 | SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD), | 360 | SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_POST_PMD), |
373 | /* Outputs */ | 361 | /* Outputs */ |
374 | SND_SOC_DAPM_HP("TPA6130A2 Headphone Left", NULL), | 362 | SND_SOC_DAPM_OUTPUT("TPA6130A2 Headphone Left"), |
375 | SND_SOC_DAPM_HP("TPA6130A2 Headphone Right", NULL), | 363 | SND_SOC_DAPM_OUTPUT("TPA6130A2 Headphone Right"), |
376 | }; | 364 | }; |
377 | 365 | ||
378 | static const struct snd_soc_dapm_route audio_map[] = { | 366 | static const struct snd_soc_dapm_route audio_map[] = { |
@@ -411,7 +399,8 @@ static int __devinit tpa6130a2_probe(struct i2c_client *client, | |||
411 | struct device *dev; | 399 | struct device *dev; |
412 | struct tpa6130a2_data *data; | 400 | struct tpa6130a2_data *data; |
413 | struct tpa6130a2_platform_data *pdata; | 401 | struct tpa6130a2_platform_data *pdata; |
414 | int i, ret; | 402 | const char *regulator; |
403 | int ret; | ||
415 | 404 | ||
416 | dev = &client->dev; | 405 | dev = &client->dev; |
417 | 406 | ||
@@ -453,25 +442,21 @@ static int __devinit tpa6130a2_probe(struct i2c_client *client, | |||
453 | } | 442 | } |
454 | 443 | ||
455 | switch (data->id) { | 444 | switch (data->id) { |
445 | default: | ||
446 | dev_warn(dev, "Unknown TPA model (%d). Assuming 6130A2\n", | ||
447 | pdata->id); | ||
456 | case TPA6130A2: | 448 | case TPA6130A2: |
457 | for (i = 0; i < ARRAY_SIZE(data->supplies); i++) | 449 | regulator = "Vdd"; |
458 | data->supplies[i].supply = tpa6130a2_supply_names[i]; | ||
459 | break; | 450 | break; |
460 | case TPA6140A2: | 451 | case TPA6140A2: |
461 | for (i = 0; i < ARRAY_SIZE(data->supplies); i++) | 452 | regulator = "AVdd"; |
462 | data->supplies[i].supply = tpa6140a2_supply_names[i];; | ||
463 | break; | 453 | break; |
464 | default: | ||
465 | dev_warn(dev, "Unknown TPA model (%d). Assuming 6130A2\n", | ||
466 | pdata->id); | ||
467 | for (i = 0; i < ARRAY_SIZE(data->supplies); i++) | ||
468 | data->supplies[i].supply = tpa6130a2_supply_names[i]; | ||
469 | } | 454 | } |
470 | 455 | ||
471 | ret = regulator_bulk_get(dev, ARRAY_SIZE(data->supplies), | 456 | data->supply = regulator_get(dev, regulator); |
472 | data->supplies); | 457 | if (IS_ERR(data->supply)) { |
473 | if (ret != 0) { | 458 | ret = PTR_ERR(data->supply); |
474 | dev_err(dev, "Failed to request supplies: %d\n", ret); | 459 | dev_err(dev, "Failed to request supply: %d\n", ret); |
475 | goto err_regulator; | 460 | goto err_regulator; |
476 | } | 461 | } |
477 | 462 | ||
@@ -494,7 +479,7 @@ static int __devinit tpa6130a2_probe(struct i2c_client *client, | |||
494 | return 0; | 479 | return 0; |
495 | 480 | ||
496 | err_power: | 481 | err_power: |
497 | regulator_bulk_free(ARRAY_SIZE(data->supplies), data->supplies); | 482 | regulator_put(data->supply); |
498 | err_regulator: | 483 | err_regulator: |
499 | if (data->power_gpio >= 0) | 484 | if (data->power_gpio >= 0) |
500 | gpio_free(data->power_gpio); | 485 | gpio_free(data->power_gpio); |
@@ -515,7 +500,7 @@ static int __devexit tpa6130a2_remove(struct i2c_client *client) | |||
515 | if (data->power_gpio >= 0) | 500 | if (data->power_gpio >= 0) |
516 | gpio_free(data->power_gpio); | 501 | gpio_free(data->power_gpio); |
517 | 502 | ||
518 | regulator_bulk_free(ARRAY_SIZE(data->supplies), data->supplies); | 503 | regulator_put(data->supply); |
519 | 504 | ||
520 | kfree(data); | 505 | kfree(data); |
521 | tpa6130a2_client = NULL; | 506 | tpa6130a2_client = NULL; |
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 0fe74d1e2c5f..b4fcdb01fc49 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/i2c/twl.h> | 29 | #include <linux/i2c/twl.h> |
30 | #include <linux/slab.h> | ||
30 | #include <sound/core.h> | 31 | #include <sound/core.h> |
31 | #include <sound/pcm.h> | 32 | #include <sound/pcm.h> |
32 | #include <sound/pcm_params.h> | 33 | #include <sound/pcm_params.h> |
@@ -1102,6 +1103,16 @@ static const struct soc_enum twl4030_vibradir_enum = | |||
1102 | ARRAY_SIZE(twl4030_vibradir_texts), | 1103 | ARRAY_SIZE(twl4030_vibradir_texts), |
1103 | twl4030_vibradir_texts); | 1104 | twl4030_vibradir_texts); |
1104 | 1105 | ||
1106 | /* Digimic Left and right swapping */ | ||
1107 | static const char *twl4030_digimicswap_texts[] = { | ||
1108 | "Not swapped", "Swapped", | ||
1109 | }; | ||
1110 | |||
1111 | static const struct soc_enum twl4030_digimicswap_enum = | ||
1112 | SOC_ENUM_SINGLE(TWL4030_REG_MISC_SET_1, 0, | ||
1113 | ARRAY_SIZE(twl4030_digimicswap_texts), | ||
1114 | twl4030_digimicswap_texts); | ||
1115 | |||
1105 | static const struct snd_kcontrol_new twl4030_snd_controls[] = { | 1116 | static const struct snd_kcontrol_new twl4030_snd_controls[] = { |
1106 | /* Codec operation mode control */ | 1117 | /* Codec operation mode control */ |
1107 | SOC_ENUM_EXT("Codec Operation Mode", twl4030_op_modes_enum, | 1118 | SOC_ENUM_EXT("Codec Operation Mode", twl4030_op_modes_enum, |
@@ -1178,6 +1189,8 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = { | |||
1178 | 1189 | ||
1179 | SOC_ENUM("Vibra H-bridge mode", twl4030_vibradirmode_enum), | 1190 | SOC_ENUM("Vibra H-bridge mode", twl4030_vibradirmode_enum), |
1180 | SOC_ENUM("Vibra H-bridge direction", twl4030_vibradir_enum), | 1191 | SOC_ENUM("Vibra H-bridge direction", twl4030_vibradir_enum), |
1192 | |||
1193 | SOC_ENUM("Digimic LR Swap", twl4030_digimicswap_enum), | ||
1181 | }; | 1194 | }; |
1182 | 1195 | ||
1183 | static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = { | 1196 | static const struct snd_soc_dapm_widget twl4030_dapm_widgets[] = { |
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 2ae442edeb9a..af36346ff336 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -432,6 +432,12 @@ static DECLARE_TLV_DB_SCALE(hs_tlv, -3000, 200, 0); | |||
432 | */ | 432 | */ |
433 | static DECLARE_TLV_DB_SCALE(hf_tlv, -5200, 200, 0); | 433 | static DECLARE_TLV_DB_SCALE(hf_tlv, -5200, 200, 0); |
434 | 434 | ||
435 | /* | ||
436 | * EPGAIN volume control: | ||
437 | * from -24 to 6 dB in 2 dB steps | ||
438 | */ | ||
439 | static DECLARE_TLV_DB_SCALE(ep_tlv, -2400, 200, 0); | ||
440 | |||
435 | /* Left analog microphone selection */ | 441 | /* Left analog microphone selection */ |
436 | static const char *twl6040_amicl_texts[] = | 442 | static const char *twl6040_amicl_texts[] = |
437 | {"Headset Mic", "Main Mic", "Aux/FM Left", "Off"}; | 443 | {"Headset Mic", "Main Mic", "Aux/FM Left", "Off"}; |
@@ -479,6 +485,9 @@ static const struct snd_kcontrol_new hfl_driver_switch_controls = | |||
479 | static const struct snd_kcontrol_new hfr_driver_switch_controls = | 485 | static const struct snd_kcontrol_new hfr_driver_switch_controls = |
480 | SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFRCTL, 4, 1, 0); | 486 | SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFRCTL, 4, 1, 0); |
481 | 487 | ||
488 | static const struct snd_kcontrol_new ep_driver_switch_controls = | ||
489 | SOC_DAPM_SINGLE("Switch", TWL6040_REG_EARCTL, 0, 1, 0); | ||
490 | |||
482 | static const struct snd_kcontrol_new twl6040_snd_controls[] = { | 491 | static const struct snd_kcontrol_new twl6040_snd_controls[] = { |
483 | /* Capture gains */ | 492 | /* Capture gains */ |
484 | SOC_DOUBLE_TLV("Capture Preamplifier Volume", | 493 | SOC_DOUBLE_TLV("Capture Preamplifier Volume", |
@@ -491,7 +500,8 @@ static const struct snd_kcontrol_new twl6040_snd_controls[] = { | |||
491 | TWL6040_REG_HSGAIN, 0, 4, 0xF, 1, hs_tlv), | 500 | TWL6040_REG_HSGAIN, 0, 4, 0xF, 1, hs_tlv), |
492 | SOC_DOUBLE_R_TLV("Handsfree Playback Volume", | 501 | SOC_DOUBLE_R_TLV("Handsfree Playback Volume", |
493 | TWL6040_REG_HFLGAIN, TWL6040_REG_HFRGAIN, 0, 0x1D, 1, hf_tlv), | 502 | TWL6040_REG_HFLGAIN, TWL6040_REG_HFRGAIN, 0, 0x1D, 1, hf_tlv), |
494 | 503 | SOC_SINGLE_TLV("Earphone Playback Volume", | |
504 | TWL6040_REG_EARCTL, 1, 0xF, 1, ep_tlv), | ||
495 | }; | 505 | }; |
496 | 506 | ||
497 | static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = { | 507 | static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = { |
@@ -507,6 +517,7 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = { | |||
507 | SND_SOC_DAPM_OUTPUT("HSOR"), | 517 | SND_SOC_DAPM_OUTPUT("HSOR"), |
508 | SND_SOC_DAPM_OUTPUT("HFL"), | 518 | SND_SOC_DAPM_OUTPUT("HFL"), |
509 | SND_SOC_DAPM_OUTPUT("HFR"), | 519 | SND_SOC_DAPM_OUTPUT("HFR"), |
520 | SND_SOC_DAPM_OUTPUT("EP"), | ||
510 | 521 | ||
511 | /* Analog input muxes for the capture amplifiers */ | 522 | /* Analog input muxes for the capture amplifiers */ |
512 | SND_SOC_DAPM_MUX("Analog Left Capture Route", | 523 | SND_SOC_DAPM_MUX("Analog Left Capture Route", |
@@ -572,6 +583,10 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = { | |||
572 | SND_SOC_NOPM, 0, 0, &hfr_driver_switch_controls, | 583 | SND_SOC_NOPM, 0, 0, &hfr_driver_switch_controls, |
573 | twl6040_power_mode_event, | 584 | twl6040_power_mode_event, |
574 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | 585 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), |
586 | SND_SOC_DAPM_SWITCH_E("Earphone Driver", | ||
587 | SND_SOC_NOPM, 0, 0, &ep_driver_switch_controls, | ||
588 | twl6040_power_mode_event, | ||
589 | SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), | ||
575 | 590 | ||
576 | /* Analog playback PGAs */ | 591 | /* Analog playback PGAs */ |
577 | SND_SOC_DAPM_PGA("HFDAC Left PGA", | 592 | SND_SOC_DAPM_PGA("HFDAC Left PGA", |
@@ -607,6 +622,10 @@ static const struct snd_soc_dapm_route intercon[] = { | |||
607 | {"HSOL", NULL, "Headset Left Driver"}, | 622 | {"HSOL", NULL, "Headset Left Driver"}, |
608 | {"HSOR", NULL, "Headset Right Driver"}, | 623 | {"HSOR", NULL, "Headset Right Driver"}, |
609 | 624 | ||
625 | /* Earphone playback path */ | ||
626 | {"Earphone Driver", "Switch", "HSDAC Left"}, | ||
627 | {"EP", NULL, "Earphone Driver"}, | ||
628 | |||
610 | /* Handsfree playback path */ | 629 | /* Handsfree playback path */ |
611 | {"HFDAC Left Playback", "Switch", "HFDAC Left"}, | 630 | {"HFDAC Left Playback", "Switch", "HFDAC Left"}, |
612 | {"HFDAC Right Playback", "Switch", "HFDAC Right"}, | 631 | {"HFDAC Right Playback", "Switch", "HFDAC Right"}, |
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c index 2f4d7287fa3c..28aac53c97bb 100644 --- a/sound/soc/codecs/uda134x.c +++ b/sound/soc/codecs/uda134x.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/slab.h> | ||
18 | #include <sound/pcm.h> | 19 | #include <sound/pcm.h> |
19 | #include <sound/pcm_params.h> | 20 | #include <sound/pcm_params.h> |
20 | #include <sound/soc.h> | 21 | #include <sound/soc.h> |
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c index 8de866618bf4..002e289d1255 100644 --- a/sound/soc/codecs/wm2000.c +++ b/sound/soc/codecs/wm2000.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/debugfs.h> | 33 | #include <linux/debugfs.h> |
34 | #include <linux/slab.h> | ||
34 | #include <sound/core.h> | 35 | #include <sound/core.h> |
35 | #include <sound/pcm.h> | 36 | #include <sound/pcm.h> |
36 | #include <sound/pcm_params.h> | 37 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index c342c2c9fb49..0221ca79b3ae 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
17 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index 535db3bff866..8f294066b0ed 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
19 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index d3527001b178..0f7bcb61071a 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index 2cdffb0b2a80..37242a7d3077 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regulator/consumer.h> | 21 | #include <linux/regulator/consumer.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c index 94b3f4c4d64e..c3571ee5c11b 100644 --- a/sound/soc/codecs/wm8580.c +++ b/sound/soc/codecs/wm8580.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/regulator/consumer.h> | 27 | #include <linux/regulator/consumer.h> |
28 | #include <linux/slab.h> | ||
28 | 29 | ||
29 | #include <sound/core.h> | 30 | #include <sound/core.h> |
30 | #include <sound/pcm.h> | 31 | #include <sound/pcm.h> |
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c index 5acd35bdfd53..effb14eee7d4 100644 --- a/sound/soc/codecs/wm8711.c +++ b/sound/soc/codecs/wm8711.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8727.c b/sound/soc/codecs/wm8727.c index 63a254e293ca..1072621e93fd 100644 --- a/sound/soc/codecs/wm8727.c +++ b/sound/soc/codecs/wm8727.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/slab.h> | ||
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/device.h> | 19 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c index bf56a58d0916..34be2d2b69ef 100644 --- a/sound/soc/codecs/wm8728.c +++ b/sound/soc/codecs/wm8728.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index e17c714196f2..0ab9b6355297 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
22 | #include <linux/regulator/consumer.h> | 23 | #include <linux/regulator/consumer.h> |
23 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c index 60d7cf88bf1d..9407e193fcc3 100644 --- a/sound/soc/codecs/wm8750.c +++ b/sound/soc/codecs/wm8750.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index f9e56a1dfde1..b59f349c5218 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/i2c.h> | 40 | #include <linux/i2c.h> |
41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
42 | #include <linux/spi/spi.h> | 42 | #include <linux/spi/spi.h> |
43 | #include <linux/slab.h> | ||
43 | #include <sound/core.h> | 44 | #include <sound/core.h> |
44 | #include <sound/pcm.h> | 45 | #include <sound/pcm.h> |
45 | #include <sound/pcm_params.h> | 46 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index 694600969d67..7e4a627b4c7e 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index 19a6b25988c8..5da17a704e5a 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/slab.h> | ||
27 | #include <sound/core.h> | 28 | #include <sound/core.h> |
28 | #include <sound/pcm.h> | 29 | #include <sound/pcm.h> |
29 | #include <sound/pcm_params.h> | 30 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 05b28cf0f96f..bf08282d5ee5 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/pm.h> | 22 | #include <linux/pm.h> |
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/slab.h> | ||
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
26 | #include <sound/jack.h> | 27 | #include <sound/jack.h> |
27 | #include <sound/pcm.h> | 28 | #include <sound/pcm.h> |
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index a022ca7e7585..87f14f8675fa 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regulator/consumer.h> | 21 | #include <linux/regulator/consumer.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index e313ab5de85a..e3c4bbfaae27 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/spi/spi.h> | 32 | #include <linux/spi/spi.h> |
33 | #include <linux/slab.h> | ||
33 | #include <sound/core.h> | 34 | #include <sound/core.h> |
34 | #include <sound/pcm.h> | 35 | #include <sound/pcm.h> |
35 | #include <sound/pcm_params.h> | 36 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c index 5f0bde56cf0d..fedb76452f1b 100644 --- a/sound/soc/codecs/wm8955.c +++ b/sound/soc/codecs/wm8955.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/regulator/consumer.h> | 20 | #include <linux/regulator/consumer.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 518c84e623ab..7233cc68435a 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/pm.h> | 15 | #include <linux/pm.h> |
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/slab.h> | ||
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/pcm.h> | 20 | #include <sound/pcm.h> |
20 | #include <sound/pcm_params.h> | 21 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index bab393feb945..5b9a756242f1 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index 95c9ec3862d5..a99620f335d2 100644 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/pcm_params.h> | 26 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index 44841fec5545..a2c4b2f37cca 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 6866a6a80fec..51d5f433215c 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index 563cf898dafc..0417dae32e6f 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index b6c003f9e862..c018772cc430 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c index e739c5008b1b..d8d300c6175f 100644 --- a/sound/soc/codecs/wm8993.c +++ b/sound/soc/codecs/wm8993.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
19 | #include <linux/regulator/consumer.h> | 19 | #include <linux/regulator/consumer.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index dda356591fdb..e84a1177f350 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regulator/consumer.h> | 21 | #include <linux/regulator/consumer.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/pcm_params.h> | 25 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 87a87487d3f9..13186fb4dcb4 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
22 | #include <sound/pcm.h> | 23 | #include <sound/pcm.h> |
23 | #include <sound/pcm_params.h> | 24 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index ec54c6da9856..8793341849d1 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/slab.h> | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index dd4b6ce01ceb..28790a2ffe8d 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/device.h> | 17 | #include <linux/device.h> |
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 6a30b844a671..34e0c91092fa 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/device.h> | 21 | #include <linux/device.h> |
21 | #include <sound/core.h> | 22 | #include <sound/core.h> |
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 4aad7ecc90a2..adadcd3aa1b1 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/slab.h> | ||
15 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
16 | #include <linux/io.h> | 17 | #include <linux/io.h> |
17 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index c056bfbe0340..79f0f4ad242c 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
23 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index b1a3a278819f..410c7496a18d 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/gfp.h> | ||
22 | 23 | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 93f0f38a32c9..762c1b8e8e4e 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/slab.h> | ||
17 | 18 | ||
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/pcm.h> | 20 | #include <sound/pcm.h> |
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index 30ed568afb2e..d639e55c5124 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
10 | #include <linux/of_device.h> | 10 | #include <linux/of_device.h> |
11 | #include <linux/slab.h> | ||
11 | 12 | ||
12 | #include <sound/soc.h> | 13 | #include <sound/soc.h> |
13 | 14 | ||
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index ef67d1cdffe7..83de1c81c8c4 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * express or implied. | 9 | * express or implied. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/slab.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
14 | #include <linux/of_device.h> | 15 | #include <linux/of_device.h> |
diff --git a/sound/soc/fsl/soc-of-simple.c b/sound/soc/fsl/soc-of-simple.c index 8bc5cd9e972f..3bc13fd89096 100644 --- a/sound/soc/fsl/soc-of-simple.c +++ b/sound/soc/fsl/soc-of-simple.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/of.h> | 14 | #include <linux/of.h> |
15 | #include <linux/slab.h> | ||
15 | #include <sound/core.h> | 16 | #include <sound/core.h> |
16 | #include <sound/pcm.h> | 17 | #include <sound/pcm.h> |
17 | #include <sound/pcm_params.h> | 18 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c index 7bd07d66bf3b..05f19c9284f4 100644 --- a/sound/soc/imx/imx-pcm-dma-mx2.c +++ b/sound/soc/imx/imx-pcm-dma-mx2.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/initval.h> | 25 | #include <sound/initval.h> |
diff --git a/sound/soc/imx/imx-pcm-fiq.c b/sound/soc/imx/imx-pcm-fiq.c index ecec332121f2..6b518e07eea9 100644 --- a/sound/soc/imx/imx-pcm-fiq.c +++ b/sound/soc/imx/imx-pcm-fiq.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/initval.h> | 25 | #include <sound/initval.h> |
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index 1bf9dc88babf..80b4fee2442b 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/module.h> | 40 | #include <linux/module.h> |
41 | #include <linux/platform_device.h> | 41 | #include <linux/platform_device.h> |
42 | #include <linux/slab.h> | ||
42 | 43 | ||
43 | #include <sound/core.h> | 44 | #include <sound/core.h> |
44 | #include <sound/initval.h> | 45 | #include <sound/initval.h> |
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig index 83be4a76d2bb..d542ea2ff6be 100644 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig | |||
@@ -98,6 +98,15 @@ config SND_OMAP_SOC_SDP3430 | |||
98 | Say Y if you want to add support for SoC audio on Texas Instruments | 98 | Say Y if you want to add support for SoC audio on Texas Instruments |
99 | SDP3430. | 99 | SDP3430. |
100 | 100 | ||
101 | config SND_OMAP_SOC_SDP4430 | ||
102 | tristate "SoC Audio support for Texas Instruments SDP4430" | ||
103 | depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP_4430SDP | ||
104 | select SND_OMAP_SOC_MCPDM | ||
105 | select SND_SOC_TWL6040 | ||
106 | help | ||
107 | Say Y if you want to add support for SoC audio on Texas Instruments | ||
108 | SDP4430. | ||
109 | |||
101 | config SND_OMAP_SOC_OMAP3_PANDORA | 110 | config SND_OMAP_SOC_OMAP3_PANDORA |
102 | tristate "SoC Audio support for OMAP3 Pandora" | 111 | tristate "SoC Audio support for OMAP3 Pandora" |
103 | depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_PANDORA | 112 | depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3_PANDORA |
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile index 3a75755f25e4..ba9fc650db28 100644 --- a/sound/soc/omap/Makefile +++ b/sound/soc/omap/Makefile | |||
@@ -17,6 +17,7 @@ snd-soc-omap2evm-objs := omap2evm.o | |||
17 | snd-soc-omap3evm-objs := omap3evm.o | 17 | snd-soc-omap3evm-objs := omap3evm.o |
18 | snd-soc-am3517evm-objs := am3517evm.o | 18 | snd-soc-am3517evm-objs := am3517evm.o |
19 | snd-soc-sdp3430-objs := sdp3430.o | 19 | snd-soc-sdp3430-objs := sdp3430.o |
20 | snd-soc-sdp4430-objs := sdp4430.o | ||
20 | snd-soc-omap3pandora-objs := omap3pandora.o | 21 | snd-soc-omap3pandora-objs := omap3pandora.o |
21 | snd-soc-omap3beagle-objs := omap3beagle.o | 22 | snd-soc-omap3beagle-objs := omap3beagle.o |
22 | snd-soc-zoom2-objs := zoom2.o | 23 | snd-soc-zoom2-objs := zoom2.o |
@@ -31,6 +32,7 @@ obj-$(CONFIG_SND_OMAP_SOC_OMAP2EVM) += snd-soc-omap2evm.o | |||
31 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3EVM) += snd-soc-omap3evm.o | 32 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3EVM) += snd-soc-omap3evm.o |
32 | obj-$(CONFIG_SND_OMAP_SOC_AM3517EVM) += snd-soc-am3517evm.o | 33 | obj-$(CONFIG_SND_OMAP_SOC_AM3517EVM) += snd-soc-am3517evm.o |
33 | obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o | 34 | obj-$(CONFIG_SND_OMAP_SOC_SDP3430) += snd-soc-sdp3430.o |
35 | obj-$(CONFIG_SND_OMAP_SOC_SDP4430) += snd-soc-sdp4430.o | ||
34 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o | 36 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3_PANDORA) += snd-soc-omap3pandora.o |
35 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o | 37 | obj-$(CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE) += snd-soc-omap3beagle.o |
36 | obj-$(CONFIG_SND_OMAP_SOC_ZOOM2) += snd-soc-zoom2.o | 38 | obj-$(CONFIG_SND_OMAP_SOC_ZOOM2) += snd-soc-zoom2.o |
diff --git a/sound/soc/omap/mcpdm.c b/sound/soc/omap/mcpdm.c index 479d3b6306d7..90b8bf71c893 100644 --- a/sound/soc/omap/mcpdm.c +++ b/sound/soc/omap/mcpdm.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
28 | #include <linux/slab.h> | ||
28 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
29 | #include <linux/err.h> | 30 | #include <linux/err.h> |
30 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 2d33a89f147a..6f44cb4d30b8 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -320,8 +320,18 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
320 | omap_mcbsp_dai_dma_params[id][substream->stream].dma_req = dma; | 320 | omap_mcbsp_dai_dma_params[id][substream->stream].dma_req = dma; |
321 | omap_mcbsp_dai_dma_params[id][substream->stream].port_addr = port; | 321 | omap_mcbsp_dai_dma_params[id][substream->stream].port_addr = port; |
322 | omap_mcbsp_dai_dma_params[id][substream->stream].sync_mode = sync_mode; | 322 | omap_mcbsp_dai_dma_params[id][substream->stream].sync_mode = sync_mode; |
323 | omap_mcbsp_dai_dma_params[id][substream->stream].data_type = | 323 | switch (params_format(params)) { |
324 | OMAP_DMA_DATA_TYPE_S16; | 324 | case SNDRV_PCM_FORMAT_S16_LE: |
325 | omap_mcbsp_dai_dma_params[id][substream->stream].data_type = | ||
326 | OMAP_DMA_DATA_TYPE_S16; | ||
327 | break; | ||
328 | case SNDRV_PCM_FORMAT_S32_LE: | ||
329 | omap_mcbsp_dai_dma_params[id][substream->stream].data_type = | ||
330 | OMAP_DMA_DATA_TYPE_S32; | ||
331 | break; | ||
332 | default: | ||
333 | return -EINVAL; | ||
334 | } | ||
325 | 335 | ||
326 | snd_soc_dai_set_dma_data(cpu_dai, substream, | 336 | snd_soc_dai_set_dma_data(cpu_dai, substream, |
327 | &omap_mcbsp_dai_dma_params[id][substream->stream]); | 337 | &omap_mcbsp_dai_dma_params[id][substream->stream]); |
@@ -356,6 +366,14 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
356 | regs->xcr2 |= XWDLEN2(OMAP_MCBSP_WORD_16); | 366 | regs->xcr2 |= XWDLEN2(OMAP_MCBSP_WORD_16); |
357 | regs->xcr1 |= XWDLEN1(OMAP_MCBSP_WORD_16); | 367 | regs->xcr1 |= XWDLEN1(OMAP_MCBSP_WORD_16); |
358 | break; | 368 | break; |
369 | case SNDRV_PCM_FORMAT_S32_LE: | ||
370 | /* Set word lengths */ | ||
371 | wlen = 32; | ||
372 | regs->rcr2 |= RWDLEN2(OMAP_MCBSP_WORD_32); | ||
373 | regs->rcr1 |= RWDLEN1(OMAP_MCBSP_WORD_32); | ||
374 | regs->xcr2 |= XWDLEN2(OMAP_MCBSP_WORD_32); | ||
375 | regs->xcr1 |= XWDLEN1(OMAP_MCBSP_WORD_32); | ||
376 | break; | ||
359 | default: | 377 | default: |
360 | /* Unsupported PCM format */ | 378 | /* Unsupported PCM format */ |
361 | return -EINVAL; | 379 | return -EINVAL; |
@@ -659,13 +677,15 @@ static struct snd_soc_dai_ops omap_mcbsp_dai_ops = { | |||
659 | .channels_min = 1, \ | 677 | .channels_min = 1, \ |
660 | .channels_max = 16, \ | 678 | .channels_max = 16, \ |
661 | .rates = OMAP_MCBSP_RATES, \ | 679 | .rates = OMAP_MCBSP_RATES, \ |
662 | .formats = SNDRV_PCM_FMTBIT_S16_LE, \ | 680 | .formats = SNDRV_PCM_FMTBIT_S16_LE | \ |
681 | SNDRV_PCM_FMTBIT_S32_LE, \ | ||
663 | }, \ | 682 | }, \ |
664 | .capture = { \ | 683 | .capture = { \ |
665 | .channels_min = 1, \ | 684 | .channels_min = 1, \ |
666 | .channels_max = 16, \ | 685 | .channels_max = 16, \ |
667 | .rates = OMAP_MCBSP_RATES, \ | 686 | .rates = OMAP_MCBSP_RATES, \ |
668 | .formats = SNDRV_PCM_FMTBIT_S16_LE, \ | 687 | .formats = SNDRV_PCM_FMTBIT_S16_LE | \ |
688 | SNDRV_PCM_FMTBIT_S32_LE, \ | ||
669 | }, \ | 689 | }, \ |
670 | .ops = &omap_mcbsp_dai_ops, \ | 690 | .ops = &omap_mcbsp_dai_ops, \ |
671 | .private_data = &mcbsp_data[(link_id)].bus_id, \ | 691 | .private_data = &mcbsp_data[(link_id)].bus_id, \ |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 39456447132c..1e521904ea64 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
26 | #include <linux/slab.h> | ||
26 | #include <sound/core.h> | 27 | #include <sound/core.h> |
27 | #include <sound/pcm.h> | 28 | #include <sound/pcm.h> |
28 | #include <sound/pcm_params.h> | 29 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c new file mode 100644 index 000000000000..4ebbde6b565f --- /dev/null +++ b/sound/soc/omap/sdp4430.c | |||
@@ -0,0 +1,233 @@ | |||
1 | /* | ||
2 | * sdp4430.c -- SoC audio for TI OMAP4430 SDP | ||
3 | * | ||
4 | * Author: Misael Lopez Cruz <x0052729@ti.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * version 2 as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
18 | * 02110-1301 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #include <linux/clk.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <sound/core.h> | ||
25 | #include <sound/pcm.h> | ||
26 | #include <sound/soc.h> | ||
27 | #include <sound/soc-dapm.h> | ||
28 | |||
29 | #include <asm/mach-types.h> | ||
30 | #include <plat/hardware.h> | ||
31 | #include <plat/mux.h> | ||
32 | |||
33 | #include "mcpdm.h" | ||
34 | #include "omap-mcpdm.h" | ||
35 | #include "omap-pcm.h" | ||
36 | #include "../codecs/twl6040.h" | ||
37 | |||
38 | static int twl6040_power_mode; | ||
39 | |||
40 | static int sdp4430_hw_params(struct snd_pcm_substream *substream, | ||
41 | struct snd_pcm_hw_params *params) | ||
42 | { | ||
43 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
44 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | ||
45 | int clk_id, freq; | ||
46 | int ret; | ||
47 | |||
48 | if (twl6040_power_mode) { | ||
49 | clk_id = TWL6040_SYSCLK_SEL_HPPLL; | ||
50 | freq = 38400000; | ||
51 | } else { | ||
52 | clk_id = TWL6040_SYSCLK_SEL_LPPLL; | ||
53 | freq = 32768; | ||
54 | } | ||
55 | |||
56 | /* set the codec mclk */ | ||
57 | ret = snd_soc_dai_set_sysclk(codec_dai, clk_id, freq, | ||
58 | SND_SOC_CLOCK_IN); | ||
59 | if (ret) { | ||
60 | printk(KERN_ERR "can't set codec system clock\n"); | ||
61 | return ret; | ||
62 | } | ||
63 | } | ||
64 | |||
65 | static struct snd_soc_ops sdp4430_ops = { | ||
66 | .hw_params = sdp4430_hw_params, | ||
67 | }; | ||
68 | |||
69 | static int sdp4430_get_power_mode(struct snd_kcontrol *kcontrol, | ||
70 | struct snd_ctl_elem_value *ucontrol) | ||
71 | { | ||
72 | ucontrol->value.integer.value[0] = twl6040_power_mode; | ||
73 | return 0; | ||
74 | } | ||
75 | |||
76 | static int sdp4430_set_power_mode(struct snd_kcontrol *kcontrol, | ||
77 | struct snd_ctl_elem_value *ucontrol) | ||
78 | { | ||
79 | if (twl6040_power_mode == ucontrol->value.integer.value[0]) | ||
80 | return 0; | ||
81 | |||
82 | twl6040_power_mode = ucontrol->value.integer.value[0]; | ||
83 | |||
84 | return 1; | ||
85 | } | ||
86 | |||
87 | static const char *power_texts[] = {"Low-Power", "High-Performance"}; | ||
88 | |||
89 | static const struct soc_enum sdp4430_enum[] = { | ||
90 | SOC_ENUM_SINGLE_EXT(2, power_texts), | ||
91 | }; | ||
92 | |||
93 | static const struct snd_kcontrol_new sdp4430_controls[] = { | ||
94 | SOC_ENUM_EXT("TWL6040 Power Mode", sdp4430_enum[0], | ||
95 | sdp4430_get_power_mode, sdp4430_set_power_mode), | ||
96 | }; | ||
97 | |||
98 | /* SDP4430 machine DAPM */ | ||
99 | static const struct snd_soc_dapm_widget sdp4430_twl6040_dapm_widgets[] = { | ||
100 | SND_SOC_DAPM_MIC("Ext Mic", NULL), | ||
101 | SND_SOC_DAPM_SPK("Ext Spk", NULL), | ||
102 | SND_SOC_DAPM_MIC("Headset Mic", NULL), | ||
103 | SND_SOC_DAPM_HP("Headset Stereophone", NULL), | ||
104 | SND_SOC_DAPM_SPK("Earphone Spk", NULL), | ||
105 | }; | ||
106 | |||
107 | static const struct snd_soc_dapm_route audio_map[] = { | ||
108 | /* External Mics: MAINMIC, SUBMIC with bias*/ | ||
109 | {"MAINMIC", NULL, "Main Mic Bias"}, | ||
110 | {"SUBMIC", NULL, "Main Mic Bias"}, | ||
111 | {"Main Mic Bias", NULL, "Ext Mic"}, | ||
112 | |||
113 | /* External Speakers: HFL, HFR */ | ||
114 | {"Ext Spk", NULL, "HFL"}, | ||
115 | {"Ext Spk", NULL, "HFR"}, | ||
116 | |||
117 | /* Headset Mic: HSMIC with bias */ | ||
118 | {"HSMIC", NULL, "Headset Mic Bias"}, | ||
119 | {"Headset Mic Bias", NULL, "Headset Mic"}, | ||
120 | |||
121 | /* Headset Stereophone (Headphone): HSOL, HSOR */ | ||
122 | {"Headset Stereophone", NULL, "HSOL"}, | ||
123 | {"Headset Stereophone", NULL, "HSOR"}, | ||
124 | |||
125 | /* Earphone speaker */ | ||
126 | {"Earphone Spk", NULL, "EP"}, | ||
127 | }; | ||
128 | |||
129 | static int sdp4430_twl6040_init(struct snd_soc_codec *codec) | ||
130 | { | ||
131 | int ret; | ||
132 | |||
133 | /* Add SDP4430 specific controls */ | ||
134 | ret = snd_soc_add_controls(codec, sdp4430_controls, | ||
135 | ARRAY_SIZE(sdp4430_controls)); | ||
136 | if (ret) | ||
137 | return ret; | ||
138 | |||
139 | /* Add SDP4430 specific widgets */ | ||
140 | ret = snd_soc_dapm_new_controls(codec, sdp4430_twl6040_dapm_widgets, | ||
141 | ARRAY_SIZE(sdp4430_twl6040_dapm_widgets)); | ||
142 | if (ret) | ||
143 | return ret; | ||
144 | |||
145 | /* Set up SDP4430 specific audio path audio_map */ | ||
146 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | ||
147 | |||
148 | /* SDP4430 connected pins */ | ||
149 | snd_soc_dapm_enable_pin(codec, "Ext Mic"); | ||
150 | snd_soc_dapm_enable_pin(codec, "Ext Spk"); | ||
151 | snd_soc_dapm_enable_pin(codec, "Headset Mic"); | ||
152 | snd_soc_dapm_enable_pin(codec, "Headset Stereophone"); | ||
153 | |||
154 | /* TWL6040 not connected pins */ | ||
155 | snd_soc_dapm_nc_pin(codec, "AFML"); | ||
156 | snd_soc_dapm_nc_pin(codec, "AFMR"); | ||
157 | |||
158 | ret = snd_soc_dapm_sync(codec); | ||
159 | |||
160 | return ret; | ||
161 | } | ||
162 | |||
163 | /* Digital audio interface glue - connects codec <--> CPU */ | ||
164 | static struct snd_soc_dai_link sdp4430_dai = { | ||
165 | .name = "TWL6040", | ||
166 | .stream_name = "TWL6040", | ||
167 | .cpu_dai = &omap_mcpdm_dai, | ||
168 | .codec_dai = &twl6040_dai, | ||
169 | .init = sdp4430_twl6040_init, | ||
170 | .ops = &sdp4430_ops, | ||
171 | }; | ||
172 | |||
173 | /* Audio machine driver */ | ||
174 | static struct snd_soc_card snd_soc_sdp4430 = { | ||
175 | .name = "SDP4430", | ||
176 | .platform = &omap_soc_platform, | ||
177 | .dai_link = &sdp4430_dai, | ||
178 | .num_links = 1, | ||
179 | }; | ||
180 | |||
181 | /* Audio subsystem */ | ||
182 | static struct snd_soc_device sdp4430_snd_devdata = { | ||
183 | .card = &snd_soc_sdp4430, | ||
184 | .codec_dev = &soc_codec_dev_twl6040, | ||
185 | }; | ||
186 | |||
187 | static struct platform_device *sdp4430_snd_device; | ||
188 | |||
189 | static int __init sdp4430_soc_init(void) | ||
190 | { | ||
191 | int ret; | ||
192 | |||
193 | if (!machine_is_omap_4430sdp()) { | ||
194 | pr_debug("Not SDP4430!\n"); | ||
195 | return -ENODEV; | ||
196 | } | ||
197 | printk(KERN_INFO "SDP4430 SoC init\n"); | ||
198 | |||
199 | sdp4430_snd_device = platform_device_alloc("soc-audio", -1); | ||
200 | if (!sdp4430_snd_device) { | ||
201 | printk(KERN_ERR "Platform device allocation failed\n"); | ||
202 | return -ENOMEM; | ||
203 | } | ||
204 | |||
205 | platform_set_drvdata(sdp4430_snd_device, &sdp4430_snd_devdata); | ||
206 | sdp4430_snd_devdata.dev = &sdp4430_snd_device->dev; | ||
207 | |||
208 | ret = platform_device_add(sdp4430_snd_device); | ||
209 | if (ret) | ||
210 | goto err; | ||
211 | |||
212 | /* Codec starts in HP mode */ | ||
213 | twl6040_power_mode = 1; | ||
214 | |||
215 | return 0; | ||
216 | |||
217 | err: | ||
218 | printk(KERN_ERR "Unable to add platform device\n"); | ||
219 | platform_device_put(sdp4430_snd_device); | ||
220 | return ret; | ||
221 | } | ||
222 | module_init(sdp4430_soc_init); | ||
223 | |||
224 | static void __exit sdp4430_soc_exit(void) | ||
225 | { | ||
226 | platform_device_unregister(sdp4430_snd_device); | ||
227 | } | ||
228 | module_exit(sdp4430_soc_exit); | ||
229 | |||
230 | MODULE_AUTHOR("Misael Lopez Cruz <x0052729@ti.com>"); | ||
231 | MODULE_DESCRIPTION("ALSA SoC SDP4430"); | ||
232 | MODULE_LICENSE("GPL"); | ||
233 | |||
diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig index 495a36fba360..e30c8325f35e 100644 --- a/sound/soc/pxa/Kconfig +++ b/sound/soc/pxa/Kconfig | |||
@@ -23,6 +23,7 @@ config SND_PXA2XX_SOC_I2S | |||
23 | 23 | ||
24 | config SND_PXA_SOC_SSP | 24 | config SND_PXA_SOC_SSP |
25 | tristate | 25 | tristate |
26 | select PXA_SSP | ||
26 | 27 | ||
27 | config SND_PXA2XX_SOC_CORGI | 28 | config SND_PXA2XX_SOC_CORGI |
28 | tristate "SoC Audio support for Sharp Zaurus SL-C7x0" | 29 | tristate "SoC Audio support for Sharp Zaurus SL-C7x0" |
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index 6959c5199160..a1fd23e0e3d0 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/slab.h> | ||
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
@@ -31,9 +32,8 @@ | |||
31 | 32 | ||
32 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
33 | #include <mach/dma.h> | 34 | #include <mach/dma.h> |
34 | #include <mach/regs-ssp.h> | ||
35 | #include <mach/audio.h> | 35 | #include <mach/audio.h> |
36 | #include <mach/ssp.h> | 36 | #include <plat/ssp.h> |
37 | 37 | ||
38 | #include "pxa2xx-pcm.h" | 38 | #include "pxa2xx-pcm.h" |
39 | #include "pxa-ssp.h" | 39 | #include "pxa-ssp.h" |
@@ -56,15 +56,15 @@ struct ssp_priv { | |||
56 | static void dump_registers(struct ssp_device *ssp) | 56 | static void dump_registers(struct ssp_device *ssp) |
57 | { | 57 | { |
58 | dev_dbg(&ssp->pdev->dev, "SSCR0 0x%08x SSCR1 0x%08x SSTO 0x%08x\n", | 58 | dev_dbg(&ssp->pdev->dev, "SSCR0 0x%08x SSCR1 0x%08x SSTO 0x%08x\n", |
59 | ssp_read_reg(ssp, SSCR0), ssp_read_reg(ssp, SSCR1), | 59 | pxa_ssp_read_reg(ssp, SSCR0), pxa_ssp_read_reg(ssp, SSCR1), |
60 | ssp_read_reg(ssp, SSTO)); | 60 | pxa_ssp_read_reg(ssp, SSTO)); |
61 | 61 | ||
62 | dev_dbg(&ssp->pdev->dev, "SSPSP 0x%08x SSSR 0x%08x SSACD 0x%08x\n", | 62 | dev_dbg(&ssp->pdev->dev, "SSPSP 0x%08x SSSR 0x%08x SSACD 0x%08x\n", |
63 | ssp_read_reg(ssp, SSPSP), ssp_read_reg(ssp, SSSR), | 63 | pxa_ssp_read_reg(ssp, SSPSP), pxa_ssp_read_reg(ssp, SSSR), |
64 | ssp_read_reg(ssp, SSACD)); | 64 | pxa_ssp_read_reg(ssp, SSACD)); |
65 | } | 65 | } |
66 | 66 | ||
67 | static void ssp_enable(struct ssp_device *ssp) | 67 | static void pxa_ssp_enable(struct ssp_device *ssp) |
68 | { | 68 | { |
69 | uint32_t sscr0; | 69 | uint32_t sscr0; |
70 | 70 | ||
@@ -72,7 +72,7 @@ static void ssp_enable(struct ssp_device *ssp) | |||
72 | __raw_writel(sscr0, ssp->mmio_base + SSCR0); | 72 | __raw_writel(sscr0, ssp->mmio_base + SSCR0); |
73 | } | 73 | } |
74 | 74 | ||
75 | static void ssp_disable(struct ssp_device *ssp) | 75 | static void pxa_ssp_disable(struct ssp_device *ssp) |
76 | { | 76 | { |
77 | uint32_t sscr0; | 77 | uint32_t sscr0; |
78 | 78 | ||
@@ -86,7 +86,7 @@ struct pxa2xx_pcm_dma_data { | |||
86 | }; | 86 | }; |
87 | 87 | ||
88 | static struct pxa2xx_pcm_dma_params * | 88 | static struct pxa2xx_pcm_dma_params * |
89 | ssp_get_dma_params(struct ssp_device *ssp, int width4, int out) | 89 | pxa_ssp_get_dma_params(struct ssp_device *ssp, int width4, int out) |
90 | { | 90 | { |
91 | struct pxa2xx_pcm_dma_data *dma; | 91 | struct pxa2xx_pcm_dma_data *dma; |
92 | 92 | ||
@@ -118,7 +118,7 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream, | |||
118 | 118 | ||
119 | if (!cpu_dai->active) { | 119 | if (!cpu_dai->active) { |
120 | clk_enable(ssp->clk); | 120 | clk_enable(ssp->clk); |
121 | ssp_disable(ssp); | 121 | pxa_ssp_disable(ssp); |
122 | } | 122 | } |
123 | 123 | ||
124 | kfree(snd_soc_dai_get_dma_data(cpu_dai, substream)); | 124 | kfree(snd_soc_dai_get_dma_data(cpu_dai, substream)); |
@@ -136,7 +136,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream, | |||
136 | struct ssp_device *ssp = priv->ssp; | 136 | struct ssp_device *ssp = priv->ssp; |
137 | 137 | ||
138 | if (!cpu_dai->active) { | 138 | if (!cpu_dai->active) { |
139 | ssp_disable(ssp); | 139 | pxa_ssp_disable(ssp); |
140 | clk_disable(ssp->clk); | 140 | clk_disable(ssp->clk); |
141 | } | 141 | } |
142 | 142 | ||
@@ -159,7 +159,7 @@ static int pxa_ssp_suspend(struct snd_soc_dai *cpu_dai) | |||
159 | priv->to = __raw_readl(ssp->mmio_base + SSTO); | 159 | priv->to = __raw_readl(ssp->mmio_base + SSTO); |
160 | priv->psp = __raw_readl(ssp->mmio_base + SSPSP); | 160 | priv->psp = __raw_readl(ssp->mmio_base + SSPSP); |
161 | 161 | ||
162 | ssp_disable(ssp); | 162 | pxa_ssp_disable(ssp); |
163 | clk_disable(ssp->clk); | 163 | clk_disable(ssp->clk); |
164 | return 0; | 164 | return 0; |
165 | } | 165 | } |
@@ -179,7 +179,7 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai) | |||
179 | __raw_writel(priv->psp, ssp->mmio_base + SSPSP); | 179 | __raw_writel(priv->psp, ssp->mmio_base + SSPSP); |
180 | 180 | ||
181 | if (cpu_dai->active) | 181 | if (cpu_dai->active) |
182 | ssp_enable(ssp); | 182 | pxa_ssp_enable(ssp); |
183 | else | 183 | else |
184 | clk_disable(ssp->clk); | 184 | clk_disable(ssp->clk); |
185 | 185 | ||
@@ -195,9 +195,9 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai) | |||
195 | * ssp_set_clkdiv - set SSP clock divider | 195 | * ssp_set_clkdiv - set SSP clock divider |
196 | * @div: serial clock rate divider | 196 | * @div: serial clock rate divider |
197 | */ | 197 | */ |
198 | static void ssp_set_scr(struct ssp_device *ssp, u32 div) | 198 | static void pxa_ssp_set_scr(struct ssp_device *ssp, u32 div) |
199 | { | 199 | { |
200 | u32 sscr0 = ssp_read_reg(ssp, SSCR0); | 200 | u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0); |
201 | 201 | ||
202 | if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) { | 202 | if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) { |
203 | sscr0 &= ~0x0000ff00; | 203 | sscr0 &= ~0x0000ff00; |
@@ -206,15 +206,15 @@ static void ssp_set_scr(struct ssp_device *ssp, u32 div) | |||
206 | sscr0 &= ~0x000fff00; | 206 | sscr0 &= ~0x000fff00; |
207 | sscr0 |= (div - 1) << 8; /* 1..4096 */ | 207 | sscr0 |= (div - 1) << 8; /* 1..4096 */ |
208 | } | 208 | } |
209 | ssp_write_reg(ssp, SSCR0, sscr0); | 209 | pxa_ssp_write_reg(ssp, SSCR0, sscr0); |
210 | } | 210 | } |
211 | 211 | ||
212 | /** | 212 | /** |
213 | * ssp_get_clkdiv - get SSP clock divider | 213 | * pxa_ssp_get_clkdiv - get SSP clock divider |
214 | */ | 214 | */ |
215 | static u32 ssp_get_scr(struct ssp_device *ssp) | 215 | static u32 pxa_ssp_get_scr(struct ssp_device *ssp) |
216 | { | 216 | { |
217 | u32 sscr0 = ssp_read_reg(ssp, SSCR0); | 217 | u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0); |
218 | u32 div; | 218 | u32 div; |
219 | 219 | ||
220 | if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) | 220 | if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) |
@@ -234,7 +234,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai, | |||
234 | struct ssp_device *ssp = priv->ssp; | 234 | struct ssp_device *ssp = priv->ssp; |
235 | int val; | 235 | int val; |
236 | 236 | ||
237 | u32 sscr0 = ssp_read_reg(ssp, SSCR0) & | 237 | u32 sscr0 = pxa_ssp_read_reg(ssp, SSCR0) & |
238 | ~(SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS); | 238 | ~(SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS); |
239 | 239 | ||
240 | dev_dbg(&ssp->pdev->dev, | 240 | dev_dbg(&ssp->pdev->dev, |
@@ -262,7 +262,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai, | |||
262 | break; | 262 | break; |
263 | case PXA_SSP_CLK_AUDIO: | 263 | case PXA_SSP_CLK_AUDIO: |
264 | priv->sysclk = 0; | 264 | priv->sysclk = 0; |
265 | ssp_set_scr(ssp, 1); | 265 | pxa_ssp_set_scr(ssp, 1); |
266 | sscr0 |= SSCR0_ACS; | 266 | sscr0 |= SSCR0_ACS; |
267 | break; | 267 | break; |
268 | default: | 268 | default: |
@@ -273,8 +273,8 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai, | |||
273 | * on PXA2xx. On PXA3xx it must be enabled when doing so. */ | 273 | * on PXA2xx. On PXA3xx it must be enabled when doing so. */ |
274 | if (!cpu_is_pxa3xx()) | 274 | if (!cpu_is_pxa3xx()) |
275 | clk_disable(ssp->clk); | 275 | clk_disable(ssp->clk); |
276 | val = ssp_read_reg(ssp, SSCR0) | sscr0; | 276 | val = pxa_ssp_read_reg(ssp, SSCR0) | sscr0; |
277 | ssp_write_reg(ssp, SSCR0, val); | 277 | pxa_ssp_write_reg(ssp, SSCR0, val); |
278 | if (!cpu_is_pxa3xx()) | 278 | if (!cpu_is_pxa3xx()) |
279 | clk_enable(ssp->clk); | 279 | clk_enable(ssp->clk); |
280 | 280 | ||
@@ -293,11 +293,11 @@ static int pxa_ssp_set_dai_clkdiv(struct snd_soc_dai *cpu_dai, | |||
293 | 293 | ||
294 | switch (div_id) { | 294 | switch (div_id) { |
295 | case PXA_SSP_AUDIO_DIV_ACDS: | 295 | case PXA_SSP_AUDIO_DIV_ACDS: |
296 | val = (ssp_read_reg(ssp, SSACD) & ~0x7) | SSACD_ACDS(div); | 296 | val = (pxa_ssp_read_reg(ssp, SSACD) & ~0x7) | SSACD_ACDS(div); |
297 | ssp_write_reg(ssp, SSACD, val); | 297 | pxa_ssp_write_reg(ssp, SSACD, val); |
298 | break; | 298 | break; |
299 | case PXA_SSP_AUDIO_DIV_SCDB: | 299 | case PXA_SSP_AUDIO_DIV_SCDB: |
300 | val = ssp_read_reg(ssp, SSACD); | 300 | val = pxa_ssp_read_reg(ssp, SSACD); |
301 | val &= ~SSACD_SCDB; | 301 | val &= ~SSACD_SCDB; |
302 | #if defined(CONFIG_PXA3xx) | 302 | #if defined(CONFIG_PXA3xx) |
303 | if (cpu_is_pxa3xx()) | 303 | if (cpu_is_pxa3xx()) |
@@ -320,10 +320,10 @@ static int pxa_ssp_set_dai_clkdiv(struct snd_soc_dai *cpu_dai, | |||
320 | default: | 320 | default: |
321 | return -EINVAL; | 321 | return -EINVAL; |
322 | } | 322 | } |
323 | ssp_write_reg(ssp, SSACD, val); | 323 | pxa_ssp_write_reg(ssp, SSACD, val); |
324 | break; | 324 | break; |
325 | case PXA_SSP_DIV_SCR: | 325 | case PXA_SSP_DIV_SCR: |
326 | ssp_set_scr(ssp, div); | 326 | pxa_ssp_set_scr(ssp, div); |
327 | break; | 327 | break; |
328 | default: | 328 | default: |
329 | return -ENODEV; | 329 | return -ENODEV; |
@@ -340,11 +340,11 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id, | |||
340 | { | 340 | { |
341 | struct ssp_priv *priv = cpu_dai->private_data; | 341 | struct ssp_priv *priv = cpu_dai->private_data; |
342 | struct ssp_device *ssp = priv->ssp; | 342 | struct ssp_device *ssp = priv->ssp; |
343 | u32 ssacd = ssp_read_reg(ssp, SSACD) & ~0x70; | 343 | u32 ssacd = pxa_ssp_read_reg(ssp, SSACD) & ~0x70; |
344 | 344 | ||
345 | #if defined(CONFIG_PXA3xx) | 345 | #if defined(CONFIG_PXA3xx) |
346 | if (cpu_is_pxa3xx()) | 346 | if (cpu_is_pxa3xx()) |
347 | ssp_write_reg(ssp, SSACDD, 0); | 347 | pxa_ssp_write_reg(ssp, SSACDD, 0); |
348 | #endif | 348 | #endif |
349 | 349 | ||
350 | switch (freq_out) { | 350 | switch (freq_out) { |
@@ -382,7 +382,7 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id, | |||
382 | val = tmp; | 382 | val = tmp; |
383 | 383 | ||
384 | val = (val << 16) | 64; | 384 | val = (val << 16) | 64; |
385 | ssp_write_reg(ssp, SSACDD, val); | 385 | pxa_ssp_write_reg(ssp, SSACDD, val); |
386 | 386 | ||
387 | ssacd |= (0x6 << 4); | 387 | ssacd |= (0x6 << 4); |
388 | 388 | ||
@@ -396,7 +396,7 @@ static int pxa_ssp_set_dai_pll(struct snd_soc_dai *cpu_dai, int pll_id, | |||
396 | return -EINVAL; | 396 | return -EINVAL; |
397 | } | 397 | } |
398 | 398 | ||
399 | ssp_write_reg(ssp, SSACD, ssacd); | 399 | pxa_ssp_write_reg(ssp, SSACD, ssacd); |
400 | 400 | ||
401 | return 0; | 401 | return 0; |
402 | } | 402 | } |
@@ -411,7 +411,7 @@ static int pxa_ssp_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai, | |||
411 | struct ssp_device *ssp = priv->ssp; | 411 | struct ssp_device *ssp = priv->ssp; |
412 | u32 sscr0; | 412 | u32 sscr0; |
413 | 413 | ||
414 | sscr0 = ssp_read_reg(ssp, SSCR0); | 414 | sscr0 = pxa_ssp_read_reg(ssp, SSCR0); |
415 | sscr0 &= ~(SSCR0_MOD | SSCR0_SlotsPerFrm(8) | SSCR0_EDSS | SSCR0_DSS); | 415 | sscr0 &= ~(SSCR0_MOD | SSCR0_SlotsPerFrm(8) | SSCR0_EDSS | SSCR0_DSS); |
416 | 416 | ||
417 | /* set slot width */ | 417 | /* set slot width */ |
@@ -428,10 +428,10 @@ static int pxa_ssp_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai, | |||
428 | sscr0 |= SSCR0_SlotsPerFrm(slots); | 428 | sscr0 |= SSCR0_SlotsPerFrm(slots); |
429 | 429 | ||
430 | /* set active slot mask */ | 430 | /* set active slot mask */ |
431 | ssp_write_reg(ssp, SSTSA, tx_mask); | 431 | pxa_ssp_write_reg(ssp, SSTSA, tx_mask); |
432 | ssp_write_reg(ssp, SSRSA, rx_mask); | 432 | pxa_ssp_write_reg(ssp, SSRSA, rx_mask); |
433 | } | 433 | } |
434 | ssp_write_reg(ssp, SSCR0, sscr0); | 434 | pxa_ssp_write_reg(ssp, SSCR0, sscr0); |
435 | 435 | ||
436 | return 0; | 436 | return 0; |
437 | } | 437 | } |
@@ -446,12 +446,12 @@ static int pxa_ssp_set_dai_tristate(struct snd_soc_dai *cpu_dai, | |||
446 | struct ssp_device *ssp = priv->ssp; | 446 | struct ssp_device *ssp = priv->ssp; |
447 | u32 sscr1; | 447 | u32 sscr1; |
448 | 448 | ||
449 | sscr1 = ssp_read_reg(ssp, SSCR1); | 449 | sscr1 = pxa_ssp_read_reg(ssp, SSCR1); |
450 | if (tristate) | 450 | if (tristate) |
451 | sscr1 &= ~SSCR1_TTE; | 451 | sscr1 &= ~SSCR1_TTE; |
452 | else | 452 | else |
453 | sscr1 |= SSCR1_TTE; | 453 | sscr1 |= SSCR1_TTE; |
454 | ssp_write_reg(ssp, SSCR1, sscr1); | 454 | pxa_ssp_write_reg(ssp, SSCR1, sscr1); |
455 | 455 | ||
456 | return 0; | 456 | return 0; |
457 | } | 457 | } |
@@ -475,14 +475,14 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
475 | return 0; | 475 | return 0; |
476 | 476 | ||
477 | /* we can only change the settings if the port is not in use */ | 477 | /* we can only change the settings if the port is not in use */ |
478 | if (ssp_read_reg(ssp, SSCR0) & SSCR0_SSE) { | 478 | if (pxa_ssp_read_reg(ssp, SSCR0) & SSCR0_SSE) { |
479 | dev_err(&ssp->pdev->dev, | 479 | dev_err(&ssp->pdev->dev, |
480 | "can't change hardware dai format: stream is in use"); | 480 | "can't change hardware dai format: stream is in use"); |
481 | return -EINVAL; | 481 | return -EINVAL; |
482 | } | 482 | } |
483 | 483 | ||
484 | /* reset port settings */ | 484 | /* reset port settings */ |
485 | sscr0 = ssp_read_reg(ssp, SSCR0) & | 485 | sscr0 = pxa_ssp_read_reg(ssp, SSCR0) & |
486 | (SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS); | 486 | (SSCR0_ECS | SSCR0_NCS | SSCR0_MOD | SSCR0_ACS); |
487 | sscr1 = SSCR1_RxTresh(8) | SSCR1_TxTresh(7); | 487 | sscr1 = SSCR1_RxTresh(8) | SSCR1_TxTresh(7); |
488 | sspsp = 0; | 488 | sspsp = 0; |
@@ -534,9 +534,9 @@ static int pxa_ssp_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
534 | return -EINVAL; | 534 | return -EINVAL; |
535 | } | 535 | } |
536 | 536 | ||
537 | ssp_write_reg(ssp, SSCR0, sscr0); | 537 | pxa_ssp_write_reg(ssp, SSCR0, sscr0); |
538 | ssp_write_reg(ssp, SSCR1, sscr1); | 538 | pxa_ssp_write_reg(ssp, SSCR1, sscr1); |
539 | ssp_write_reg(ssp, SSPSP, sspsp); | 539 | pxa_ssp_write_reg(ssp, SSPSP, sspsp); |
540 | 540 | ||
541 | dump_registers(ssp); | 541 | dump_registers(ssp); |
542 | 542 | ||
@@ -565,7 +565,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
565 | u32 sscr0; | 565 | u32 sscr0; |
566 | u32 sspsp; | 566 | u32 sspsp; |
567 | int width = snd_pcm_format_physical_width(params_format(params)); | 567 | int width = snd_pcm_format_physical_width(params_format(params)); |
568 | int ttsa = ssp_read_reg(ssp, SSTSA) & 0xf; | 568 | int ttsa = pxa_ssp_read_reg(ssp, SSTSA) & 0xf; |
569 | struct pxa2xx_pcm_dma_params *dma_data; | 569 | struct pxa2xx_pcm_dma_params *dma_data; |
570 | 570 | ||
571 | dma_data = snd_soc_dai_get_dma_data(dai, substream); | 571 | dma_data = snd_soc_dai_get_dma_data(dai, substream); |
@@ -577,22 +577,22 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
577 | * to force 16-bit frame width on the wire (for S16_LE), even | 577 | * to force 16-bit frame width on the wire (for S16_LE), even |
578 | * with two channels. Use 16-bit DMA transfers for this case. | 578 | * with two channels. Use 16-bit DMA transfers for this case. |
579 | */ | 579 | */ |
580 | dma_data = ssp_get_dma_params(ssp, | 580 | dma_data = pxa_ssp_get_dma_params(ssp, |
581 | ((chn == 2) && (ttsa != 1)) || (width == 32), | 581 | ((chn == 2) && (ttsa != 1)) || (width == 32), |
582 | substream->stream == SNDRV_PCM_STREAM_PLAYBACK); | 582 | substream->stream == SNDRV_PCM_STREAM_PLAYBACK); |
583 | 583 | ||
584 | snd_soc_dai_set_dma_data(dai, substream, dma_data); | 584 | snd_soc_dai_set_dma_data(dai, substream, dma_data); |
585 | 585 | ||
586 | /* we can only change the settings if the port is not in use */ | 586 | /* we can only change the settings if the port is not in use */ |
587 | if (ssp_read_reg(ssp, SSCR0) & SSCR0_SSE) | 587 | if (pxa_ssp_read_reg(ssp, SSCR0) & SSCR0_SSE) |
588 | return 0; | 588 | return 0; |
589 | 589 | ||
590 | /* clear selected SSP bits */ | 590 | /* clear selected SSP bits */ |
591 | sscr0 = ssp_read_reg(ssp, SSCR0) & ~(SSCR0_DSS | SSCR0_EDSS); | 591 | sscr0 = pxa_ssp_read_reg(ssp, SSCR0) & ~(SSCR0_DSS | SSCR0_EDSS); |
592 | ssp_write_reg(ssp, SSCR0, sscr0); | 592 | pxa_ssp_write_reg(ssp, SSCR0, sscr0); |
593 | 593 | ||
594 | /* bit size */ | 594 | /* bit size */ |
595 | sscr0 = ssp_read_reg(ssp, SSCR0); | 595 | sscr0 = pxa_ssp_read_reg(ssp, SSCR0); |
596 | switch (params_format(params)) { | 596 | switch (params_format(params)) { |
597 | case SNDRV_PCM_FORMAT_S16_LE: | 597 | case SNDRV_PCM_FORMAT_S16_LE: |
598 | #ifdef CONFIG_PXA3xx | 598 | #ifdef CONFIG_PXA3xx |
@@ -608,13 +608,13 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
608 | sscr0 |= (SSCR0_EDSS | SSCR0_DataSize(16)); | 608 | sscr0 |= (SSCR0_EDSS | SSCR0_DataSize(16)); |
609 | break; | 609 | break; |
610 | } | 610 | } |
611 | ssp_write_reg(ssp, SSCR0, sscr0); | 611 | pxa_ssp_write_reg(ssp, SSCR0, sscr0); |
612 | 612 | ||
613 | switch (priv->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 613 | switch (priv->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) { |
614 | case SND_SOC_DAIFMT_I2S: | 614 | case SND_SOC_DAIFMT_I2S: |
615 | sspsp = ssp_read_reg(ssp, SSPSP); | 615 | sspsp = pxa_ssp_read_reg(ssp, SSPSP); |
616 | 616 | ||
617 | if ((ssp_get_scr(ssp) == 4) && (width == 16)) { | 617 | if ((pxa_ssp_get_scr(ssp) == 4) && (width == 16)) { |
618 | /* This is a special case where the bitclk is 64fs | 618 | /* This is a special case where the bitclk is 64fs |
619 | * and we're not dealing with 2*32 bits of audio | 619 | * and we're not dealing with 2*32 bits of audio |
620 | * samples. | 620 | * samples. |
@@ -648,7 +648,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
648 | sspsp |= SSPSP_DMYSTRT(1); | 648 | sspsp |= SSPSP_DMYSTRT(1); |
649 | } | 649 | } |
650 | 650 | ||
651 | ssp_write_reg(ssp, SSPSP, sspsp); | 651 | pxa_ssp_write_reg(ssp, SSPSP, sspsp); |
652 | break; | 652 | break; |
653 | default: | 653 | default: |
654 | break; | 654 | break; |
@@ -679,45 +679,45 @@ static int pxa_ssp_trigger(struct snd_pcm_substream *substream, int cmd, | |||
679 | 679 | ||
680 | switch (cmd) { | 680 | switch (cmd) { |
681 | case SNDRV_PCM_TRIGGER_RESUME: | 681 | case SNDRV_PCM_TRIGGER_RESUME: |
682 | ssp_enable(ssp); | 682 | pxa_ssp_enable(ssp); |
683 | break; | 683 | break; |
684 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | 684 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: |
685 | val = ssp_read_reg(ssp, SSCR1); | 685 | val = pxa_ssp_read_reg(ssp, SSCR1); |
686 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 686 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
687 | val |= SSCR1_TSRE; | 687 | val |= SSCR1_TSRE; |
688 | else | 688 | else |
689 | val |= SSCR1_RSRE; | 689 | val |= SSCR1_RSRE; |
690 | ssp_write_reg(ssp, SSCR1, val); | 690 | pxa_ssp_write_reg(ssp, SSCR1, val); |
691 | val = ssp_read_reg(ssp, SSSR); | 691 | val = pxa_ssp_read_reg(ssp, SSSR); |
692 | ssp_write_reg(ssp, SSSR, val); | 692 | pxa_ssp_write_reg(ssp, SSSR, val); |
693 | break; | 693 | break; |
694 | case SNDRV_PCM_TRIGGER_START: | 694 | case SNDRV_PCM_TRIGGER_START: |
695 | val = ssp_read_reg(ssp, SSCR1); | 695 | val = pxa_ssp_read_reg(ssp, SSCR1); |
696 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 696 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
697 | val |= SSCR1_TSRE; | 697 | val |= SSCR1_TSRE; |
698 | else | 698 | else |
699 | val |= SSCR1_RSRE; | 699 | val |= SSCR1_RSRE; |
700 | ssp_write_reg(ssp, SSCR1, val); | 700 | pxa_ssp_write_reg(ssp, SSCR1, val); |
701 | ssp_enable(ssp); | 701 | pxa_ssp_enable(ssp); |
702 | break; | 702 | break; |
703 | case SNDRV_PCM_TRIGGER_STOP: | 703 | case SNDRV_PCM_TRIGGER_STOP: |
704 | val = ssp_read_reg(ssp, SSCR1); | 704 | val = pxa_ssp_read_reg(ssp, SSCR1); |
705 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 705 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
706 | val &= ~SSCR1_TSRE; | 706 | val &= ~SSCR1_TSRE; |
707 | else | 707 | else |
708 | val &= ~SSCR1_RSRE; | 708 | val &= ~SSCR1_RSRE; |
709 | ssp_write_reg(ssp, SSCR1, val); | 709 | pxa_ssp_write_reg(ssp, SSCR1, val); |
710 | break; | 710 | break; |
711 | case SNDRV_PCM_TRIGGER_SUSPEND: | 711 | case SNDRV_PCM_TRIGGER_SUSPEND: |
712 | ssp_disable(ssp); | 712 | pxa_ssp_disable(ssp); |
713 | break; | 713 | break; |
714 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 714 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
715 | val = ssp_read_reg(ssp, SSCR1); | 715 | val = pxa_ssp_read_reg(ssp, SSCR1); |
716 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 716 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
717 | val &= ~SSCR1_TSRE; | 717 | val &= ~SSCR1_TSRE; |
718 | else | 718 | else |
719 | val &= ~SSCR1_RSRE; | 719 | val &= ~SSCR1_RSRE; |
720 | ssp_write_reg(ssp, SSCR1, val); | 720 | pxa_ssp_write_reg(ssp, SSCR1, val); |
721 | break; | 721 | break; |
722 | 722 | ||
723 | default: | 723 | default: |
@@ -739,7 +739,7 @@ static int pxa_ssp_probe(struct platform_device *pdev, | |||
739 | if (!priv) | 739 | if (!priv) |
740 | return -ENOMEM; | 740 | return -ENOMEM; |
741 | 741 | ||
742 | priv->ssp = ssp_request(dai->id + 1, "SoC audio"); | 742 | priv->ssp = pxa_ssp_request(dai->id + 1, "SoC audio"); |
743 | if (priv->ssp == NULL) { | 743 | if (priv->ssp == NULL) { |
744 | ret = -ENODEV; | 744 | ret = -ENODEV; |
745 | goto err_priv; | 745 | goto err_priv; |
@@ -759,7 +759,7 @@ static void pxa_ssp_remove(struct platform_device *pdev, | |||
759 | struct snd_soc_dai *dai) | 759 | struct snd_soc_dai *dai) |
760 | { | 760 | { |
761 | struct ssp_priv *priv = dai->private_data; | 761 | struct ssp_priv *priv = dai->private_data; |
762 | ssp_free(priv->ssp); | 762 | pxa_ssp_free(priv->ssp); |
763 | } | 763 | } |
764 | 764 | ||
765 | #define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ | 765 | #define PXA_SSP_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ |
diff --git a/sound/soc/s6000/s6000-i2s.c b/sound/soc/s6000/s6000-i2s.c index fa23854c5f3a..5b9ac1759bd2 100644 --- a/sound/soc/s6000/s6000-i2s.c +++ b/sound/soc/s6000/s6000-i2s.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
21 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index baddb1242c71..0d8bdf07729c 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/gfp.h> | ||
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/dma-mapping.h> | 19 | #include <linux/dma-mapping.h> |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index f14bbb0410c1..3396a0db06ba 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/pm_runtime.h> | 20 | #include <linux/pm_runtime.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/slab.h> | ||
22 | #include <sound/core.h> | 23 | #include <sound/core.h> |
23 | #include <sound/pcm.h> | 24 | #include <sound/pcm.h> |
24 | #include <sound/initval.h> | 25 | #include <sound/initval.h> |
diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c index c86c0858d6e2..eeed5edd722b 100644 --- a/sound/soc/sh/siu_dai.c +++ b/sound/soc/sh/siu_dai.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/firmware.h> | 23 | #include <linux/firmware.h> |
24 | #include <linux/pm_runtime.h> | 24 | #include <linux/pm_runtime.h> |
25 | #include <linux/slab.h> | ||
25 | 26 | ||
26 | #include <asm/clock.h> | 27 | #include <asm/clock.h> |
27 | #include <asm/siu.h> | 28 | #include <asm/siu.h> |
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index ba7f8d05d977..8f85719212f9 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/slab.h> | ||
28 | 27 | ||
29 | #include <sound/control.h> | 28 | #include <sound/control.h> |
30 | #include <sound/core.h> | 29 | #include <sound/core.h> |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e1043f644730..998569d60330 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | #include <linux/debugfs.h> | 29 | #include <linux/debugfs.h> |
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/slab.h> | ||
31 | #include <sound/ac97_codec.h> | 32 | #include <sound/ac97_codec.h> |
32 | #include <sound/core.h> | 33 | #include <sound/core.h> |
33 | #include <sound/pcm.h> | 34 | #include <sound/pcm.h> |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index fefb6c44fc81..03cb7c05ebec 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/platform_device.h> | 38 | #include <linux/platform_device.h> |
39 | #include <linux/jiffies.h> | 39 | #include <linux/jiffies.h> |
40 | #include <linux/debugfs.h> | 40 | #include <linux/debugfs.h> |
41 | #include <linux/slab.h> | ||
41 | #include <sound/core.h> | 42 | #include <sound/core.h> |
42 | #include <sound/pcm.h> | 43 | #include <sound/pcm.h> |
43 | #include <sound/pcm_params.h> | 44 | #include <sound/pcm_params.h> |
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c index 0f83bdb9b16f..0ec20b68e8cb 100644 --- a/sound/soc/txx9/txx9aclc-ac97.c +++ b/sound/soc/txx9/txx9aclc-ac97.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/gfp.h> | ||
19 | #include <sound/core.h> | 20 | #include <sound/core.h> |
20 | #include <sound/pcm.h> | 21 | #include <sound/pcm.h> |
21 | #include <sound/soc.h> | 22 | #include <sound/soc.h> |
@@ -253,3 +254,4 @@ module_exit(txx9aclc_ac97_exit); | |||
253 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); | 254 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); |
254 | MODULE_DESCRIPTION("TXx9 ACLC AC97 driver"); | 255 | MODULE_DESCRIPTION("TXx9 ACLC AC97 driver"); |
255 | MODULE_LICENSE("GPL"); | 256 | MODULE_LICENSE("GPL"); |
257 | MODULE_ALIAS("platform:txx9aclc-ac97"); | ||
diff --git a/sound/soc/txx9/txx9aclc-generic.c b/sound/soc/txx9/txx9aclc-generic.c index 3175de9a92cb..95b17f731aec 100644 --- a/sound/soc/txx9/txx9aclc-generic.c +++ b/sound/soc/txx9/txx9aclc-generic.c | |||
@@ -96,3 +96,4 @@ module_exit(txx9aclc_generic_exit); | |||
96 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); | 96 | MODULE_AUTHOR("Atsushi Nemoto <anemo@mba.ocn.ne.jp>"); |
97 | MODULE_DESCRIPTION("Generic TXx9 ACLC ALSA SoC audio driver"); | 97 | MODULE_DESCRIPTION("Generic TXx9 ACLC ALSA SoC audio driver"); |
98 | MODULE_LICENSE("GPL"); | 98 | MODULE_LICENSE("GPL"); |
99 | MODULE_ALIAS("platform:txx9aclc-generic"); | ||
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c index efed64b8b026..49cc7ea9a518 100644 --- a/sound/soc/txx9/txx9aclc.c +++ b/sound/soc/txx9/txx9aclc.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/scatterlist.h> | 17 | #include <linux/scatterlist.h> |
18 | #include <linux/slab.h> | ||
18 | #include <sound/core.h> | 19 | #include <sound/core.h> |
19 | #include <sound/pcm.h> | 20 | #include <sound/pcm.h> |
20 | #include <sound/pcm_params.h> | 21 | #include <sound/pcm_params.h> |