diff options
author | Olof Johansson <olof@lixom.net> | 2012-11-26 00:34:34 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-26 00:34:34 -0500 |
commit | 0f9cb211ba5db93d488fe6b154138231fdd0e22d (patch) | |
tree | 293871b042e9ebc49b1d783f1b110eef541ddc97 /sound | |
parent | 007108a2279123ad6639b6c653ad1a731febb60f (diff) | |
parent | 9489e9dcae718d5fde988e4a684a0f55b5f94d17 (diff) |
Merge tag 'v3.7-rc7' into next/cleanup
Merging in mainline back to next/cleanup since it has collected a few
conflicts between fixes going upstream and some of the cleanup patches.
Git doesn't auto-resolve some of them, and they're mostly noise so let's
take care of it locally.
Conflicts are in:
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/plat-omap/i2c.c
drivers/video/omap2/dss/dss.c
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/es1968.c | 11 | ||||
-rw-r--r-- | sound/pci/fm801.c | 11 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 13 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.h | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 39 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/arizona.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/cs4271.c | 11 | ||||
-rw-r--r-- | sound/soc/codecs/cs42l52.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm5102.c | 552 | ||||
-rw-r--r-- | sound/soc/codecs/wm8978.c | 2 | ||||
-rw-r--r-- | sound/soc/kirkwood/kirkwood-dma.c | 3 | ||||
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 74 | ||||
-rw-r--r-- | sound/soc/mxs/mxs-saif.c | 17 | ||||
-rw-r--r-- | sound/soc/samsung/Kconfig | 2 | ||||
-rw-r--r-- | sound/soc/samsung/bells.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 5 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 2 | ||||
-rw-r--r-- | sound/usb/card.c | 6 | ||||
-rw-r--r-- | sound/usb/midi.c | 8 | ||||
-rw-r--r-- | sound/usb/pcm.c | 2 |
22 files changed, 677 insertions, 94 deletions
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index 50169bcfd903..7266020c16cb 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -2581,9 +2581,14 @@ static u8 snd_es1968_tea575x_get_pins(struct snd_tea575x *tea) | |||
2581 | struct es1968 *chip = tea->private_data; | 2581 | struct es1968 *chip = tea->private_data; |
2582 | unsigned long io = chip->io_port + GPIO_DATA; | 2582 | unsigned long io = chip->io_port + GPIO_DATA; |
2583 | u16 val = inw(io); | 2583 | u16 val = inw(io); |
2584 | 2584 | u8 ret; | |
2585 | return (val & STR_DATA) ? TEA575X_DATA : 0 | | 2585 | |
2586 | (val & STR_MOST) ? TEA575X_MOST : 0; | 2586 | ret = 0; |
2587 | if (val & STR_DATA) | ||
2588 | ret |= TEA575X_DATA; | ||
2589 | if (val & STR_MOST) | ||
2590 | ret |= TEA575X_MOST; | ||
2591 | return ret; | ||
2587 | } | 2592 | } |
2588 | 2593 | ||
2589 | static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool output) | 2594 | static void snd_es1968_tea575x_set_direction(struct snd_tea575x *tea, bool output) |
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index cc2e91d15538..c5806f89be1e 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -767,9 +767,14 @@ static u8 snd_fm801_tea575x_get_pins(struct snd_tea575x *tea) | |||
767 | struct fm801 *chip = tea->private_data; | 767 | struct fm801 *chip = tea->private_data; |
768 | unsigned short reg = inw(FM801_REG(chip, GPIO_CTRL)); | 768 | unsigned short reg = inw(FM801_REG(chip, GPIO_CTRL)); |
769 | struct snd_fm801_tea575x_gpio gpio = *get_tea575x_gpio(chip); | 769 | struct snd_fm801_tea575x_gpio gpio = *get_tea575x_gpio(chip); |
770 | 770 | u8 ret; | |
771 | return (reg & FM801_GPIO_GP(gpio.data)) ? TEA575X_DATA : 0 | | 771 | |
772 | (reg & FM801_GPIO_GP(gpio.most)) ? TEA575X_MOST : 0; | 772 | ret = 0; |
773 | if (reg & FM801_GPIO_GP(gpio.data)) | ||
774 | ret |= TEA575X_DATA; | ||
775 | if (reg & FM801_GPIO_GP(gpio.most)) | ||
776 | ret |= TEA575X_MOST; | ||
777 | return ret; | ||
773 | } | 778 | } |
774 | 779 | ||
775 | static void snd_fm801_tea575x_set_direction(struct snd_tea575x *tea, bool output) | 780 | static void snd_fm801_tea575x_set_direction(struct snd_tea575x *tea, bool output) |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 70d4848b5cd0..d010de12335e 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -95,6 +95,7 @@ int snd_hda_delete_codec_preset(struct hda_codec_preset_list *preset) | |||
95 | EXPORT_SYMBOL_HDA(snd_hda_delete_codec_preset); | 95 | EXPORT_SYMBOL_HDA(snd_hda_delete_codec_preset); |
96 | 96 | ||
97 | #ifdef CONFIG_PM | 97 | #ifdef CONFIG_PM |
98 | #define codec_in_pm(codec) ((codec)->in_pm) | ||
98 | static void hda_power_work(struct work_struct *work); | 99 | static void hda_power_work(struct work_struct *work); |
99 | static void hda_keep_power_on(struct hda_codec *codec); | 100 | static void hda_keep_power_on(struct hda_codec *codec); |
100 | #define hda_codec_is_power_on(codec) ((codec)->power_on) | 101 | #define hda_codec_is_power_on(codec) ((codec)->power_on) |
@@ -104,6 +105,7 @@ static inline void hda_call_pm_notify(struct hda_bus *bus, bool power_up) | |||
104 | bus->ops.pm_notify(bus, power_up); | 105 | bus->ops.pm_notify(bus, power_up); |
105 | } | 106 | } |
106 | #else | 107 | #else |
108 | #define codec_in_pm(codec) 0 | ||
107 | static inline void hda_keep_power_on(struct hda_codec *codec) {} | 109 | static inline void hda_keep_power_on(struct hda_codec *codec) {} |
108 | #define hda_codec_is_power_on(codec) 1 | 110 | #define hda_codec_is_power_on(codec) 1 |
109 | #define hda_call_pm_notify(bus, state) {} | 111 | #define hda_call_pm_notify(bus, state) {} |
@@ -228,7 +230,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd, | |||
228 | } | 230 | } |
229 | mutex_unlock(&bus->cmd_mutex); | 231 | mutex_unlock(&bus->cmd_mutex); |
230 | snd_hda_power_down(codec); | 232 | snd_hda_power_down(codec); |
231 | if (res && *res == -1 && bus->rirb_error) { | 233 | if (!codec_in_pm(codec) && res && *res == -1 && bus->rirb_error) { |
232 | if (bus->response_reset) { | 234 | if (bus->response_reset) { |
233 | snd_printd("hda_codec: resetting BUS due to " | 235 | snd_printd("hda_codec: resetting BUS due to " |
234 | "fatal communication error\n"); | 236 | "fatal communication error\n"); |
@@ -238,7 +240,7 @@ static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd, | |||
238 | goto again; | 240 | goto again; |
239 | } | 241 | } |
240 | /* clear reset-flag when the communication gets recovered */ | 242 | /* clear reset-flag when the communication gets recovered */ |
241 | if (!err) | 243 | if (!err || codec_in_pm(codec)) |
242 | bus->response_reset = 0; | 244 | bus->response_reset = 0; |
243 | return err; | 245 | return err; |
244 | } | 246 | } |
@@ -3616,6 +3618,8 @@ static unsigned int hda_call_codec_suspend(struct hda_codec *codec, bool in_wq) | |||
3616 | { | 3618 | { |
3617 | unsigned int state; | 3619 | unsigned int state; |
3618 | 3620 | ||
3621 | codec->in_pm = 1; | ||
3622 | |||
3619 | if (codec->patch_ops.suspend) | 3623 | if (codec->patch_ops.suspend) |
3620 | codec->patch_ops.suspend(codec); | 3624 | codec->patch_ops.suspend(codec); |
3621 | hda_cleanup_all_streams(codec); | 3625 | hda_cleanup_all_streams(codec); |
@@ -3630,6 +3634,7 @@ static unsigned int hda_call_codec_suspend(struct hda_codec *codec, bool in_wq) | |||
3630 | codec->power_transition = 0; | 3634 | codec->power_transition = 0; |
3631 | codec->power_jiffies = jiffies; | 3635 | codec->power_jiffies = jiffies; |
3632 | spin_unlock(&codec->power_lock); | 3636 | spin_unlock(&codec->power_lock); |
3637 | codec->in_pm = 0; | ||
3633 | return state; | 3638 | return state; |
3634 | } | 3639 | } |
3635 | 3640 | ||
@@ -3638,6 +3643,8 @@ static unsigned int hda_call_codec_suspend(struct hda_codec *codec, bool in_wq) | |||
3638 | */ | 3643 | */ |
3639 | static void hda_call_codec_resume(struct hda_codec *codec) | 3644 | static void hda_call_codec_resume(struct hda_codec *codec) |
3640 | { | 3645 | { |
3646 | codec->in_pm = 1; | ||
3647 | |||
3641 | /* set as if powered on for avoiding re-entering the resume | 3648 | /* set as if powered on for avoiding re-entering the resume |
3642 | * in the resume / power-save sequence | 3649 | * in the resume / power-save sequence |
3643 | */ | 3650 | */ |
@@ -3656,6 +3663,8 @@ static void hda_call_codec_resume(struct hda_codec *codec) | |||
3656 | snd_hda_codec_resume_cache(codec); | 3663 | snd_hda_codec_resume_cache(codec); |
3657 | } | 3664 | } |
3658 | snd_hda_jack_report_sync(codec); | 3665 | snd_hda_jack_report_sync(codec); |
3666 | |||
3667 | codec->in_pm = 0; | ||
3659 | snd_hda_power_down(codec); /* flag down before returning */ | 3668 | snd_hda_power_down(codec); /* flag down before returning */ |
3660 | } | 3669 | } |
3661 | #endif /* CONFIG_PM */ | 3670 | #endif /* CONFIG_PM */ |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 507fe8a917b6..4f4e545c0f4b 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -869,6 +869,7 @@ struct hda_codec { | |||
869 | unsigned int power_on :1; /* current (global) power-state */ | 869 | unsigned int power_on :1; /* current (global) power-state */ |
870 | unsigned int d3_stop_clk:1; /* support D3 operation without BCLK */ | 870 | unsigned int d3_stop_clk:1; /* support D3 operation without BCLK */ |
871 | unsigned int pm_down_notified:1; /* PM notified to controller */ | 871 | unsigned int pm_down_notified:1; /* PM notified to controller */ |
872 | unsigned int in_pm:1; /* suspend/resume being performed */ | ||
872 | int power_transition; /* power-state in transition */ | 873 | int power_transition; /* power-state in transition */ |
873 | int power_count; /* current (global) power refcount */ | 874 | int power_count; /* current (global) power refcount */ |
874 | struct delayed_work power_work; /* delayed task for powerdown */ | 875 | struct delayed_work power_work; /* delayed task for powerdown */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index cd2dbaf1be78..f9d870e554d9 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -556,6 +556,12 @@ enum { | |||
556 | #define AZX_DCAPS_ALIGN_BUFSIZE (1 << 22) /* buffer size alignment */ | 556 | #define AZX_DCAPS_ALIGN_BUFSIZE (1 << 22) /* buffer size alignment */ |
557 | #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23) /* BDLE in 4k boundary */ | 557 | #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23) /* BDLE in 4k boundary */ |
558 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ | 558 | #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ |
559 | #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ | ||
560 | |||
561 | /* quirks for Intel PCH */ | ||
562 | #define AZX_DCAPS_INTEL_PCH \ | ||
563 | (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \ | ||
564 | AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME) | ||
559 | 565 | ||
560 | /* quirks for ATI SB / AMD Hudson */ | 566 | /* quirks for ATI SB / AMD Hudson */ |
561 | #define AZX_DCAPS_PRESET_ATI_SB \ | 567 | #define AZX_DCAPS_PRESET_ATI_SB \ |
@@ -2433,6 +2439,9 @@ static void azx_power_notify(struct hda_bus *bus, bool power_up) | |||
2433 | { | 2439 | { |
2434 | struct azx *chip = bus->private_data; | 2440 | struct azx *chip = bus->private_data; |
2435 | 2441 | ||
2442 | if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) | ||
2443 | return; | ||
2444 | |||
2436 | if (power_up) | 2445 | if (power_up) |
2437 | pm_runtime_get_sync(&chip->pci->dev); | 2446 | pm_runtime_get_sync(&chip->pci->dev); |
2438 | else | 2447 | else |
@@ -2548,7 +2557,8 @@ static int azx_runtime_suspend(struct device *dev) | |||
2548 | struct snd_card *card = dev_get_drvdata(dev); | 2557 | struct snd_card *card = dev_get_drvdata(dev); |
2549 | struct azx *chip = card->private_data; | 2558 | struct azx *chip = card->private_data; |
2550 | 2559 | ||
2551 | if (!power_save_controller) | 2560 | if (!power_save_controller || |
2561 | !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) | ||
2552 | return -EAGAIN; | 2562 | return -EAGAIN; |
2553 | 2563 | ||
2554 | azx_stop_chip(chip); | 2564 | azx_stop_chip(chip); |
@@ -3429,39 +3439,30 @@ static void __devexit azx_remove(struct pci_dev *pci) | |||
3429 | static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { | 3439 | static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { |
3430 | /* CPT */ | 3440 | /* CPT */ |
3431 | { PCI_DEVICE(0x8086, 0x1c20), | 3441 | { PCI_DEVICE(0x8086, 0x1c20), |
3432 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3442 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3433 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3434 | /* PBG */ | 3443 | /* PBG */ |
3435 | { PCI_DEVICE(0x8086, 0x1d20), | 3444 | { PCI_DEVICE(0x8086, 0x1d20), |
3436 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3445 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3437 | AZX_DCAPS_BUFSIZE}, | ||
3438 | /* Panther Point */ | 3446 | /* Panther Point */ |
3439 | { PCI_DEVICE(0x8086, 0x1e20), | 3447 | { PCI_DEVICE(0x8086, 0x1e20), |
3440 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3448 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3441 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3442 | /* Lynx Point */ | 3449 | /* Lynx Point */ |
3443 | { PCI_DEVICE(0x8086, 0x8c20), | 3450 | { PCI_DEVICE(0x8086, 0x8c20), |
3444 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3451 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3445 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3446 | /* Lynx Point-LP */ | 3452 | /* Lynx Point-LP */ |
3447 | { PCI_DEVICE(0x8086, 0x9c20), | 3453 | { PCI_DEVICE(0x8086, 0x9c20), |
3448 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3454 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3449 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3450 | /* Lynx Point-LP */ | 3455 | /* Lynx Point-LP */ |
3451 | { PCI_DEVICE(0x8086, 0x9c21), | 3456 | { PCI_DEVICE(0x8086, 0x9c21), |
3452 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP | | 3457 | .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3453 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3454 | /* Haswell */ | 3458 | /* Haswell */ |
3455 | { PCI_DEVICE(0x8086, 0x0c0c), | 3459 | { PCI_DEVICE(0x8086, 0x0c0c), |
3456 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | | 3460 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH }, |
3457 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3458 | { PCI_DEVICE(0x8086, 0x0d0c), | 3461 | { PCI_DEVICE(0x8086, 0x0d0c), |
3459 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | | 3462 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH }, |
3460 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3461 | /* 5 Series/3400 */ | 3463 | /* 5 Series/3400 */ |
3462 | { PCI_DEVICE(0x8086, 0x3b56), | 3464 | { PCI_DEVICE(0x8086, 0x3b56), |
3463 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | | 3465 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH }, |
3464 | AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY }, | ||
3465 | /* SCH */ | 3466 | /* SCH */ |
3466 | { PCI_DEVICE(0x8086, 0x811b), | 3467 | { PCI_DEVICE(0x8086, 0x811b), |
3467 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | | 3468 | .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index d5f3a26d608d..3bcb67172358 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -466,6 +466,7 @@ static int parse_output(struct hda_codec *codec) | |||
466 | memcpy(cfg->speaker_pins, cfg->line_out_pins, | 466 | memcpy(cfg->speaker_pins, cfg->line_out_pins, |
467 | sizeof(cfg->speaker_pins)); | 467 | sizeof(cfg->speaker_pins)); |
468 | cfg->line_outs = 0; | 468 | cfg->line_outs = 0; |
469 | memset(cfg->line_out_pins, 0, sizeof(cfg->line_out_pins)); | ||
469 | } | 470 | } |
470 | 471 | ||
471 | return 0; | 472 | return 0; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c0ce3b1f04b4..ad68d223f8af 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5407,6 +5407,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
5407 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), | 5407 | SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF), |
5408 | SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), | 5408 | SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF), |
5409 | SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO), | 5409 | SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO), |
5410 | SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF), | ||
5410 | SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), | 5411 | SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF), |
5411 | SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), | 5412 | SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF), |
5412 | SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), | 5413 | SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF), |
@@ -7064,6 +7065,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
7064 | { .id = 0x10ec0282, .name = "ALC282", .patch = patch_alc269 }, | 7065 | { .id = 0x10ec0282, .name = "ALC282", .patch = patch_alc269 }, |
7065 | { .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 }, | 7066 | { .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 }, |
7066 | { .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 }, | 7067 | { .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 }, |
7068 | { .id = 0x10ec0292, .name = "ALC292", .patch = patch_alc269 }, | ||
7067 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", | 7069 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", |
7068 | .patch = patch_alc861 }, | 7070 | .patch = patch_alc861 }, |
7069 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, | 7071 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, |
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index c03b65af3059..054967d8bac2 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c | |||
@@ -268,7 +268,7 @@ EXPORT_SYMBOL_GPL(arizona_out_ev); | |||
268 | static unsigned int arizona_sysclk_48k_rates[] = { | 268 | static unsigned int arizona_sysclk_48k_rates[] = { |
269 | 6144000, | 269 | 6144000, |
270 | 12288000, | 270 | 12288000, |
271 | 22579200, | 271 | 24576000, |
272 | 49152000, | 272 | 49152000, |
273 | 73728000, | 273 | 73728000, |
274 | 98304000, | 274 | 98304000, |
@@ -278,7 +278,7 @@ static unsigned int arizona_sysclk_48k_rates[] = { | |||
278 | static unsigned int arizona_sysclk_44k1_rates[] = { | 278 | static unsigned int arizona_sysclk_44k1_rates[] = { |
279 | 5644800, | 279 | 5644800, |
280 | 11289600, | 280 | 11289600, |
281 | 24576000, | 281 | 22579200, |
282 | 45158400, | 282 | 45158400, |
283 | 67737600, | 283 | 67737600, |
284 | 90316800, | 284 | 90316800, |
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index f994af34f552..e3f0a7f3131e 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c | |||
@@ -485,7 +485,7 @@ static int cs4271_probe(struct snd_soc_codec *codec) | |||
485 | gpio_nreset = cs4271plat->gpio_nreset; | 485 | gpio_nreset = cs4271plat->gpio_nreset; |
486 | 486 | ||
487 | if (gpio_nreset >= 0) | 487 | if (gpio_nreset >= 0) |
488 | if (gpio_request(gpio_nreset, "CS4271 Reset")) | 488 | if (devm_gpio_request(codec->dev, gpio_nreset, "CS4271 Reset")) |
489 | gpio_nreset = -EINVAL; | 489 | gpio_nreset = -EINVAL; |
490 | if (gpio_nreset >= 0) { | 490 | if (gpio_nreset >= 0) { |
491 | /* Reset codec */ | 491 | /* Reset codec */ |
@@ -535,15 +535,10 @@ static int cs4271_probe(struct snd_soc_codec *codec) | |||
535 | static int cs4271_remove(struct snd_soc_codec *codec) | 535 | static int cs4271_remove(struct snd_soc_codec *codec) |
536 | { | 536 | { |
537 | struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); | 537 | struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); |
538 | int gpio_nreset; | ||
539 | 538 | ||
540 | gpio_nreset = cs4271->gpio_nreset; | 539 | if (gpio_is_valid(cs4271->gpio_nreset)) |
541 | |||
542 | if (gpio_is_valid(gpio_nreset)) { | ||
543 | /* Set codec to the reset state */ | 540 | /* Set codec to the reset state */ |
544 | gpio_set_value(gpio_nreset, 0); | 541 | gpio_set_value(cs4271->gpio_nreset, 0); |
545 | gpio_free(gpio_nreset); | ||
546 | } | ||
547 | 542 | ||
548 | return 0; | 543 | return 0; |
549 | }; | 544 | }; |
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 4d8db3685e96..97a81051e88d 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c | |||
@@ -773,7 +773,6 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) | |||
773 | { | 773 | { |
774 | struct snd_soc_codec *codec = codec_dai->codec; | 774 | struct snd_soc_codec *codec = codec_dai->codec; |
775 | struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); | 775 | struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); |
776 | int ret = 0; | ||
777 | u8 iface = 0; | 776 | u8 iface = 0; |
778 | 777 | ||
779 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { | 778 | switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { |
@@ -822,7 +821,7 @@ static int cs42l52_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) | |||
822 | case SND_SOC_DAIFMT_NB_IF: | 821 | case SND_SOC_DAIFMT_NB_IF: |
823 | break; | 822 | break; |
824 | default: | 823 | default: |
825 | ret = -EINVAL; | 824 | return -EINVAL; |
826 | } | 825 | } |
827 | cs42l52->config.format = iface; | 826 | cs42l52->config.format = iface; |
828 | snd_soc_write(codec, CS42L52_IFACE_CTL1, cs42l52->config.format); | 827 | snd_soc_write(codec, CS42L52_IFACE_CTL1, cs42l52->config.format); |
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 1722b586bdba..7394e73fa43c 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c | |||
@@ -42,6 +42,556 @@ static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0); | |||
42 | static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0); | 42 | static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0); |
43 | static DECLARE_TLV_DB_SCALE(noise_tlv, 0, 600, 0); | 43 | static DECLARE_TLV_DB_SCALE(noise_tlv, 0, 600, 0); |
44 | 44 | ||
45 | static const struct reg_default wm5102_sysclk_reva_patch[] = { | ||
46 | { 0x3000, 0x2225 }, | ||
47 | { 0x3001, 0x3a03 }, | ||
48 | { 0x3002, 0x0225 }, | ||
49 | { 0x3003, 0x0801 }, | ||
50 | { 0x3004, 0x6249 }, | ||
51 | { 0x3005, 0x0c04 }, | ||
52 | { 0x3006, 0x0225 }, | ||
53 | { 0x3007, 0x5901 }, | ||
54 | { 0x3008, 0xe249 }, | ||
55 | { 0x3009, 0x030d }, | ||
56 | { 0x300a, 0x0249 }, | ||
57 | { 0x300b, 0x2c01 }, | ||
58 | { 0x300c, 0xe249 }, | ||
59 | { 0x300d, 0x4342 }, | ||
60 | { 0x300e, 0xe249 }, | ||
61 | { 0x300f, 0x73c0 }, | ||
62 | { 0x3010, 0x4249 }, | ||
63 | { 0x3011, 0x0c00 }, | ||
64 | { 0x3012, 0x0225 }, | ||
65 | { 0x3013, 0x1f01 }, | ||
66 | { 0x3014, 0x0225 }, | ||
67 | { 0x3015, 0x1e01 }, | ||
68 | { 0x3016, 0x0225 }, | ||
69 | { 0x3017, 0xfa00 }, | ||
70 | { 0x3018, 0x0000 }, | ||
71 | { 0x3019, 0xf000 }, | ||
72 | { 0x301a, 0x0000 }, | ||
73 | { 0x301b, 0xf000 }, | ||
74 | { 0x301c, 0x0000 }, | ||
75 | { 0x301d, 0xf000 }, | ||
76 | { 0x301e, 0x0000 }, | ||
77 | { 0x301f, 0xf000 }, | ||
78 | { 0x3020, 0x0000 }, | ||
79 | { 0x3021, 0xf000 }, | ||
80 | { 0x3022, 0x0000 }, | ||
81 | { 0x3023, 0xf000 }, | ||
82 | { 0x3024, 0x0000 }, | ||
83 | { 0x3025, 0xf000 }, | ||
84 | { 0x3026, 0x0000 }, | ||
85 | { 0x3027, 0xf000 }, | ||
86 | { 0x3028, 0x0000 }, | ||
87 | { 0x3029, 0xf000 }, | ||
88 | { 0x302a, 0x0000 }, | ||
89 | { 0x302b, 0xf000 }, | ||
90 | { 0x302c, 0x0000 }, | ||
91 | { 0x302d, 0xf000 }, | ||
92 | { 0x302e, 0x0000 }, | ||
93 | { 0x302f, 0xf000 }, | ||
94 | { 0x3030, 0x0225 }, | ||
95 | { 0x3031, 0x1a01 }, | ||
96 | { 0x3032, 0x0225 }, | ||
97 | { 0x3033, 0x1e00 }, | ||
98 | { 0x3034, 0x0225 }, | ||
99 | { 0x3035, 0x1f00 }, | ||
100 | { 0x3036, 0x6225 }, | ||
101 | { 0x3037, 0xf800 }, | ||
102 | { 0x3038, 0x0000 }, | ||
103 | { 0x3039, 0xf000 }, | ||
104 | { 0x303a, 0x0000 }, | ||
105 | { 0x303b, 0xf000 }, | ||
106 | { 0x303c, 0x0000 }, | ||
107 | { 0x303d, 0xf000 }, | ||
108 | { 0x303e, 0x0000 }, | ||
109 | { 0x303f, 0xf000 }, | ||
110 | { 0x3040, 0x2226 }, | ||
111 | { 0x3041, 0x3a03 }, | ||
112 | { 0x3042, 0x0226 }, | ||
113 | { 0x3043, 0x0801 }, | ||
114 | { 0x3044, 0x6249 }, | ||
115 | { 0x3045, 0x0c06 }, | ||
116 | { 0x3046, 0x0226 }, | ||
117 | { 0x3047, 0x5901 }, | ||
118 | { 0x3048, 0xe249 }, | ||
119 | { 0x3049, 0x030d }, | ||
120 | { 0x304a, 0x0249 }, | ||
121 | { 0x304b, 0x2c01 }, | ||
122 | { 0x304c, 0xe249 }, | ||
123 | { 0x304d, 0x4342 }, | ||
124 | { 0x304e, 0xe249 }, | ||
125 | { 0x304f, 0x73c0 }, | ||
126 | { 0x3050, 0x4249 }, | ||
127 | { 0x3051, 0x0c00 }, | ||
128 | { 0x3052, 0x0226 }, | ||
129 | { 0x3053, 0x1f01 }, | ||
130 | { 0x3054, 0x0226 }, | ||
131 | { 0x3055, 0x1e01 }, | ||
132 | { 0x3056, 0x0226 }, | ||
133 | { 0x3057, 0xfa00 }, | ||
134 | { 0x3058, 0x0000 }, | ||
135 | { 0x3059, 0xf000 }, | ||
136 | { 0x305a, 0x0000 }, | ||
137 | { 0x305b, 0xf000 }, | ||
138 | { 0x305c, 0x0000 }, | ||
139 | { 0x305d, 0xf000 }, | ||
140 | { 0x305e, 0x0000 }, | ||
141 | { 0x305f, 0xf000 }, | ||
142 | { 0x3060, 0x0000 }, | ||
143 | { 0x3061, 0xf000 }, | ||
144 | { 0x3062, 0x0000 }, | ||
145 | { 0x3063, 0xf000 }, | ||
146 | { 0x3064, 0x0000 }, | ||
147 | { 0x3065, 0xf000 }, | ||
148 | { 0x3066, 0x0000 }, | ||
149 | { 0x3067, 0xf000 }, | ||
150 | { 0x3068, 0x0000 }, | ||
151 | { 0x3069, 0xf000 }, | ||
152 | { 0x306a, 0x0000 }, | ||
153 | { 0x306b, 0xf000 }, | ||
154 | { 0x306c, 0x0000 }, | ||
155 | { 0x306d, 0xf000 }, | ||
156 | { 0x306e, 0x0000 }, | ||
157 | { 0x306f, 0xf000 }, | ||
158 | { 0x3070, 0x0226 }, | ||
159 | { 0x3071, 0x1a01 }, | ||
160 | { 0x3072, 0x0226 }, | ||
161 | { 0x3073, 0x1e00 }, | ||
162 | { 0x3074, 0x0226 }, | ||
163 | { 0x3075, 0x1f00 }, | ||
164 | { 0x3076, 0x6226 }, | ||
165 | { 0x3077, 0xf800 }, | ||
166 | { 0x3078, 0x0000 }, | ||
167 | { 0x3079, 0xf000 }, | ||
168 | { 0x307a, 0x0000 }, | ||
169 | { 0x307b, 0xf000 }, | ||
170 | { 0x307c, 0x0000 }, | ||
171 | { 0x307d, 0xf000 }, | ||
172 | { 0x307e, 0x0000 }, | ||
173 | { 0x307f, 0xf000 }, | ||
174 | { 0x3080, 0x2227 }, | ||
175 | { 0x3081, 0x3a03 }, | ||
176 | { 0x3082, 0x0227 }, | ||
177 | { 0x3083, 0x0801 }, | ||
178 | { 0x3084, 0x6255 }, | ||
179 | { 0x3085, 0x0c04 }, | ||
180 | { 0x3086, 0x0227 }, | ||
181 | { 0x3087, 0x5901 }, | ||
182 | { 0x3088, 0xe255 }, | ||
183 | { 0x3089, 0x030d }, | ||
184 | { 0x308a, 0x0255 }, | ||
185 | { 0x308b, 0x2c01 }, | ||
186 | { 0x308c, 0xe255 }, | ||
187 | { 0x308d, 0x4342 }, | ||
188 | { 0x308e, 0xe255 }, | ||
189 | { 0x308f, 0x73c0 }, | ||
190 | { 0x3090, 0x4255 }, | ||
191 | { 0x3091, 0x0c00 }, | ||
192 | { 0x3092, 0x0227 }, | ||
193 | { 0x3093, 0x1f01 }, | ||
194 | { 0x3094, 0x0227 }, | ||
195 | { 0x3095, 0x1e01 }, | ||
196 | { 0x3096, 0x0227 }, | ||
197 | { 0x3097, 0xfa00 }, | ||
198 | { 0x3098, 0x0000 }, | ||
199 | { 0x3099, 0xf000 }, | ||
200 | { 0x309a, 0x0000 }, | ||
201 | { 0x309b, 0xf000 }, | ||
202 | { 0x309c, 0x0000 }, | ||
203 | { 0x309d, 0xf000 }, | ||
204 | { 0x309e, 0x0000 }, | ||
205 | { 0x309f, 0xf000 }, | ||
206 | { 0x30a0, 0x0000 }, | ||
207 | { 0x30a1, 0xf000 }, | ||
208 | { 0x30a2, 0x0000 }, | ||
209 | { 0x30a3, 0xf000 }, | ||
210 | { 0x30a4, 0x0000 }, | ||
211 | { 0x30a5, 0xf000 }, | ||
212 | { 0x30a6, 0x0000 }, | ||
213 | { 0x30a7, 0xf000 }, | ||
214 | { 0x30a8, 0x0000 }, | ||
215 | { 0x30a9, 0xf000 }, | ||
216 | { 0x30aa, 0x0000 }, | ||
217 | { 0x30ab, 0xf000 }, | ||
218 | { 0x30ac, 0x0000 }, | ||
219 | { 0x30ad, 0xf000 }, | ||
220 | { 0x30ae, 0x0000 }, | ||
221 | { 0x30af, 0xf000 }, | ||
222 | { 0x30b0, 0x0227 }, | ||
223 | { 0x30b1, 0x1a01 }, | ||
224 | { 0x30b2, 0x0227 }, | ||
225 | { 0x30b3, 0x1e00 }, | ||
226 | { 0x30b4, 0x0227 }, | ||
227 | { 0x30b5, 0x1f00 }, | ||
228 | { 0x30b6, 0x6227 }, | ||
229 | { 0x30b7, 0xf800 }, | ||
230 | { 0x30b8, 0x0000 }, | ||
231 | { 0x30b9, 0xf000 }, | ||
232 | { 0x30ba, 0x0000 }, | ||
233 | { 0x30bb, 0xf000 }, | ||
234 | { 0x30bc, 0x0000 }, | ||
235 | { 0x30bd, 0xf000 }, | ||
236 | { 0x30be, 0x0000 }, | ||
237 | { 0x30bf, 0xf000 }, | ||
238 | { 0x30c0, 0x2228 }, | ||
239 | { 0x30c1, 0x3a03 }, | ||
240 | { 0x30c2, 0x0228 }, | ||
241 | { 0x30c3, 0x0801 }, | ||
242 | { 0x30c4, 0x6255 }, | ||
243 | { 0x30c5, 0x0c06 }, | ||
244 | { 0x30c6, 0x0228 }, | ||
245 | { 0x30c7, 0x5901 }, | ||
246 | { 0x30c8, 0xe255 }, | ||
247 | { 0x30c9, 0x030d }, | ||
248 | { 0x30ca, 0x0255 }, | ||
249 | { 0x30cb, 0x2c01 }, | ||
250 | { 0x30cc, 0xe255 }, | ||
251 | { 0x30cd, 0x4342 }, | ||
252 | { 0x30ce, 0xe255 }, | ||
253 | { 0x30cf, 0x73c0 }, | ||
254 | { 0x30d0, 0x4255 }, | ||
255 | { 0x30d1, 0x0c00 }, | ||
256 | { 0x30d2, 0x0228 }, | ||
257 | { 0x30d3, 0x1f01 }, | ||
258 | { 0x30d4, 0x0228 }, | ||
259 | { 0x30d5, 0x1e01 }, | ||
260 | { 0x30d6, 0x0228 }, | ||
261 | { 0x30d7, 0xfa00 }, | ||
262 | { 0x30d8, 0x0000 }, | ||
263 | { 0x30d9, 0xf000 }, | ||
264 | { 0x30da, 0x0000 }, | ||
265 | { 0x30db, 0xf000 }, | ||
266 | { 0x30dc, 0x0000 }, | ||
267 | { 0x30dd, 0xf000 }, | ||
268 | { 0x30de, 0x0000 }, | ||
269 | { 0x30df, 0xf000 }, | ||
270 | { 0x30e0, 0x0000 }, | ||
271 | { 0x30e1, 0xf000 }, | ||
272 | { 0x30e2, 0x0000 }, | ||
273 | { 0x30e3, 0xf000 }, | ||
274 | { 0x30e4, 0x0000 }, | ||
275 | { 0x30e5, 0xf000 }, | ||
276 | { 0x30e6, 0x0000 }, | ||
277 | { 0x30e7, 0xf000 }, | ||
278 | { 0x30e8, 0x0000 }, | ||
279 | { 0x30e9, 0xf000 }, | ||
280 | { 0x30ea, 0x0000 }, | ||
281 | { 0x30eb, 0xf000 }, | ||
282 | { 0x30ec, 0x0000 }, | ||
283 | { 0x30ed, 0xf000 }, | ||
284 | { 0x30ee, 0x0000 }, | ||
285 | { 0x30ef, 0xf000 }, | ||
286 | { 0x30f0, 0x0228 }, | ||
287 | { 0x30f1, 0x1a01 }, | ||
288 | { 0x30f2, 0x0228 }, | ||
289 | { 0x30f3, 0x1e00 }, | ||
290 | { 0x30f4, 0x0228 }, | ||
291 | { 0x30f5, 0x1f00 }, | ||
292 | { 0x30f6, 0x6228 }, | ||
293 | { 0x30f7, 0xf800 }, | ||
294 | { 0x30f8, 0x0000 }, | ||
295 | { 0x30f9, 0xf000 }, | ||
296 | { 0x30fa, 0x0000 }, | ||
297 | { 0x30fb, 0xf000 }, | ||
298 | { 0x30fc, 0x0000 }, | ||
299 | { 0x30fd, 0xf000 }, | ||
300 | { 0x30fe, 0x0000 }, | ||
301 | { 0x30ff, 0xf000 }, | ||
302 | { 0x3100, 0x222b }, | ||
303 | { 0x3101, 0x3a03 }, | ||
304 | { 0x3102, 0x222b }, | ||
305 | { 0x3103, 0x5803 }, | ||
306 | { 0x3104, 0xe26f }, | ||
307 | { 0x3105, 0x030d }, | ||
308 | { 0x3106, 0x626f }, | ||
309 | { 0x3107, 0x2c01 }, | ||
310 | { 0x3108, 0xe26f }, | ||
311 | { 0x3109, 0x4342 }, | ||
312 | { 0x310a, 0xe26f }, | ||
313 | { 0x310b, 0x73c0 }, | ||
314 | { 0x310c, 0x026f }, | ||
315 | { 0x310d, 0x0c00 }, | ||
316 | { 0x310e, 0x022b }, | ||
317 | { 0x310f, 0x1f01 }, | ||
318 | { 0x3110, 0x022b }, | ||
319 | { 0x3111, 0x1e01 }, | ||
320 | { 0x3112, 0x022b }, | ||
321 | { 0x3113, 0xfa00 }, | ||
322 | { 0x3114, 0x0000 }, | ||
323 | { 0x3115, 0xf000 }, | ||
324 | { 0x3116, 0x0000 }, | ||
325 | { 0x3117, 0xf000 }, | ||
326 | { 0x3118, 0x0000 }, | ||
327 | { 0x3119, 0xf000 }, | ||
328 | { 0x311a, 0x0000 }, | ||
329 | { 0x311b, 0xf000 }, | ||
330 | { 0x311c, 0x0000 }, | ||
331 | { 0x311d, 0xf000 }, | ||
332 | { 0x311e, 0x0000 }, | ||
333 | { 0x311f, 0xf000 }, | ||
334 | { 0x3120, 0x022b }, | ||
335 | { 0x3121, 0x0a01 }, | ||
336 | { 0x3122, 0x022b }, | ||
337 | { 0x3123, 0x1e00 }, | ||
338 | { 0x3124, 0x022b }, | ||
339 | { 0x3125, 0x1f00 }, | ||
340 | { 0x3126, 0x622b }, | ||
341 | { 0x3127, 0xf800 }, | ||
342 | { 0x3128, 0x0000 }, | ||
343 | { 0x3129, 0xf000 }, | ||
344 | { 0x312a, 0x0000 }, | ||
345 | { 0x312b, 0xf000 }, | ||
346 | { 0x312c, 0x0000 }, | ||
347 | { 0x312d, 0xf000 }, | ||
348 | { 0x312e, 0x0000 }, | ||
349 | { 0x312f, 0xf000 }, | ||
350 | { 0x3130, 0x0000 }, | ||
351 | { 0x3131, 0xf000 }, | ||
352 | { 0x3132, 0x0000 }, | ||
353 | { 0x3133, 0xf000 }, | ||
354 | { 0x3134, 0x0000 }, | ||
355 | { 0x3135, 0xf000 }, | ||
356 | { 0x3136, 0x0000 }, | ||
357 | { 0x3137, 0xf000 }, | ||
358 | { 0x3138, 0x0000 }, | ||
359 | { 0x3139, 0xf000 }, | ||
360 | { 0x313a, 0x0000 }, | ||
361 | { 0x313b, 0xf000 }, | ||
362 | { 0x313c, 0x0000 }, | ||
363 | { 0x313d, 0xf000 }, | ||
364 | { 0x313e, 0x0000 }, | ||
365 | { 0x313f, 0xf000 }, | ||
366 | { 0x3140, 0x0000 }, | ||
367 | { 0x3141, 0xf000 }, | ||
368 | { 0x3142, 0x0000 }, | ||
369 | { 0x3143, 0xf000 }, | ||
370 | { 0x3144, 0x0000 }, | ||
371 | { 0x3145, 0xf000 }, | ||
372 | { 0x3146, 0x0000 }, | ||
373 | { 0x3147, 0xf000 }, | ||
374 | { 0x3148, 0x0000 }, | ||
375 | { 0x3149, 0xf000 }, | ||
376 | { 0x314a, 0x0000 }, | ||
377 | { 0x314b, 0xf000 }, | ||
378 | { 0x314c, 0x0000 }, | ||
379 | { 0x314d, 0xf000 }, | ||
380 | { 0x314e, 0x0000 }, | ||
381 | { 0x314f, 0xf000 }, | ||
382 | { 0x3150, 0x0000 }, | ||
383 | { 0x3151, 0xf000 }, | ||
384 | { 0x3152, 0x0000 }, | ||
385 | { 0x3153, 0xf000 }, | ||
386 | { 0x3154, 0x0000 }, | ||
387 | { 0x3155, 0xf000 }, | ||
388 | { 0x3156, 0x0000 }, | ||
389 | { 0x3157, 0xf000 }, | ||
390 | { 0x3158, 0x0000 }, | ||
391 | { 0x3159, 0xf000 }, | ||
392 | { 0x315a, 0x0000 }, | ||
393 | { 0x315b, 0xf000 }, | ||
394 | { 0x315c, 0x0000 }, | ||
395 | { 0x315d, 0xf000 }, | ||
396 | { 0x315e, 0x0000 }, | ||
397 | { 0x315f, 0xf000 }, | ||
398 | { 0x3160, 0x0000 }, | ||
399 | { 0x3161, 0xf000 }, | ||
400 | { 0x3162, 0x0000 }, | ||
401 | { 0x3163, 0xf000 }, | ||
402 | { 0x3164, 0x0000 }, | ||
403 | { 0x3165, 0xf000 }, | ||
404 | { 0x3166, 0x0000 }, | ||
405 | { 0x3167, 0xf000 }, | ||
406 | { 0x3168, 0x0000 }, | ||
407 | { 0x3169, 0xf000 }, | ||
408 | { 0x316a, 0x0000 }, | ||
409 | { 0x316b, 0xf000 }, | ||
410 | { 0x316c, 0x0000 }, | ||
411 | { 0x316d, 0xf000 }, | ||
412 | { 0x316e, 0x0000 }, | ||
413 | { 0x316f, 0xf000 }, | ||
414 | { 0x3170, 0x0000 }, | ||
415 | { 0x3171, 0xf000 }, | ||
416 | { 0x3172, 0x0000 }, | ||
417 | { 0x3173, 0xf000 }, | ||
418 | { 0x3174, 0x0000 }, | ||
419 | { 0x3175, 0xf000 }, | ||
420 | { 0x3176, 0x0000 }, | ||
421 | { 0x3177, 0xf000 }, | ||
422 | { 0x3178, 0x0000 }, | ||
423 | { 0x3179, 0xf000 }, | ||
424 | { 0x317a, 0x0000 }, | ||
425 | { 0x317b, 0xf000 }, | ||
426 | { 0x317c, 0x0000 }, | ||
427 | { 0x317d, 0xf000 }, | ||
428 | { 0x317e, 0x0000 }, | ||
429 | { 0x317f, 0xf000 }, | ||
430 | { 0x3180, 0x2001 }, | ||
431 | { 0x3181, 0xf101 }, | ||
432 | { 0x3182, 0x0000 }, | ||
433 | { 0x3183, 0xf000 }, | ||
434 | { 0x3184, 0x0000 }, | ||
435 | { 0x3185, 0xf000 }, | ||
436 | { 0x3186, 0x0000 }, | ||
437 | { 0x3187, 0xf000 }, | ||
438 | { 0x3188, 0x0000 }, | ||
439 | { 0x3189, 0xf000 }, | ||
440 | { 0x318a, 0x0000 }, | ||
441 | { 0x318b, 0xf000 }, | ||
442 | { 0x318c, 0x0000 }, | ||
443 | { 0x318d, 0xf000 }, | ||
444 | { 0x318e, 0x0000 }, | ||
445 | { 0x318f, 0xf000 }, | ||
446 | { 0x3190, 0x0000 }, | ||
447 | { 0x3191, 0xf000 }, | ||
448 | { 0x3192, 0x0000 }, | ||
449 | { 0x3193, 0xf000 }, | ||
450 | { 0x3194, 0x0000 }, | ||
451 | { 0x3195, 0xf000 }, | ||
452 | { 0x3196, 0x0000 }, | ||
453 | { 0x3197, 0xf000 }, | ||
454 | { 0x3198, 0x0000 }, | ||
455 | { 0x3199, 0xf000 }, | ||
456 | { 0x319a, 0x0000 }, | ||
457 | { 0x319b, 0xf000 }, | ||
458 | { 0x319c, 0x0000 }, | ||
459 | { 0x319d, 0xf000 }, | ||
460 | { 0x319e, 0x0000 }, | ||
461 | { 0x319f, 0xf000 }, | ||
462 | { 0x31a0, 0x0000 }, | ||
463 | { 0x31a1, 0xf000 }, | ||
464 | { 0x31a2, 0x0000 }, | ||
465 | { 0x31a3, 0xf000 }, | ||
466 | { 0x31a4, 0x0000 }, | ||
467 | { 0x31a5, 0xf000 }, | ||
468 | { 0x31a6, 0x0000 }, | ||
469 | { 0x31a7, 0xf000 }, | ||
470 | { 0x31a8, 0x0000 }, | ||
471 | { 0x31a9, 0xf000 }, | ||
472 | { 0x31aa, 0x0000 }, | ||
473 | { 0x31ab, 0xf000 }, | ||
474 | { 0x31ac, 0x0000 }, | ||
475 | { 0x31ad, 0xf000 }, | ||
476 | { 0x31ae, 0x0000 }, | ||
477 | { 0x31af, 0xf000 }, | ||
478 | { 0x31b0, 0x0000 }, | ||
479 | { 0x31b1, 0xf000 }, | ||
480 | { 0x31b2, 0x0000 }, | ||
481 | { 0x31b3, 0xf000 }, | ||
482 | { 0x31b4, 0x0000 }, | ||
483 | { 0x31b5, 0xf000 }, | ||
484 | { 0x31b6, 0x0000 }, | ||
485 | { 0x31b7, 0xf000 }, | ||
486 | { 0x31b8, 0x0000 }, | ||
487 | { 0x31b9, 0xf000 }, | ||
488 | { 0x31ba, 0x0000 }, | ||
489 | { 0x31bb, 0xf000 }, | ||
490 | { 0x31bc, 0x0000 }, | ||
491 | { 0x31bd, 0xf000 }, | ||
492 | { 0x31be, 0x0000 }, | ||
493 | { 0x31bf, 0xf000 }, | ||
494 | { 0x31c0, 0x0000 }, | ||
495 | { 0x31c1, 0xf000 }, | ||
496 | { 0x31c2, 0x0000 }, | ||
497 | { 0x31c3, 0xf000 }, | ||
498 | { 0x31c4, 0x0000 }, | ||
499 | { 0x31c5, 0xf000 }, | ||
500 | { 0x31c6, 0x0000 }, | ||
501 | { 0x31c7, 0xf000 }, | ||
502 | { 0x31c8, 0x0000 }, | ||
503 | { 0x31c9, 0xf000 }, | ||
504 | { 0x31ca, 0x0000 }, | ||
505 | { 0x31cb, 0xf000 }, | ||
506 | { 0x31cc, 0x0000 }, | ||
507 | { 0x31cd, 0xf000 }, | ||
508 | { 0x31ce, 0x0000 }, | ||
509 | { 0x31cf, 0xf000 }, | ||
510 | { 0x31d0, 0x0000 }, | ||
511 | { 0x31d1, 0xf000 }, | ||
512 | { 0x31d2, 0x0000 }, | ||
513 | { 0x31d3, 0xf000 }, | ||
514 | { 0x31d4, 0x0000 }, | ||
515 | { 0x31d5, 0xf000 }, | ||
516 | { 0x31d6, 0x0000 }, | ||
517 | { 0x31d7, 0xf000 }, | ||
518 | { 0x31d8, 0x0000 }, | ||
519 | { 0x31d9, 0xf000 }, | ||
520 | { 0x31da, 0x0000 }, | ||
521 | { 0x31db, 0xf000 }, | ||
522 | { 0x31dc, 0x0000 }, | ||
523 | { 0x31dd, 0xf000 }, | ||
524 | { 0x31de, 0x0000 }, | ||
525 | { 0x31df, 0xf000 }, | ||
526 | { 0x31e0, 0x0000 }, | ||
527 | { 0x31e1, 0xf000 }, | ||
528 | { 0x31e2, 0x0000 }, | ||
529 | { 0x31e3, 0xf000 }, | ||
530 | { 0x31e4, 0x0000 }, | ||
531 | { 0x31e5, 0xf000 }, | ||
532 | { 0x31e6, 0x0000 }, | ||
533 | { 0x31e7, 0xf000 }, | ||
534 | { 0x31e8, 0x0000 }, | ||
535 | { 0x31e9, 0xf000 }, | ||
536 | { 0x31ea, 0x0000 }, | ||
537 | { 0x31eb, 0xf000 }, | ||
538 | { 0x31ec, 0x0000 }, | ||
539 | { 0x31ed, 0xf000 }, | ||
540 | { 0x31ee, 0x0000 }, | ||
541 | { 0x31ef, 0xf000 }, | ||
542 | { 0x31f0, 0x0000 }, | ||
543 | { 0x31f1, 0xf000 }, | ||
544 | { 0x31f2, 0x0000 }, | ||
545 | { 0x31f3, 0xf000 }, | ||
546 | { 0x31f4, 0x0000 }, | ||
547 | { 0x31f5, 0xf000 }, | ||
548 | { 0x31f6, 0x0000 }, | ||
549 | { 0x31f7, 0xf000 }, | ||
550 | { 0x31f8, 0x0000 }, | ||
551 | { 0x31f9, 0xf000 }, | ||
552 | { 0x31fa, 0x0000 }, | ||
553 | { 0x31fb, 0xf000 }, | ||
554 | { 0x31fc, 0x0000 }, | ||
555 | { 0x31fd, 0xf000 }, | ||
556 | { 0x31fe, 0x0000 }, | ||
557 | { 0x31ff, 0xf000 }, | ||
558 | { 0x024d, 0xff50 }, | ||
559 | { 0x0252, 0xff50 }, | ||
560 | { 0x0259, 0x0112 }, | ||
561 | { 0x025e, 0x0112 }, | ||
562 | }; | ||
563 | |||
564 | static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w, | ||
565 | struct snd_kcontrol *kcontrol, int event) | ||
566 | { | ||
567 | struct snd_soc_codec *codec = w->codec; | ||
568 | struct arizona *arizona = dev_get_drvdata(codec->dev); | ||
569 | struct regmap *regmap = codec->control_data; | ||
570 | const struct reg_default *patch = NULL; | ||
571 | int i, patch_size; | ||
572 | |||
573 | switch (arizona->rev) { | ||
574 | case 0: | ||
575 | patch = wm5102_sysclk_reva_patch; | ||
576 | patch_size = ARRAY_SIZE(wm5102_sysclk_reva_patch); | ||
577 | break; | ||
578 | } | ||
579 | |||
580 | switch (event) { | ||
581 | case SND_SOC_DAPM_POST_PMU: | ||
582 | if (patch) | ||
583 | for (i = 0; i < patch_size; i++) | ||
584 | regmap_write(regmap, patch[i].reg, | ||
585 | patch[i].def); | ||
586 | break; | ||
587 | |||
588 | default: | ||
589 | break; | ||
590 | } | ||
591 | |||
592 | return 0; | ||
593 | } | ||
594 | |||
45 | static const struct snd_kcontrol_new wm5102_snd_controls[] = { | 595 | static const struct snd_kcontrol_new wm5102_snd_controls[] = { |
46 | SOC_SINGLE("IN1 High Performance Switch", ARIZONA_IN1L_CONTROL, | 596 | SOC_SINGLE("IN1 High Performance Switch", ARIZONA_IN1L_CONTROL, |
47 | ARIZONA_IN1_OSR_SHIFT, 1, 0), | 597 | ARIZONA_IN1_OSR_SHIFT, 1, 0), |
@@ -297,7 +847,7 @@ static const struct snd_kcontrol_new wm5102_aec_loopback_mux = | |||
297 | 847 | ||
298 | static const struct snd_soc_dapm_widget wm5102_dapm_widgets[] = { | 848 | static const struct snd_soc_dapm_widget wm5102_dapm_widgets[] = { |
299 | SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, | 849 | SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, |
300 | 0, NULL, 0), | 850 | 0, wm5102_sysclk_ev, SND_SOC_DAPM_POST_PMU), |
301 | SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1, | 851 | SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1, |
302 | ARIZONA_ASYNC_CLK_ENA_SHIFT, 0, NULL, 0), | 852 | ARIZONA_ASYNC_CLK_ENA_SHIFT, 0, NULL, 0), |
303 | SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK, | 853 | SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK, |
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 5421fd9fbcb5..4c0a8e496131 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c | |||
@@ -782,7 +782,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream, | |||
782 | wm8978->mclk_idx = -1; | 782 | wm8978->mclk_idx = -1; |
783 | f_sel = wm8978->f_mclk; | 783 | f_sel = wm8978->f_mclk; |
784 | } else { | 784 | } else { |
785 | if (!wm8978->f_pllout) { | 785 | if (!wm8978->f_opclk) { |
786 | /* We only enter here, if OPCLK is not used */ | 786 | /* We only enter here, if OPCLK is not used */ |
787 | int ret = wm8978_configure_pll(codec); | 787 | int ret = wm8978_configure_pll(codec); |
788 | if (ret < 0) | 788 | if (ret < 0) |
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c index b9f16598324c..2ba08148655f 100644 --- a/sound/soc/kirkwood/kirkwood-dma.c +++ b/sound/soc/kirkwood/kirkwood-dma.c | |||
@@ -71,7 +71,6 @@ static irqreturn_t kirkwood_dma_irq(int irq, void *dev_id) | |||
71 | printk(KERN_WARNING "%s: got err interrupt 0x%lx\n", | 71 | printk(KERN_WARNING "%s: got err interrupt 0x%lx\n", |
72 | __func__, cause); | 72 | __func__, cause); |
73 | writel(cause, priv->io + KIRKWOOD_ERR_CAUSE); | 73 | writel(cause, priv->io + KIRKWOOD_ERR_CAUSE); |
74 | return IRQ_HANDLED; | ||
75 | } | 74 | } |
76 | 75 | ||
77 | /* we've enabled only bytes interrupts ... */ | 76 | /* we've enabled only bytes interrupts ... */ |
@@ -178,7 +177,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream) | |||
178 | } | 177 | } |
179 | 178 | ||
180 | dram = mv_mbus_dram_info(); | 179 | dram = mv_mbus_dram_info(); |
181 | addr = virt_to_phys(substream->dma_buffer.area); | 180 | addr = substream->dma_buffer.addr; |
182 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 181 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
183 | prdata->play_stream = substream; | 182 | prdata->play_stream = substream; |
184 | kirkwood_dma_conf_mbus_windows(priv->io, | 183 | kirkwood_dma_conf_mbus_windows(priv->io, |
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 542538d10ab7..1d5db484d2df 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c | |||
@@ -95,7 +95,7 @@ static inline void kirkwood_set_dco(void __iomem *io, unsigned long rate) | |||
95 | do { | 95 | do { |
96 | cpu_relax(); | 96 | cpu_relax(); |
97 | value = readl(io + KIRKWOOD_DCO_SPCR_STATUS); | 97 | value = readl(io + KIRKWOOD_DCO_SPCR_STATUS); |
98 | value &= KIRKWOOD_DCO_SPCR_STATUS; | 98 | value &= KIRKWOOD_DCO_SPCR_STATUS_DCO_LOCK; |
99 | } while (value == 0); | 99 | } while (value == 0); |
100 | } | 100 | } |
101 | 101 | ||
@@ -180,67 +180,72 @@ static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream, | |||
180 | int cmd, struct snd_soc_dai *dai) | 180 | int cmd, struct snd_soc_dai *dai) |
181 | { | 181 | { |
182 | struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai); | 182 | struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai); |
183 | unsigned long value; | 183 | uint32_t ctl, value; |
184 | 184 | ||
185 | /* | 185 | ctl = readl(priv->io + KIRKWOOD_PLAYCTL); |
186 | * specs says KIRKWOOD_PLAYCTL must be read 2 times before | 186 | if (ctl & KIRKWOOD_PLAYCTL_PAUSE) { |
187 | * changing it. So read 1 time here and 1 later. | 187 | unsigned timeout = 5000; |
188 | */ | 188 | /* |
189 | value = readl(priv->io + KIRKWOOD_PLAYCTL); | 189 | * The Armada510 spec says that if we enter pause mode, the |
190 | * busy bit must be read back as clear _twice_. Make sure | ||
191 | * we respect that otherwise we get DMA underruns. | ||
192 | */ | ||
193 | do { | ||
194 | value = ctl; | ||
195 | ctl = readl(priv->io + KIRKWOOD_PLAYCTL); | ||
196 | if (!((ctl | value) & KIRKWOOD_PLAYCTL_PLAY_BUSY)) | ||
197 | break; | ||
198 | udelay(1); | ||
199 | } while (timeout--); | ||
200 | |||
201 | if ((ctl | value) & KIRKWOOD_PLAYCTL_PLAY_BUSY) | ||
202 | dev_notice(dai->dev, "timed out waiting for busy to deassert: %08x\n", | ||
203 | ctl); | ||
204 | } | ||
190 | 205 | ||
191 | switch (cmd) { | 206 | switch (cmd) { |
192 | case SNDRV_PCM_TRIGGER_START: | 207 | case SNDRV_PCM_TRIGGER_START: |
193 | /* stop audio, enable interrupts */ | ||
194 | value = readl(priv->io + KIRKWOOD_PLAYCTL); | ||
195 | value |= KIRKWOOD_PLAYCTL_PAUSE; | ||
196 | writel(value, priv->io + KIRKWOOD_PLAYCTL); | ||
197 | |||
198 | value = readl(priv->io + KIRKWOOD_INT_MASK); | 208 | value = readl(priv->io + KIRKWOOD_INT_MASK); |
199 | value |= KIRKWOOD_INT_CAUSE_PLAY_BYTES; | 209 | value |= KIRKWOOD_INT_CAUSE_PLAY_BYTES; |
200 | writel(value, priv->io + KIRKWOOD_INT_MASK); | 210 | writel(value, priv->io + KIRKWOOD_INT_MASK); |
201 | 211 | ||
202 | /* configure audio & enable i2s playback */ | 212 | /* configure audio & enable i2s playback */ |
203 | value = readl(priv->io + KIRKWOOD_PLAYCTL); | 213 | ctl &= ~KIRKWOOD_PLAYCTL_BURST_MASK; |
204 | value &= ~KIRKWOOD_PLAYCTL_BURST_MASK; | 214 | ctl &= ~(KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE |
205 | value &= ~(KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE | ||
206 | | KIRKWOOD_PLAYCTL_SPDIF_EN); | 215 | | KIRKWOOD_PLAYCTL_SPDIF_EN); |
207 | 216 | ||
208 | if (priv->burst == 32) | 217 | if (priv->burst == 32) |
209 | value |= KIRKWOOD_PLAYCTL_BURST_32; | 218 | ctl |= KIRKWOOD_PLAYCTL_BURST_32; |
210 | else | 219 | else |
211 | value |= KIRKWOOD_PLAYCTL_BURST_128; | 220 | ctl |= KIRKWOOD_PLAYCTL_BURST_128; |
212 | value |= KIRKWOOD_PLAYCTL_I2S_EN; | 221 | ctl |= KIRKWOOD_PLAYCTL_I2S_EN; |
213 | writel(value, priv->io + KIRKWOOD_PLAYCTL); | 222 | writel(ctl, priv->io + KIRKWOOD_PLAYCTL); |
214 | break; | 223 | break; |
215 | 224 | ||
216 | case SNDRV_PCM_TRIGGER_STOP: | 225 | case SNDRV_PCM_TRIGGER_STOP: |
217 | /* stop audio, disable interrupts */ | 226 | /* stop audio, disable interrupts */ |
218 | value = readl(priv->io + KIRKWOOD_PLAYCTL); | 227 | ctl |= KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE; |
219 | value |= KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE; | 228 | writel(ctl, priv->io + KIRKWOOD_PLAYCTL); |
220 | writel(value, priv->io + KIRKWOOD_PLAYCTL); | ||
221 | 229 | ||
222 | value = readl(priv->io + KIRKWOOD_INT_MASK); | 230 | value = readl(priv->io + KIRKWOOD_INT_MASK); |
223 | value &= ~KIRKWOOD_INT_CAUSE_PLAY_BYTES; | 231 | value &= ~KIRKWOOD_INT_CAUSE_PLAY_BYTES; |
224 | writel(value, priv->io + KIRKWOOD_INT_MASK); | 232 | writel(value, priv->io + KIRKWOOD_INT_MASK); |
225 | 233 | ||
226 | /* disable all playbacks */ | 234 | /* disable all playbacks */ |
227 | value = readl(priv->io + KIRKWOOD_PLAYCTL); | 235 | ctl &= ~(KIRKWOOD_PLAYCTL_I2S_EN | KIRKWOOD_PLAYCTL_SPDIF_EN); |
228 | value &= ~(KIRKWOOD_PLAYCTL_I2S_EN | KIRKWOOD_PLAYCTL_SPDIF_EN); | 236 | writel(ctl, priv->io + KIRKWOOD_PLAYCTL); |
229 | writel(value, priv->io + KIRKWOOD_PLAYCTL); | ||
230 | break; | 237 | break; |
231 | 238 | ||
232 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: | 239 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: |
233 | case SNDRV_PCM_TRIGGER_SUSPEND: | 240 | case SNDRV_PCM_TRIGGER_SUSPEND: |
234 | value = readl(priv->io + KIRKWOOD_PLAYCTL); | 241 | ctl |= KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE; |
235 | value |= KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE; | 242 | writel(ctl, priv->io + KIRKWOOD_PLAYCTL); |
236 | writel(value, priv->io + KIRKWOOD_PLAYCTL); | ||
237 | break; | 243 | break; |
238 | 244 | ||
239 | case SNDRV_PCM_TRIGGER_RESUME: | 245 | case SNDRV_PCM_TRIGGER_RESUME: |
240 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | 246 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: |
241 | value = readl(priv->io + KIRKWOOD_PLAYCTL); | 247 | ctl &= ~(KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE); |
242 | value &= ~(KIRKWOOD_PLAYCTL_PAUSE | KIRKWOOD_PLAYCTL_I2S_MUTE); | 248 | writel(ctl, priv->io + KIRKWOOD_PLAYCTL); |
243 | writel(value, priv->io + KIRKWOOD_PLAYCTL); | ||
244 | break; | 249 | break; |
245 | 250 | ||
246 | default: | 251 | default: |
@@ -260,11 +265,6 @@ static int kirkwood_i2s_rec_trigger(struct snd_pcm_substream *substream, | |||
260 | 265 | ||
261 | switch (cmd) { | 266 | switch (cmd) { |
262 | case SNDRV_PCM_TRIGGER_START: | 267 | case SNDRV_PCM_TRIGGER_START: |
263 | /* stop audio, enable interrupts */ | ||
264 | value = readl(priv->io + KIRKWOOD_RECCTL); | ||
265 | value |= KIRKWOOD_RECCTL_PAUSE; | ||
266 | writel(value, priv->io + KIRKWOOD_RECCTL); | ||
267 | |||
268 | value = readl(priv->io + KIRKWOOD_INT_MASK); | 268 | value = readl(priv->io + KIRKWOOD_INT_MASK); |
269 | value |= KIRKWOOD_INT_CAUSE_REC_BYTES; | 269 | value |= KIRKWOOD_INT_CAUSE_REC_BYTES; |
270 | writel(value, priv->io + KIRKWOOD_INT_MASK); | 270 | writel(value, priv->io + KIRKWOOD_INT_MASK); |
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index aa037b292f3d..c294fbb523fc 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c | |||
@@ -523,16 +523,24 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd, | |||
523 | 523 | ||
524 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 524 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
525 | /* | 525 | /* |
526 | * write a data to saif data register to trigger | 526 | * write data to saif data register to trigger |
527 | * the transfer | 527 | * the transfer. |
528 | * For 24-bit format the 32-bit FIFO register stores | ||
529 | * only one channel, so we need to write twice. | ||
530 | * This is also safe for the other non 24-bit formats. | ||
528 | */ | 531 | */ |
529 | __raw_writel(0, saif->base + SAIF_DATA); | 532 | __raw_writel(0, saif->base + SAIF_DATA); |
533 | __raw_writel(0, saif->base + SAIF_DATA); | ||
530 | } else { | 534 | } else { |
531 | /* | 535 | /* |
532 | * read a data from saif data register to trigger | 536 | * read data from saif data register to trigger |
533 | * the receive | 537 | * the receive. |
538 | * For 24-bit format the 32-bit FIFO register stores | ||
539 | * only one channel, so we need to read twice. | ||
540 | * This is also safe for the other non 24-bit formats. | ||
534 | */ | 541 | */ |
535 | __raw_readl(saif->base + SAIF_DATA); | 542 | __raw_readl(saif->base + SAIF_DATA); |
543 | __raw_readl(saif->base + SAIF_DATA); | ||
536 | } | 544 | } |
537 | 545 | ||
538 | master_saif->ongoing = 1; | 546 | master_saif->ongoing = 1; |
@@ -812,3 +820,4 @@ module_platform_driver(mxs_saif_driver); | |||
812 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); | 820 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); |
813 | MODULE_DESCRIPTION("MXS ASoC SAIF driver"); | 821 | MODULE_DESCRIPTION("MXS ASoC SAIF driver"); |
814 | MODULE_LICENSE("GPL"); | 822 | MODULE_LICENSE("GPL"); |
823 | MODULE_ALIAS("platform:mxs-saif"); | ||
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig index e7b83179aca2..3c7c3a59ed39 100644 --- a/sound/soc/samsung/Kconfig +++ b/sound/soc/samsung/Kconfig | |||
@@ -207,6 +207,8 @@ config SND_SOC_BELLS | |||
207 | select SND_SOC_WM5102 | 207 | select SND_SOC_WM5102 |
208 | select SND_SOC_WM5110 | 208 | select SND_SOC_WM5110 |
209 | select SND_SOC_WM9081 | 209 | select SND_SOC_WM9081 |
210 | select SND_SOC_WM0010 | ||
211 | select SND_SOC_WM1250_EV1 | ||
210 | 212 | ||
211 | config SND_SOC_LOWLAND | 213 | config SND_SOC_LOWLAND |
212 | tristate "Audio support for Wolfson Lowland" | 214 | tristate "Audio support for Wolfson Lowland" |
diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c index b0d46d63d55e..a2ca1567b9e4 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 = "wm5110-aif3", | 215 | .cpu_dai_name = "wm5102-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 |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index d1198627fc40..10d21be383f6 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -2786,8 +2786,9 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, | |||
2786 | val = (ucontrol->value.integer.value[0] + min) & mask; | 2786 | val = (ucontrol->value.integer.value[0] + min) & mask; |
2787 | val = val << shift; | 2787 | val = val << shift; |
2788 | 2788 | ||
2789 | if (snd_soc_update_bits_locked(codec, reg, val_mask, val)) | 2789 | err = snd_soc_update_bits_locked(codec, reg, val_mask, val); |
2790 | return err; | 2790 | if (err < 0) |
2791 | return err; | ||
2791 | 2792 | ||
2792 | if (snd_soc_volsw_is_stereo(mc)) { | 2793 | if (snd_soc_volsw_is_stereo(mc)) { |
2793 | val_mask = mask << rshift; | 2794 | val_mask = mask << rshift; |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index d0a4be38dc0f..6e35bcae02df 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -3745,7 +3745,7 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card) | |||
3745 | { | 3745 | { |
3746 | struct snd_soc_codec *codec; | 3746 | struct snd_soc_codec *codec; |
3747 | 3747 | ||
3748 | list_for_each_entry(codec, &card->codec_dev_list, list) { | 3748 | list_for_each_entry(codec, &card->codec_dev_list, card_list) { |
3749 | soc_dapm_shutdown_codec(&codec->dapm); | 3749 | soc_dapm_shutdown_codec(&codec->dapm); |
3750 | if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) | 3750 | if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) |
3751 | snd_soc_dapm_set_bias_level(&codec->dapm, | 3751 | snd_soc_dapm_set_bias_level(&codec->dapm, |
diff --git a/sound/usb/card.c b/sound/usb/card.c index 282f0fc9fed1..dbf7999d18b4 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
@@ -559,9 +559,11 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, | |||
559 | return; | 559 | return; |
560 | 560 | ||
561 | card = chip->card; | 561 | card = chip->card; |
562 | mutex_lock(®ister_mutex); | ||
563 | down_write(&chip->shutdown_rwsem); | 562 | down_write(&chip->shutdown_rwsem); |
564 | chip->shutdown = 1; | 563 | chip->shutdown = 1; |
564 | up_write(&chip->shutdown_rwsem); | ||
565 | |||
566 | mutex_lock(®ister_mutex); | ||
565 | chip->num_interfaces--; | 567 | chip->num_interfaces--; |
566 | if (chip->num_interfaces <= 0) { | 568 | if (chip->num_interfaces <= 0) { |
567 | snd_card_disconnect(card); | 569 | snd_card_disconnect(card); |
@@ -582,11 +584,9 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, | |||
582 | snd_usb_mixer_disconnect(p); | 584 | snd_usb_mixer_disconnect(p); |
583 | } | 585 | } |
584 | usb_chip[chip->index] = NULL; | 586 | usb_chip[chip->index] = NULL; |
585 | up_write(&chip->shutdown_rwsem); | ||
586 | mutex_unlock(®ister_mutex); | 587 | mutex_unlock(®ister_mutex); |
587 | snd_card_free_when_closed(card); | 588 | snd_card_free_when_closed(card); |
588 | } else { | 589 | } else { |
589 | up_write(&chip->shutdown_rwsem); | ||
590 | mutex_unlock(®ister_mutex); | 590 | mutex_unlock(®ister_mutex); |
591 | } | 591 | } |
592 | } | 592 | } |
diff --git a/sound/usb/midi.c b/sound/usb/midi.c index c83f6143c0eb..eeefbce3873c 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c | |||
@@ -148,6 +148,7 @@ struct snd_usb_midi_out_endpoint { | |||
148 | struct snd_usb_midi_out_endpoint* ep; | 148 | struct snd_usb_midi_out_endpoint* ep; |
149 | struct snd_rawmidi_substream *substream; | 149 | struct snd_rawmidi_substream *substream; |
150 | int active; | 150 | int active; |
151 | bool autopm_reference; | ||
151 | uint8_t cable; /* cable number << 4 */ | 152 | uint8_t cable; /* cable number << 4 */ |
152 | uint8_t state; | 153 | uint8_t state; |
153 | #define STATE_UNKNOWN 0 | 154 | #define STATE_UNKNOWN 0 |
@@ -1076,7 +1077,8 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream) | |||
1076 | return -ENXIO; | 1077 | return -ENXIO; |
1077 | } | 1078 | } |
1078 | err = usb_autopm_get_interface(umidi->iface); | 1079 | err = usb_autopm_get_interface(umidi->iface); |
1079 | if (err < 0) | 1080 | port->autopm_reference = err >= 0; |
1081 | if (err < 0 && err != -EACCES) | ||
1080 | return -EIO; | 1082 | return -EIO; |
1081 | substream->runtime->private_data = port; | 1083 | substream->runtime->private_data = port; |
1082 | port->state = STATE_UNKNOWN; | 1084 | port->state = STATE_UNKNOWN; |
@@ -1087,9 +1089,11 @@ static int snd_usbmidi_output_open(struct snd_rawmidi_substream *substream) | |||
1087 | static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream) | 1089 | static int snd_usbmidi_output_close(struct snd_rawmidi_substream *substream) |
1088 | { | 1090 | { |
1089 | struct snd_usb_midi* umidi = substream->rmidi->private_data; | 1091 | struct snd_usb_midi* umidi = substream->rmidi->private_data; |
1092 | struct usbmidi_out_port *port = substream->runtime->private_data; | ||
1090 | 1093 | ||
1091 | substream_open(substream, 0); | 1094 | substream_open(substream, 0); |
1092 | usb_autopm_put_interface(umidi->iface); | 1095 | if (port->autopm_reference) |
1096 | usb_autopm_put_interface(umidi->iface); | ||
1093 | return 0; | 1097 | return 0; |
1094 | } | 1098 | } |
1095 | 1099 | ||
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 5c12a3fe8c3e..ef6fa24fc473 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
@@ -459,7 +459,7 @@ static int configure_endpoint(struct snd_usb_substream *subs) | |||
459 | return ret; | 459 | return ret; |
460 | 460 | ||
461 | if (subs->sync_endpoint) | 461 | if (subs->sync_endpoint) |
462 | ret = snd_usb_endpoint_set_params(subs->data_endpoint, | 462 | ret = snd_usb_endpoint_set_params(subs->sync_endpoint, |
463 | subs->pcm_format, | 463 | subs->pcm_format, |
464 | subs->channels, | 464 | subs->channels, |
465 | subs->period_bytes, | 465 | subs->period_bytes, |