diff options
| -rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 12 | ||||
| -rw-r--r-- | sound/pci/ac97/ac97_codec.c | 2 | ||||
| -rw-r--r-- | sound/pci/emu10k1/emu10k1_main.c | 9 | ||||
| -rw-r--r-- | sound/pci/hda/hda_intel.c | 42 | ||||
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 4 | ||||
| -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 |
16 files changed, 130 insertions, 79 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 9518bf5996dc..e255164ff087 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
| @@ -444,16 +444,28 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = { | |||
| 444 | .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ | 444 | .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ |
| 445 | }; | 445 | }; |
| 446 | 446 | ||
| 447 | static struct platform_device ams_delta_audio_device = { | ||
| 448 | .name = "ams-delta-audio", | ||
| 449 | .id = -1, | ||
| 450 | }; | ||
| 451 | |||
| 452 | static struct platform_device cx20442_codec_device = { | ||
| 453 | .name = "cx20442-codec", | ||
| 454 | .id = -1, | ||
| 455 | }; | ||
| 456 | |||
| 447 | static struct platform_device *ams_delta_devices[] __initdata = { | 457 | static struct platform_device *ams_delta_devices[] __initdata = { |
| 448 | &latch1_gpio_device, | 458 | &latch1_gpio_device, |
| 449 | &latch2_gpio_device, | 459 | &latch2_gpio_device, |
| 450 | &ams_delta_kp_device, | 460 | &ams_delta_kp_device, |
| 451 | &ams_delta_camera_device, | 461 | &ams_delta_camera_device, |
| 462 | &ams_delta_audio_device, | ||
| 452 | }; | 463 | }; |
| 453 | 464 | ||
| 454 | static struct platform_device *late_devices[] __initdata = { | 465 | static struct platform_device *late_devices[] __initdata = { |
| 455 | &ams_delta_nand_device, | 466 | &ams_delta_nand_device, |
| 456 | &ams_delta_lcd_device, | 467 | &ams_delta_lcd_device, |
| 468 | &cx20442_codec_device, | ||
| 457 | }; | 469 | }; |
| 458 | 470 | ||
| 459 | static void __init ams_delta_init(void) | 471 | static void __init ams_delta_init(void) |
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 9473fca9681d..8b0f99688303 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
| @@ -1271,6 +1271,8 @@ static int snd_ac97_cvol_new(struct snd_card *card, char *name, int reg, unsigne | |||
| 1271 | tmp.index = ac97->num; | 1271 | tmp.index = ac97->num; |
| 1272 | kctl = snd_ctl_new1(&tmp, ac97); | 1272 | kctl = snd_ctl_new1(&tmp, ac97); |
| 1273 | } | 1273 | } |
| 1274 | if (!kctl) | ||
| 1275 | return -ENOMEM; | ||
| 1274 | if (reg >= AC97_PHONE && reg <= AC97_PCM) | 1276 | if (reg >= AC97_PHONE && reg <= AC97_PCM) |
| 1275 | set_tlv_db_scale(kctl, db_scale_5bit_12db_max); | 1277 | set_tlv_db_scale(kctl, db_scale_5bit_12db_max); |
| 1276 | else | 1278 | else |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index bed4485f34f6..c21adb6ef1d5 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
| @@ -1416,6 +1416,15 @@ static struct snd_emu_chip_details emu_chip_details[] = { | |||
| 1416 | .ca0108_chip = 1, | 1416 | .ca0108_chip = 1, |
| 1417 | .spk71 = 1, | 1417 | .spk71 = 1, |
| 1418 | .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 new revision */ | 1418 | .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 new revision */ |
| 1419 | /* Tested by Maxim Kachur <mcdebugger@duganet.ru> 17th Oct 2012. */ | ||
| 1420 | /* This is MAEM8986, 0202 is MAEM8980 */ | ||
| 1421 | {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40071102, | ||
| 1422 | .driver = "Audigy2", .name = "E-mu 1010 PCIe [MAEM8986]", | ||
| 1423 | .id = "EMU1010", | ||
| 1424 | .emu10k2_chip = 1, | ||
| 1425 | .ca0108_chip = 1, | ||
| 1426 | .spk71 = 1, | ||
| 1427 | .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 PCIe */ | ||
| 1419 | /* Tested by James@superbug.co.uk 8th July 2005. */ | 1428 | /* Tested by James@superbug.co.uk 8th July 2005. */ |
| 1420 | /* This is MAEM8810, 0202 is MAEM8820 */ | 1429 | /* This is MAEM8810, 0202 is MAEM8820 */ |
| 1421 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102, | 1430 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102, |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 6833835a218b..72b085ae7d46 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
| @@ -501,6 +501,7 @@ struct azx { | |||
| 501 | 501 | ||
| 502 | /* VGA-switcheroo setup */ | 502 | /* VGA-switcheroo setup */ |
| 503 | unsigned int use_vga_switcheroo:1; | 503 | unsigned int use_vga_switcheroo:1; |
| 504 | unsigned int vga_switcheroo_registered:1; | ||
| 504 | unsigned int init_failed:1; /* delayed init failed */ | 505 | unsigned int init_failed:1; /* delayed init failed */ |
| 505 | unsigned int disabled:1; /* disabled by VGA-switcher */ | 506 | unsigned int disabled:1; /* disabled by VGA-switcher */ |
| 506 | 507 | ||
| @@ -2157,9 +2158,12 @@ static unsigned int azx_get_position(struct azx *chip, | |||
| 2157 | if (delay < 0) | 2158 | if (delay < 0) |
| 2158 | delay += azx_dev->bufsize; | 2159 | delay += azx_dev->bufsize; |
| 2159 | if (delay >= azx_dev->period_bytes) { | 2160 | if (delay >= azx_dev->period_bytes) { |
| 2160 | snd_printdd("delay %d > period_bytes %d\n", | 2161 | snd_printk(KERN_WARNING SFX |
| 2161 | delay, azx_dev->period_bytes); | 2162 | "Unstable LPIB (%d >= %d); " |
| 2162 | delay = 0; /* something is wrong */ | 2163 | "disabling LPIB delay counting\n", |
| 2164 | delay, azx_dev->period_bytes); | ||
| 2165 | delay = 0; | ||
| 2166 | chip->driver_caps &= ~AZX_DCAPS_COUNT_LPIB_DELAY; | ||
| 2163 | } | 2167 | } |
| 2164 | azx_dev->substream->runtime->delay = | 2168 | azx_dev->substream->runtime->delay = |
| 2165 | bytes_to_frames(azx_dev->substream->runtime, delay); | 2169 | bytes_to_frames(azx_dev->substream->runtime, delay); |
| @@ -2640,7 +2644,9 @@ static void azx_vs_set_state(struct pci_dev *pci, | |||
| 2640 | if (disabled) { | 2644 | if (disabled) { |
| 2641 | azx_suspend(&pci->dev); | 2645 | azx_suspend(&pci->dev); |
| 2642 | chip->disabled = true; | 2646 | chip->disabled = true; |
| 2643 | snd_hda_lock_devices(chip->bus); | 2647 | if (snd_hda_lock_devices(chip->bus)) |
| 2648 | snd_printk(KERN_WARNING SFX | ||
| 2649 | "Cannot lock devices!\n"); | ||
| 2644 | } else { | 2650 | } else { |
| 2645 | snd_hda_unlock_devices(chip->bus); | 2651 | snd_hda_unlock_devices(chip->bus); |
| 2646 | chip->disabled = false; | 2652 | chip->disabled = false; |
| @@ -2683,14 +2689,20 @@ static const struct vga_switcheroo_client_ops azx_vs_ops = { | |||
| 2683 | 2689 | ||
| 2684 | static int __devinit register_vga_switcheroo(struct azx *chip) | 2690 | static int __devinit register_vga_switcheroo(struct azx *chip) |
| 2685 | { | 2691 | { |
| 2692 | int err; | ||
| 2693 | |||
| 2686 | if (!chip->use_vga_switcheroo) | 2694 | if (!chip->use_vga_switcheroo) |
| 2687 | return 0; | 2695 | return 0; |
| 2688 | /* FIXME: currently only handling DIS controller | 2696 | /* FIXME: currently only handling DIS controller |
| 2689 | * is there any machine with two switchable HDMI audio controllers? | 2697 | * is there any machine with two switchable HDMI audio controllers? |
| 2690 | */ | 2698 | */ |
| 2691 | return vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops, | 2699 | err = vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops, |
| 2692 | VGA_SWITCHEROO_DIS, | 2700 | VGA_SWITCHEROO_DIS, |
| 2693 | chip->bus != NULL); | 2701 | chip->bus != NULL); |
| 2702 | if (err < 0) | ||
| 2703 | return err; | ||
| 2704 | chip->vga_switcheroo_registered = 1; | ||
| 2705 | return 0; | ||
| 2694 | } | 2706 | } |
| 2695 | #else | 2707 | #else |
| 2696 | #define init_vga_switcheroo(chip) /* NOP */ | 2708 | #define init_vga_switcheroo(chip) /* NOP */ |
| @@ -2712,7 +2724,8 @@ static int azx_free(struct azx *chip) | |||
| 2712 | if (use_vga_switcheroo(chip)) { | 2724 | if (use_vga_switcheroo(chip)) { |
| 2713 | if (chip->disabled && chip->bus) | 2725 | if (chip->disabled && chip->bus) |
| 2714 | snd_hda_unlock_devices(chip->bus); | 2726 | snd_hda_unlock_devices(chip->bus); |
| 2715 | vga_switcheroo_unregister_client(chip->pci); | 2727 | if (chip->vga_switcheroo_registered) |
| 2728 | vga_switcheroo_unregister_client(chip->pci); | ||
| 2716 | } | 2729 | } |
| 2717 | 2730 | ||
| 2718 | if (chip->initialized) { | 2731 | if (chip->initialized) { |
| @@ -2813,8 +2826,6 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { | |||
| 2813 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), | 2826 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), |
| 2814 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), | 2827 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), |
| 2815 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), | 2828 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), |
| 2816 | SND_PCI_QUIRK(0x1043, 0x1ac3, "ASUS X53S", POS_FIX_POSBUF), | ||
| 2817 | SND_PCI_QUIRK(0x1043, 0x1b43, "ASUS K53E", POS_FIX_POSBUF), | ||
| 2818 | SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), | 2829 | SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), |
| 2819 | SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB), | 2830 | SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB), |
| 2820 | SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), | 2831 | SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), |
| @@ -3062,14 +3073,6 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
| 3062 | } | 3073 | } |
| 3063 | 3074 | ||
| 3064 | ok: | 3075 | ok: |
| 3065 | err = register_vga_switcheroo(chip); | ||
| 3066 | if (err < 0) { | ||
| 3067 | snd_printk(KERN_ERR SFX | ||
| 3068 | "Error registering VGA-switcheroo client\n"); | ||
| 3069 | azx_free(chip); | ||
| 3070 | return err; | ||
| 3071 | } | ||
| 3072 | |||
| 3073 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); | 3076 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); |
| 3074 | if (err < 0) { | 3077 | if (err < 0) { |
| 3075 | snd_printk(KERN_ERR SFX "Error creating device [card]!\n"); | 3078 | snd_printk(KERN_ERR SFX "Error creating device [card]!\n"); |
| @@ -3340,6 +3343,13 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
| 3340 | if (pci_dev_run_wake(pci)) | 3343 | if (pci_dev_run_wake(pci)) |
| 3341 | pm_runtime_put_noidle(&pci->dev); | 3344 | pm_runtime_put_noidle(&pci->dev); |
| 3342 | 3345 | ||
| 3346 | err = register_vga_switcheroo(chip); | ||
| 3347 | if (err < 0) { | ||
| 3348 | snd_printk(KERN_ERR SFX | ||
| 3349 | "Error registering VGA-switcheroo client\n"); | ||
| 3350 | goto out_free; | ||
| 3351 | } | ||
| 3352 | |||
| 3343 | dev++; | 3353 | dev++; |
| 3344 | return 0; | 3354 | return 0; |
| 3345 | 3355 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8253b4eeb6a1..48d9d609f89b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -2598,8 +2598,10 @@ static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch, | |||
| 2598 | return "PCM"; | 2598 | return "PCM"; |
| 2599 | break; | 2599 | break; |
| 2600 | } | 2600 | } |
| 2601 | if (snd_BUG_ON(ch >= ARRAY_SIZE(channel_name))) | 2601 | if (ch >= ARRAY_SIZE(channel_name)) { |
| 2602 | snd_BUG(); | ||
| 2602 | return "PCM"; | 2603 | return "PCM"; |
| 2604 | } | ||
| 2603 | 2605 | ||
| 2604 | return channel_name[ch]; | 2606 | return channel_name[ch]; |
| 2605 | } | 2607 | } |
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 | { |
