diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-10-17 08:09:15 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-10-17 08:09:15 -0400 |
commit | c95d947f1fc91712756bc1b6a58c0eddadc78885 (patch) | |
tree | 39eb37698adc5b634a88367d45a3e2889c737b62 /sound | |
parent | 71aa5ebe36a4e936eff281b375a4707b6a8320f2 (diff) | |
parent | 9233ef6b559faa3db14144f41dea2e70d1ad0092 (diff) |
Merge tag 'asoc-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.7
Nothing too exciting except for the ams-delta change which is relatively
lerge due to the fact that the driver loading had been totally broken as
the driver needed a newer API to function.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/Makefile | 5 | ||||
-rw-r--r-- | sound/soc/codecs/da9055.c | 22 | ||||
-rw-r--r-- | sound/soc/codecs/twl6040.c | 8 | ||||
-rw-r--r-- | sound/soc/codecs/wm2200.c | 3 | ||||
-rw-r--r-- | sound/soc/omap/ams-delta.c | 63 | ||||
-rw-r--r-- | sound/soc/omap/omap-abe-twl6040.c | 2 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcpdm.c | 9 | ||||
-rw-r--r-- | sound/soc/pxa/mmp-pcm.c | 2 | ||||
-rw-r--r-- | sound/soc/samsung/bells.c | 4 | ||||
-rw-r--r-- | sound/soc/sh/fsi.c | 15 | ||||
-rw-r--r-- | sound/soc/soc-jack.c | 7 |
11 files changed, 78 insertions, 62 deletions
diff --git a/sound/soc/Makefile b/sound/soc/Makefile index bcbf1d00aa85..99f32f7c0692 100644 --- a/sound/soc/Makefile +++ b/sound/soc/Makefile | |||
@@ -1,8 +1,9 @@ | |||
1 | snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o | 1 | snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o |
2 | snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o | 2 | snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o |
3 | 3 | ||
4 | snd-soc-dmaengine-pcm-objs := soc-dmaengine-pcm.o | 4 | ifneq ($(CONFIG_SND_SOC_DMAENGINE_PCM),) |
5 | obj-$(CONFIG_SND_SOC_DMAENGINE_PCM) += snd-soc-dmaengine-pcm.o | 5 | snd-soc-core-objs += soc-dmaengine-pcm.o |
6 | endif | ||
6 | 7 | ||
7 | obj-$(CONFIG_SND_SOC) += snd-soc-core.o | 8 | obj-$(CONFIG_SND_SOC) += snd-soc-core.o |
8 | obj-$(CONFIG_SND_SOC) += codecs/ | 9 | obj-$(CONFIG_SND_SOC) += codecs/ |
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c index 185d8dd36399..f379b085c392 100644 --- a/sound/soc/codecs/da9055.c +++ b/sound/soc/codecs/da9055.c | |||
@@ -178,6 +178,12 @@ | |||
178 | #define DA9055_AIF_WORD_S24_LE (2 << 2) | 178 | #define DA9055_AIF_WORD_S24_LE (2 << 2) |
179 | #define DA9055_AIF_WORD_S32_LE (3 << 2) | 179 | #define DA9055_AIF_WORD_S32_LE (3 << 2) |
180 | 180 | ||
181 | /* MIC_L_CTRL bit fields */ | ||
182 | #define DA9055_MIC_L_MUTE_EN (1 << 6) | ||
183 | |||
184 | /* MIC_R_CTRL bit fields */ | ||
185 | #define DA9055_MIC_R_MUTE_EN (1 << 6) | ||
186 | |||
181 | /* MIXIN_L_CTRL bit fields */ | 187 | /* MIXIN_L_CTRL bit fields */ |
182 | #define DA9055_MIXIN_L_MIX_EN (1 << 3) | 188 | #define DA9055_MIXIN_L_MIX_EN (1 << 3) |
183 | 189 | ||
@@ -476,7 +482,7 @@ static int da9055_put_alc_sw(struct snd_kcontrol *kcontrol, | |||
476 | struct snd_ctl_elem_value *ucontrol) | 482 | struct snd_ctl_elem_value *ucontrol) |
477 | { | 483 | { |
478 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 484 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
479 | u8 reg_val, adc_left, adc_right; | 485 | u8 reg_val, adc_left, adc_right, mic_left, mic_right; |
480 | int avg_left_data, avg_right_data, offset_l, offset_r; | 486 | int avg_left_data, avg_right_data, offset_l, offset_r; |
481 | 487 | ||
482 | if (ucontrol->value.integer.value[0]) { | 488 | if (ucontrol->value.integer.value[0]) { |
@@ -485,6 +491,16 @@ static int da9055_put_alc_sw(struct snd_kcontrol *kcontrol, | |||
485 | * offsets must be done first | 491 | * offsets must be done first |
486 | */ | 492 | */ |
487 | 493 | ||
494 | /* Save current values from Mic control registers */ | ||
495 | mic_left = snd_soc_read(codec, DA9055_MIC_L_CTRL); | ||
496 | mic_right = snd_soc_read(codec, DA9055_MIC_R_CTRL); | ||
497 | |||
498 | /* Mute Mic PGA Left and Right */ | ||
499 | snd_soc_update_bits(codec, DA9055_MIC_L_CTRL, | ||
500 | DA9055_MIC_L_MUTE_EN, DA9055_MIC_L_MUTE_EN); | ||
501 | snd_soc_update_bits(codec, DA9055_MIC_R_CTRL, | ||
502 | DA9055_MIC_R_MUTE_EN, DA9055_MIC_R_MUTE_EN); | ||
503 | |||
488 | /* Save current values from ADC control registers */ | 504 | /* Save current values from ADC control registers */ |
489 | adc_left = snd_soc_read(codec, DA9055_ADC_L_CTRL); | 505 | adc_left = snd_soc_read(codec, DA9055_ADC_L_CTRL); |
490 | adc_right = snd_soc_read(codec, DA9055_ADC_R_CTRL); | 506 | adc_right = snd_soc_read(codec, DA9055_ADC_R_CTRL); |
@@ -520,6 +536,10 @@ static int da9055_put_alc_sw(struct snd_kcontrol *kcontrol, | |||
520 | /* Restore original values of ADC control registers */ | 536 | /* Restore original values of ADC control registers */ |
521 | snd_soc_write(codec, DA9055_ADC_L_CTRL, adc_left); | 537 | snd_soc_write(codec, DA9055_ADC_L_CTRL, adc_left); |
522 | snd_soc_write(codec, DA9055_ADC_R_CTRL, adc_right); | 538 | snd_soc_write(codec, DA9055_ADC_R_CTRL, adc_right); |
539 | |||
540 | /* Restore original values of Mic control registers */ | ||
541 | snd_soc_write(codec, DA9055_MIC_L_CTRL, mic_left); | ||
542 | snd_soc_write(codec, DA9055_MIC_R_CTRL, mic_right); | ||
523 | } | 543 | } |
524 | 544 | ||
525 | return snd_soc_put_volsw(kcontrol, ucontrol); | 545 | return snd_soc_put_volsw(kcontrol, ucontrol); |
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index e8f97af75928..00b85cc1b9a3 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -820,10 +820,10 @@ static const struct snd_soc_dapm_route intercon[] = { | |||
820 | {"VIBRA DAC", NULL, "Vibra Playback"}, | 820 | {"VIBRA DAC", NULL, "Vibra Playback"}, |
821 | 821 | ||
822 | /* ADC -> Stream mapping */ | 822 | /* ADC -> Stream mapping */ |
823 | {"ADC Left", NULL, "Legacy Capture"}, | 823 | {"Legacy Capture" , NULL, "ADC Left"}, |
824 | {"ADC Left", NULL, "Capture"}, | 824 | {"Capture", NULL, "ADC Left"}, |
825 | {"ADC Right", NULL, "Legacy Capture"}, | 825 | {"Legacy Capture", NULL, "ADC Right"}, |
826 | {"ADC Right", NULL, "Capture"}, | 826 | {"Capture" , NULL, "ADC Right"}, |
827 | 827 | ||
828 | /* Capture path */ | 828 | /* Capture path */ |
829 | {"Analog Left Capture Route", "Headset Mic", "HSMIC"}, | 829 | {"Analog Left Capture Route", "Headset Mic", "HSMIC"}, |
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index efa93dbb0191..eab64a193989 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c | |||
@@ -1028,7 +1028,7 @@ SOC_DOUBLE_R_TLV("OUT2 Digital Volume", WM2200_DAC_DIGITAL_VOLUME_2L, | |||
1028 | WM2200_DAC_DIGITAL_VOLUME_2R, WM2200_OUT2L_VOL_SHIFT, 0x9f, 0, | 1028 | WM2200_DAC_DIGITAL_VOLUME_2R, WM2200_OUT2L_VOL_SHIFT, 0x9f, 0, |
1029 | digital_tlv), | 1029 | digital_tlv), |
1030 | SOC_DOUBLE("OUT2 Switch", WM2200_PDM_1, WM2200_SPK1L_MUTE_SHIFT, | 1030 | SOC_DOUBLE("OUT2 Switch", WM2200_PDM_1, WM2200_SPK1L_MUTE_SHIFT, |
1031 | WM2200_SPK1R_MUTE_SHIFT, 1, 0), | 1031 | WM2200_SPK1R_MUTE_SHIFT, 1, 1), |
1032 | }; | 1032 | }; |
1033 | 1033 | ||
1034 | WM2200_MIXER_ENUMS(OUT1L, WM2200_OUT1LMIX_INPUT_1_SOURCE); | 1034 | WM2200_MIXER_ENUMS(OUT1L, WM2200_OUT1LMIX_INPUT_1_SOURCE); |
@@ -2091,6 +2091,7 @@ static __devinit int wm2200_i2c_probe(struct i2c_client *i2c, | |||
2091 | 2091 | ||
2092 | switch (wm2200->rev) { | 2092 | switch (wm2200->rev) { |
2093 | case 0: | 2093 | case 0: |
2094 | case 1: | ||
2094 | ret = regmap_register_patch(wm2200->regmap, wm2200_reva_patch, | 2095 | ret = regmap_register_patch(wm2200->regmap, wm2200_reva_patch, |
2095 | ARRAY_SIZE(wm2200_reva_patch)); | 2096 | ARRAY_SIZE(wm2200_reva_patch)); |
2096 | if (ret != 0) { | 2097 | if (ret != 0) { |
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c index dc0ee7626626..d8e96b2cd03e 100644 --- a/sound/soc/omap/ams-delta.c +++ b/sound/soc/omap/ams-delta.c | |||
@@ -575,56 +575,53 @@ static struct snd_soc_card ams_delta_audio_card = { | |||
575 | }; | 575 | }; |
576 | 576 | ||
577 | /* Module init/exit */ | 577 | /* Module init/exit */ |
578 | static struct platform_device *ams_delta_audio_platform_device; | 578 | static __devinit int ams_delta_probe(struct platform_device *pdev) |
579 | static struct platform_device *cx20442_platform_device; | ||
580 | |||
581 | static int __init ams_delta_module_init(void) | ||
582 | { | 579 | { |
580 | struct snd_soc_card *card = &ams_delta_audio_card; | ||
583 | int ret; | 581 | int ret; |
584 | 582 | ||
585 | if (!(machine_is_ams_delta())) | 583 | card->dev = &pdev->dev; |
586 | return -ENODEV; | ||
587 | |||
588 | ams_delta_audio_platform_device = | ||
589 | platform_device_alloc("soc-audio", -1); | ||
590 | if (!ams_delta_audio_platform_device) | ||
591 | return -ENOMEM; | ||
592 | 584 | ||
593 | platform_set_drvdata(ams_delta_audio_platform_device, | 585 | ret = snd_soc_register_card(card); |
594 | &ams_delta_audio_card); | 586 | if (ret) { |
595 | 587 | dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); | |
596 | ret = platform_device_add(ams_delta_audio_platform_device); | 588 | card->dev = NULL; |
597 | if (ret) | 589 | return ret; |
598 | goto err; | 590 | } |
599 | |||
600 | /* | ||
601 | * Codec platform device could be registered from elsewhere (board?), | ||
602 | * but I do it here as it makes sense only if used with the card. | ||
603 | */ | ||
604 | cx20442_platform_device = | ||
605 | platform_device_register_simple("cx20442-codec", -1, NULL, 0); | ||
606 | return 0; | 591 | return 0; |
607 | err: | ||
608 | platform_device_put(ams_delta_audio_platform_device); | ||
609 | return ret; | ||
610 | } | 592 | } |
611 | late_initcall(ams_delta_module_init); | ||
612 | 593 | ||
613 | static void __exit ams_delta_module_exit(void) | 594 | static int __devexit ams_delta_remove(struct platform_device *pdev) |
614 | { | 595 | { |
596 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
597 | |||
615 | if (tty_unregister_ldisc(N_V253) != 0) | 598 | if (tty_unregister_ldisc(N_V253) != 0) |
616 | dev_warn(&ams_delta_audio_platform_device->dev, | 599 | dev_warn(&pdev->dev, |
617 | "failed to unregister V253 line discipline\n"); | 600 | "failed to unregister V253 line discipline\n"); |
618 | 601 | ||
619 | snd_soc_jack_free_gpios(&ams_delta_hook_switch, | 602 | snd_soc_jack_free_gpios(&ams_delta_hook_switch, |
620 | ARRAY_SIZE(ams_delta_hook_switch_gpios), | 603 | ARRAY_SIZE(ams_delta_hook_switch_gpios), |
621 | ams_delta_hook_switch_gpios); | 604 | ams_delta_hook_switch_gpios); |
622 | 605 | ||
623 | platform_device_unregister(cx20442_platform_device); | 606 | snd_soc_unregister_card(card); |
624 | platform_device_unregister(ams_delta_audio_platform_device); | 607 | card->dev = NULL; |
608 | return 0; | ||
625 | } | 609 | } |
626 | module_exit(ams_delta_module_exit); | 610 | |
611 | #define DRV_NAME "ams-delta-audio" | ||
612 | |||
613 | static struct platform_driver ams_delta_driver = { | ||
614 | .driver = { | ||
615 | .name = DRV_NAME, | ||
616 | .owner = THIS_MODULE, | ||
617 | }, | ||
618 | .probe = ams_delta_probe, | ||
619 | .remove = __devexit_p(ams_delta_remove), | ||
620 | }; | ||
621 | |||
622 | module_platform_driver(ams_delta_driver); | ||
627 | 623 | ||
628 | MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>"); | 624 | MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>"); |
629 | MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone"); | 625 | MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone"); |
630 | MODULE_LICENSE("GPL"); | 626 | MODULE_LICENSE("GPL"); |
627 | MODULE_ALIAS("platform:" DRV_NAME); | ||
diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c index 4a73ef3ae12f..a57a4e68dcc6 100644 --- a/sound/soc/omap/omap-abe-twl6040.c +++ b/sound/soc/omap/omap-abe-twl6040.c | |||
@@ -216,7 +216,7 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd) | |||
216 | twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk"); | 216 | twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk"); |
217 | twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk"); | 217 | twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk"); |
218 | twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out"); | 218 | twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out"); |
219 | twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vinrator"); | 219 | twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vibrator"); |
220 | twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic"); | 220 | twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic"); |
221 | twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic"); | 221 | twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic"); |
222 | twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic"); | 222 | twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic"); |
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index c02b001ee4b5..56965bb3275c 100644 --- a/sound/soc/omap/omap-mcpdm.c +++ b/sound/soc/omap/omap-mcpdm.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <sound/pcm_params.h> | 40 | #include <sound/pcm_params.h> |
41 | #include <sound/soc.h> | 41 | #include <sound/soc.h> |
42 | 42 | ||
43 | #include <plat/omap_hwmod.h> | ||
44 | #include "omap-mcpdm.h" | 43 | #include "omap-mcpdm.h" |
45 | #include "omap-pcm.h" | 44 | #include "omap-pcm.h" |
46 | 45 | ||
@@ -260,13 +259,9 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream, | |||
260 | mutex_lock(&mcpdm->mutex); | 259 | mutex_lock(&mcpdm->mutex); |
261 | 260 | ||
262 | if (!dai->active) { | 261 | if (!dai->active) { |
263 | /* Enable watch dog for ES above ES 1.0 to avoid saturation */ | 262 | u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL); |
264 | if (omap_rev() != OMAP4430_REV_ES1_0) { | ||
265 | u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL); | ||
266 | 263 | ||
267 | omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, | 264 | omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, ctrl | MCPDM_WD_EN); |
268 | ctrl | MCPDM_WD_EN); | ||
269 | } | ||
270 | omap_mcpdm_open_streams(mcpdm); | 265 | omap_mcpdm_open_streams(mcpdm); |
271 | } | 266 | } |
272 | mutex_unlock(&mcpdm->mutex); | 267 | mutex_unlock(&mcpdm->mutex); |
diff --git a/sound/soc/pxa/mmp-pcm.c b/sound/soc/pxa/mmp-pcm.c index 73ac5463c9e4..e834faf859fd 100644 --- a/sound/soc/pxa/mmp-pcm.c +++ b/sound/soc/pxa/mmp-pcm.c | |||
@@ -15,13 +15,13 @@ | |||
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/dma-mapping.h> | 16 | #include <linux/dma-mapping.h> |
17 | #include <linux/dmaengine.h> | 17 | #include <linux/dmaengine.h> |
18 | #include <linux/platform_data/dma-mmp_tdma.h> | ||
18 | #include <linux/platform_data/mmp_audio.h> | 19 | #include <linux/platform_data/mmp_audio.h> |
19 | #include <sound/pxa2xx-lib.h> | 20 | #include <sound/pxa2xx-lib.h> |
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
21 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
22 | #include <sound/pcm_params.h> | 23 | #include <sound/pcm_params.h> |
23 | #include <sound/soc.h> | 24 | #include <sound/soc.h> |
24 | #include <mach/sram.h> | ||
25 | #include <sound/dmaengine_pcm.h> | 25 | #include <sound/dmaengine_pcm.h> |
26 | 26 | ||
27 | struct mmp_dma_data { | 27 | struct mmp_dma_data { |
diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c index 5dc10dfc0d42..b0d46d63d55e 100644 --- a/sound/soc/samsung/bells.c +++ b/sound/soc/samsung/bells.c | |||
@@ -212,7 +212,7 @@ static struct snd_soc_dai_link bells_dai_wm5102[] = { | |||
212 | { | 212 | { |
213 | .name = "Sub", | 213 | .name = "Sub", |
214 | .stream_name = "Sub", | 214 | .stream_name = "Sub", |
215 | .cpu_dai_name = "wm5102-aif3", | 215 | .cpu_dai_name = "wm5110-aif3", |
216 | .codec_dai_name = "wm9081-hifi", | 216 | .codec_dai_name = "wm9081-hifi", |
217 | .codec_name = "wm9081.1-006c", | 217 | .codec_name = "wm9081.1-006c", |
218 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 218 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
@@ -247,7 +247,7 @@ static struct snd_soc_dai_link bells_dai_wm5110[] = { | |||
247 | { | 247 | { |
248 | .name = "Sub", | 248 | .name = "Sub", |
249 | .stream_name = "Sub", | 249 | .stream_name = "Sub", |
250 | .cpu_dai_name = "wm5102-aif3", | 250 | .cpu_dai_name = "wm5110-aif3", |
251 | .codec_dai_name = "wm9081-hifi", | 251 | .codec_dai_name = "wm9081-hifi", |
252 | .codec_name = "wm9081.1-006c", | 252 | .codec_name = "wm9081.1-006c", |
253 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 253 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 5328ae5539f1..9d7f30774a44 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/sh_dma.h> | 20 | #include <linux/sh_dma.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/workqueue.h> | ||
23 | #include <sound/soc.h> | 24 | #include <sound/soc.h> |
24 | #include <sound/sh_fsi.h> | 25 | #include <sound/sh_fsi.h> |
25 | 26 | ||
@@ -223,7 +224,7 @@ struct fsi_stream { | |||
223 | */ | 224 | */ |
224 | struct dma_chan *chan; | 225 | struct dma_chan *chan; |
225 | struct sh_dmae_slave slave; /* see fsi_handler_init() */ | 226 | struct sh_dmae_slave slave; /* see fsi_handler_init() */ |
226 | struct tasklet_struct tasklet; | 227 | struct work_struct work; |
227 | dma_addr_t dma; | 228 | dma_addr_t dma; |
228 | }; | 229 | }; |
229 | 230 | ||
@@ -1085,9 +1086,9 @@ static void fsi_dma_complete(void *data) | |||
1085 | snd_pcm_period_elapsed(io->substream); | 1086 | snd_pcm_period_elapsed(io->substream); |
1086 | } | 1087 | } |
1087 | 1088 | ||
1088 | static void fsi_dma_do_tasklet(unsigned long data) | 1089 | static void fsi_dma_do_work(struct work_struct *work) |
1089 | { | 1090 | { |
1090 | struct fsi_stream *io = (struct fsi_stream *)data; | 1091 | struct fsi_stream *io = container_of(work, struct fsi_stream, work); |
1091 | struct fsi_priv *fsi = fsi_stream_to_priv(io); | 1092 | struct fsi_priv *fsi = fsi_stream_to_priv(io); |
1092 | struct snd_soc_dai *dai; | 1093 | struct snd_soc_dai *dai; |
1093 | struct dma_async_tx_descriptor *desc; | 1094 | struct dma_async_tx_descriptor *desc; |
@@ -1129,7 +1130,7 @@ static void fsi_dma_do_tasklet(unsigned long data) | |||
1129 | * FIXME | 1130 | * FIXME |
1130 | * | 1131 | * |
1131 | * In DMAEngine case, codec and FSI cannot be started simultaneously | 1132 | * In DMAEngine case, codec and FSI cannot be started simultaneously |
1132 | * since FSI is using tasklet. | 1133 | * since FSI is using the scheduler work queue. |
1133 | * Therefore, in capture case, probably FSI FIFO will have got | 1134 | * Therefore, in capture case, probably FSI FIFO will have got |
1134 | * overflow error in this point. | 1135 | * overflow error in this point. |
1135 | * in that case, DMA cannot start transfer until error was cleared. | 1136 | * in that case, DMA cannot start transfer until error was cleared. |
@@ -1153,7 +1154,7 @@ static bool fsi_dma_filter(struct dma_chan *chan, void *param) | |||
1153 | 1154 | ||
1154 | static int fsi_dma_transfer(struct fsi_priv *fsi, struct fsi_stream *io) | 1155 | static int fsi_dma_transfer(struct fsi_priv *fsi, struct fsi_stream *io) |
1155 | { | 1156 | { |
1156 | tasklet_schedule(&io->tasklet); | 1157 | schedule_work(&io->work); |
1157 | 1158 | ||
1158 | return 0; | 1159 | return 0; |
1159 | } | 1160 | } |
@@ -1195,14 +1196,14 @@ static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct dev | |||
1195 | return fsi_stream_probe(fsi, dev); | 1196 | return fsi_stream_probe(fsi, dev); |
1196 | } | 1197 | } |
1197 | 1198 | ||
1198 | tasklet_init(&io->tasklet, fsi_dma_do_tasklet, (unsigned long)io); | 1199 | INIT_WORK(&io->work, fsi_dma_do_work); |
1199 | 1200 | ||
1200 | return 0; | 1201 | return 0; |
1201 | } | 1202 | } |
1202 | 1203 | ||
1203 | static int fsi_dma_remove(struct fsi_priv *fsi, struct fsi_stream *io) | 1204 | static int fsi_dma_remove(struct fsi_priv *fsi, struct fsi_stream *io) |
1204 | { | 1205 | { |
1205 | tasklet_kill(&io->tasklet); | 1206 | cancel_work_sync(&io->work); |
1206 | 1207 | ||
1207 | fsi_stream_stop(fsi, io); | 1208 | fsi_stream_stop(fsi, io); |
1208 | 1209 | ||
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index fa0fd8ddae90..1ab5fe04bfcc 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | /** | 23 | /** |
24 | * snd_soc_jack_new - Create a new jack | 24 | * snd_soc_jack_new - Create a new jack |
25 | * @card: ASoC card | 25 | * @codec: ASoC codec |
26 | * @id: an identifying string for this jack | 26 | * @id: an identifying string for this jack |
27 | * @type: a bitmask of enum snd_jack_type values that can be detected by | 27 | * @type: a bitmask of enum snd_jack_type values that can be detected by |
28 | * this jack | 28 | * this jack |
@@ -133,12 +133,13 @@ EXPORT_SYMBOL_GPL(snd_soc_jack_add_zones); | |||
133 | 133 | ||
134 | /** | 134 | /** |
135 | * snd_soc_jack_get_type - Based on the mic bias value, this function returns | 135 | * snd_soc_jack_get_type - Based on the mic bias value, this function returns |
136 | * the type of jack from the zones delcared in the jack type | 136 | * the type of jack from the zones declared in the jack type |
137 | * | 137 | * |
138 | * @jack: ASoC jack | ||
138 | * @micbias_voltage: mic bias voltage at adc channel when jack is plugged in | 139 | * @micbias_voltage: mic bias voltage at adc channel when jack is plugged in |
139 | * | 140 | * |
140 | * Based on the mic bias value passed, this function helps identify | 141 | * Based on the mic bias value passed, this function helps identify |
141 | * the type of jack from the already delcared jack zones | 142 | * the type of jack from the already declared jack zones |
142 | */ | 143 | */ |
143 | int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage) | 144 | int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage) |
144 | { | 145 | { |