aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-22 13:57:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-22 13:57:31 -0500
commite48f88a30de46c311d1c9493b5448332ebc1eb9b (patch)
tree890423060880df9bcd7883fbf54356f1afcf6d2d
parentaecde27c4fc4939f7c16ae13645f896438190567 (diff)
parent5db4d34b54c7726253926223580c516f244f9c31 (diff)
Merge tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull second set of sound fixes from Takashi Iwai: "A collection of small fixes in HD-audio quirks and runtime PM, ASoC rcar, abs8500 and other codecs. Most of commits are for stable kernels, too" * tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial) ALSA: hda - Provide missing pin configs for VAIO with ALC260 ALSA: hda - Add headset quirk for Dell Inspiron 3135 ALSA: hda - Fix the headphone jack detection on Sony VAIO TX ALSA: hda - Fix missing bass speaker on ASUS N550 ALSA: hda - Fix unbalanced runtime PM notification at resume ASoC: arizona: Set FLL to free-run before disabling ALSA: hda - A casual Dell Headset quirk ASoC: rcar: fixup dma_async_issue_pending() timing ASoC: rcar: off by one in rsnd_scu_set_route() ASoC: wm5110: Add post SYSCLK register patch for rev D chip ASoC: ab8500: Revert to using custom I/O functions ALSA: hda - Also enable mute/micmute LED control for "Lenovo dock" fixup ALSA: firewire-lib: include sound/asound.h to refer to snd_pcm_format_t ALSA: hda - Select FW_LOADER from CONFIG_SND_HDA_CODEC_CA0132_DSP ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Realtek codec ASoC: rcar: fixup mod access before checking
-rw-r--r--sound/firewire/amdtp.h1
-rw-r--r--sound/pci/hda/Kconfig3
-rw-r--r--sound/pci/hda/hda_codec.c4
-rw-r--r--sound/pci/hda/patch_realtek.c72
-rw-r--r--sound/soc/codecs/ab8500-codec.c66
-rw-r--r--sound/soc/codecs/arizona.c4
-rw-r--r--sound/soc/codecs/wm5110.c43
-rw-r--r--sound/soc/sh/rcar/core.c13
-rw-r--r--sound/soc/sh/rcar/scu.c2
9 files changed, 161 insertions, 47 deletions
diff --git a/sound/firewire/amdtp.h b/sound/firewire/amdtp.h
index 839ebf812d79..2746ecd291af 100644
--- a/sound/firewire/amdtp.h
+++ b/sound/firewire/amdtp.h
@@ -4,6 +4,7 @@
4#include <linux/err.h> 4#include <linux/err.h>
5#include <linux/interrupt.h> 5#include <linux/interrupt.h>
6#include <linux/mutex.h> 6#include <linux/mutex.h>
7#include <sound/asound.h>
7#include "packets-buffer.h" 8#include "packets-buffer.h"
8 9
9/** 10/**
diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig
index 8de66ccd7279..4cdd9ded4563 100644
--- a/sound/pci/hda/Kconfig
+++ b/sound/pci/hda/Kconfig
@@ -209,8 +209,9 @@ config SND_HDA_CODEC_CA0132
209 209
210config SND_HDA_CODEC_CA0132_DSP 210config SND_HDA_CODEC_CA0132_DSP
211 bool "Support new DSP code for CA0132 codec" 211 bool "Support new DSP code for CA0132 codec"
212 depends on SND_HDA_CODEC_CA0132 && FW_LOADER 212 depends on SND_HDA_CODEC_CA0132
213 select SND_HDA_DSP_LOADER 213 select SND_HDA_DSP_LOADER
214 select FW_LOADER
214 help 215 help
215 Say Y here to enable the DSP for Creative CA0132 for extended 216 Say Y here to enable the DSP for Creative CA0132 for extended
216 features like equalizer or echo cancellation. 217 features like equalizer or echo cancellation.
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index afb90f48867f..69178c4f4113 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -4000,6 +4000,10 @@ static void hda_call_codec_resume(struct hda_codec *codec)
4000 * in the resume / power-save sequence 4000 * in the resume / power-save sequence
4001 */ 4001 */
4002 hda_keep_power_on(codec); 4002 hda_keep_power_on(codec);
4003 if (codec->pm_down_notified) {
4004 codec->pm_down_notified = 0;
4005 hda_call_pm_notify(codec->bus, true);
4006 }
4003 hda_set_power_state(codec, AC_PWRST_D0); 4007 hda_set_power_state(codec, AC_PWRST_D0);
4004 restore_shutup_pins(codec); 4008 restore_shutup_pins(codec);
4005 hda_exec_init_verbs(codec); 4009 hda_exec_init_verbs(codec);
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 04d1e6be600e..5e42059f10a1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1512,6 +1512,7 @@ enum {
1512 ALC260_FIXUP_KN1, 1512 ALC260_FIXUP_KN1,
1513 ALC260_FIXUP_FSC_S7020, 1513 ALC260_FIXUP_FSC_S7020,
1514 ALC260_FIXUP_FSC_S7020_JWSE, 1514 ALC260_FIXUP_FSC_S7020_JWSE,
1515 ALC260_FIXUP_VAIO_PINS,
1515}; 1516};
1516 1517
1517static void alc260_gpio1_automute(struct hda_codec *codec) 1518static void alc260_gpio1_automute(struct hda_codec *codec)
@@ -1652,6 +1653,24 @@ static const struct hda_fixup alc260_fixups[] = {
1652 .chained = true, 1653 .chained = true,
1653 .chain_id = ALC260_FIXUP_FSC_S7020, 1654 .chain_id = ALC260_FIXUP_FSC_S7020,
1654 }, 1655 },
1656 [ALC260_FIXUP_VAIO_PINS] = {
1657 .type = HDA_FIXUP_PINS,
1658 .v.pins = (const struct hda_pintbl[]) {
1659 /* Pin configs are missing completely on some VAIOs */
1660 { 0x0f, 0x01211020 },
1661 { 0x10, 0x0001003f },
1662 { 0x11, 0x411111f0 },
1663 { 0x12, 0x01a15930 },
1664 { 0x13, 0x411111f0 },
1665 { 0x14, 0x411111f0 },
1666 { 0x15, 0x411111f0 },
1667 { 0x16, 0x411111f0 },
1668 { 0x17, 0x411111f0 },
1669 { 0x18, 0x411111f0 },
1670 { 0x19, 0x411111f0 },
1671 { }
1672 }
1673 },
1655}; 1674};
1656 1675
1657static const struct snd_pci_quirk alc260_fixup_tbl[] = { 1676static const struct snd_pci_quirk alc260_fixup_tbl[] = {
@@ -1660,6 +1679,8 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = {
1660 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1), 1679 SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1),
1661 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), 1680 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750),
1662 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), 1681 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900),
1682 SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS),
1683 SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F),
1663 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020), 1684 SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020),
1664 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), 1685 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1),
1665 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1), 1686 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1),
@@ -3393,7 +3414,7 @@ static void alc_update_headset_mode_hook(struct hda_codec *codec,
3393static void alc_update_headset_jack_cb(struct hda_codec *codec, struct hda_jack_tbl *jack) 3414static void alc_update_headset_jack_cb(struct hda_codec *codec, struct hda_jack_tbl *jack)
3394{ 3415{
3395 struct alc_spec *spec = codec->spec; 3416 struct alc_spec *spec = codec->spec;
3396 spec->current_headset_type = ALC_HEADSET_MODE_UNKNOWN; 3417 spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
3397 snd_hda_gen_hp_automute(codec, jack); 3418 snd_hda_gen_hp_automute(codec, jack);
3398} 3419}
3399 3420
@@ -3652,9 +3673,29 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec,
3652#if IS_ENABLED(CONFIG_THINKPAD_ACPI) 3673#if IS_ENABLED(CONFIG_THINKPAD_ACPI)
3653 3674
3654#include <linux/thinkpad_acpi.h> 3675#include <linux/thinkpad_acpi.h>
3676#include <acpi/acpi.h>
3655 3677
3656static int (*led_set_func)(int, bool); 3678static int (*led_set_func)(int, bool);
3657 3679
3680static acpi_status acpi_check_cb(acpi_handle handle, u32 lvl, void *context,
3681 void **rv)
3682{
3683 bool *found = context;
3684 *found = true;
3685 return AE_OK;
3686}
3687
3688static bool is_thinkpad(struct hda_codec *codec)
3689{
3690 bool found = false;
3691 if (codec->subsystem_id >> 16 != 0x17aa)
3692 return false;
3693 if (ACPI_SUCCESS(acpi_get_devices("LEN0068", acpi_check_cb, &found, NULL)) && found)
3694 return true;
3695 found = false;
3696 return ACPI_SUCCESS(acpi_get_devices("IBM0068", acpi_check_cb, &found, NULL)) && found;
3697}
3698
3658static void update_tpacpi_mute_led(void *private_data, int enabled) 3699static void update_tpacpi_mute_led(void *private_data, int enabled)
3659{ 3700{
3660 if (led_set_func) 3701 if (led_set_func)
@@ -3680,6 +3721,8 @@ static void alc_fixup_thinkpad_acpi(struct hda_codec *codec,
3680 bool removefunc = false; 3721 bool removefunc = false;
3681 3722
3682 if (action == HDA_FIXUP_ACT_PROBE) { 3723 if (action == HDA_FIXUP_ACT_PROBE) {
3724 if (!is_thinkpad(codec))
3725 return;
3683 if (!led_set_func) 3726 if (!led_set_func)
3684 led_set_func = symbol_request(tpacpi_led_set); 3727 led_set_func = symbol_request(tpacpi_led_set);
3685 if (!led_set_func) { 3728 if (!led_set_func) {
@@ -3923,6 +3966,8 @@ static const struct hda_fixup alc269_fixups[] = {
3923 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = { 3966 [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = {
3924 .type = HDA_FIXUP_FUNC, 3967 .type = HDA_FIXUP_FUNC,
3925 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 3968 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
3969 .chained = true,
3970 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
3926 }, 3971 },
3927 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { 3972 [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = {
3928 .type = HDA_FIXUP_PINS, 3973 .type = HDA_FIXUP_PINS,
@@ -4027,6 +4072,8 @@ static const struct hda_fixup alc269_fixups[] = {
4027 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = { 4072 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST] = {
4028 .type = HDA_FIXUP_FUNC, 4073 .type = HDA_FIXUP_FUNC,
4029 .v.func = alc269_fixup_limit_int_mic_boost, 4074 .v.func = alc269_fixup_limit_int_mic_boost,
4075 .chained = true,
4076 .chain_id = ALC269_FIXUP_THINKPAD_ACPI,
4030 }, 4077 },
4031 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { 4078 [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = {
4032 .type = HDA_FIXUP_FUNC, 4079 .type = HDA_FIXUP_FUNC,
@@ -4070,8 +4117,6 @@ static const struct hda_fixup alc269_fixups[] = {
4070 [ALC269_FIXUP_THINKPAD_ACPI] = { 4117 [ALC269_FIXUP_THINKPAD_ACPI] = {
4071 .type = HDA_FIXUP_FUNC, 4118 .type = HDA_FIXUP_FUNC,
4072 .v.func = alc_fixup_thinkpad_acpi, 4119 .v.func = alc_fixup_thinkpad_acpi,
4073 .chained = true,
4074 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
4075 }, 4120 },
4076 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = { 4121 [ALC255_FIXUP_DELL1_MIC_NO_PRESENCE] = {
4077 .type = HDA_FIXUP_PINS, 4122 .type = HDA_FIXUP_PINS,
@@ -4128,6 +4173,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
4128 SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4173 SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
4129 SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4174 SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
4130 SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 4175 SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
4176 SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
4131 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), 4177 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS),
4132 SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 4178 SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
4133 SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), 4179 SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
@@ -4173,7 +4219,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
4173 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), 4219 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
4174 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4220 SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
4175 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4221 SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
4176 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), 4222 SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
4177 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4223 SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
4178 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4224 SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
4179 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), 4225 SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC),
@@ -4181,6 +4227,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
4181 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 4227 SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
4182 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), 4228 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
4183 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 4229 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
4230 SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI),
4184 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ 4231 SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
4185 4232
4186#if 0 4233#if 0
@@ -4698,6 +4745,8 @@ enum {
4698 ALC668_FIXUP_DELL_MIC_NO_PRESENCE, 4745 ALC668_FIXUP_DELL_MIC_NO_PRESENCE,
4699 ALC668_FIXUP_HEADSET_MODE, 4746 ALC668_FIXUP_HEADSET_MODE,
4700 ALC662_FIXUP_BASS_CHMAP, 4747 ALC662_FIXUP_BASS_CHMAP,
4748 ALC662_FIXUP_BASS_1A,
4749 ALC662_FIXUP_BASS_1A_CHMAP,
4701}; 4750};
4702 4751
4703static const struct hda_fixup alc662_fixups[] = { 4752static const struct hda_fixup alc662_fixups[] = {
@@ -4878,6 +4927,19 @@ static const struct hda_fixup alc662_fixups[] = {
4878 .chained = true, 4927 .chained = true,
4879 .chain_id = ALC662_FIXUP_ASUS_MODE4 4928 .chain_id = ALC662_FIXUP_ASUS_MODE4
4880 }, 4929 },
4930 [ALC662_FIXUP_BASS_1A] = {
4931 .type = HDA_FIXUP_PINS,
4932 .v.pins = (const struct hda_pintbl[]) {
4933 {0x1a, 0x80106111}, /* bass speaker */
4934 {}
4935 },
4936 },
4937 [ALC662_FIXUP_BASS_1A_CHMAP] = {
4938 .type = HDA_FIXUP_FUNC,
4939 .v.func = alc662_fixup_bass_chmap,
4940 .chained = true,
4941 .chain_id = ALC662_FIXUP_BASS_1A,
4942 },
4881}; 4943};
4882 4944
4883static const struct snd_pci_quirk alc662_fixup_tbl[] = { 4945static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -4890,8 +4952,10 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
4890 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), 4952 SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE),
4891 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4953 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4892 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4954 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4955 SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4893 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4956 SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4894 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 4957 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
4958 SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A_CHMAP),
4895 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP), 4959 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP),
4896 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_CHMAP), 4960 SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_BASS_CHMAP),
4897 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), 4961 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 21ae8d4fdbfb..1ad92cbf0b24 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -126,8 +126,6 @@ struct ab8500_codec_drvdata_dbg {
126 126
127/* Private data for AB8500 device-driver */ 127/* Private data for AB8500 device-driver */
128struct ab8500_codec_drvdata { 128struct ab8500_codec_drvdata {
129 struct regmap *regmap;
130
131 /* Sidetone */ 129 /* Sidetone */
132 long *sid_fir_values; 130 long *sid_fir_values;
133 enum sid_state sid_status; 131 enum sid_state sid_status;
@@ -168,34 +166,48 @@ static inline const char *amic_type_str(enum amic_type type)
168 */ 166 */
169 167
170/* Read a register from the audio-bank of AB8500 */ 168/* Read a register from the audio-bank of AB8500 */
171static int ab8500_codec_read_reg(void *context, unsigned int reg, 169static unsigned int ab8500_codec_read_reg(struct snd_soc_codec *codec,
172 unsigned int *value) 170 unsigned int reg)
173{ 171{
174 struct device *dev = context;
175 int status; 172 int status;
173 unsigned int value = 0;
176 174
177 u8 value8; 175 u8 value8;
178 status = abx500_get_register_interruptible(dev, AB8500_AUDIO, 176 status = abx500_get_register_interruptible(codec->dev, AB8500_AUDIO,
179 reg, &value8); 177 reg, &value8);
180 *value = (unsigned int)value8; 178 if (status < 0) {
179 dev_err(codec->dev,
180 "%s: ERROR: Register (0x%02x:0x%02x) read failed (%d).\n",
181 __func__, (u8)AB8500_AUDIO, (u8)reg, status);
182 } else {
183 dev_dbg(codec->dev,
184 "%s: Read 0x%02x from register 0x%02x:0x%02x\n",
185 __func__, value8, (u8)AB8500_AUDIO, (u8)reg);
186 value = (unsigned int)value8;
187 }
181 188
182 return status; 189 return value;
183} 190}
184 191
185/* Write to a register in the audio-bank of AB8500 */ 192/* Write to a register in the audio-bank of AB8500 */
186static int ab8500_codec_write_reg(void *context, unsigned int reg, 193static int ab8500_codec_write_reg(struct snd_soc_codec *codec,
187 unsigned int value) 194 unsigned int reg, unsigned int value)
188{ 195{
189 struct device *dev = context; 196 int status;
190 197
191 return abx500_set_register_interruptible(dev, AB8500_AUDIO, 198 status = abx500_set_register_interruptible(codec->dev, AB8500_AUDIO,
192 reg, value); 199 reg, value);
193} 200 if (status < 0)
201 dev_err(codec->dev,
202 "%s: ERROR: Register (%02x:%02x) write failed (%d).\n",
203 __func__, (u8)AB8500_AUDIO, (u8)reg, status);
204 else
205 dev_dbg(codec->dev,
206 "%s: Wrote 0x%02x into register %02x:%02x\n",
207 __func__, (u8)value, (u8)AB8500_AUDIO, (u8)reg);
194 208
195static const struct regmap_config ab8500_codec_regmap = { 209 return status;
196 .reg_read = ab8500_codec_read_reg, 210}
197 .reg_write = ab8500_codec_write_reg,
198};
199 211
200/* 212/*
201 * Controls - DAPM 213 * Controls - DAPM
@@ -2473,13 +2485,9 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)
2473 2485
2474 dev_dbg(dev, "%s: Enter.\n", __func__); 2486 dev_dbg(dev, "%s: Enter.\n", __func__);
2475 2487
2476 snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
2477
2478 /* Setup AB8500 according to board-settings */ 2488 /* Setup AB8500 according to board-settings */
2479 pdata = dev_get_platdata(dev->parent); 2489 pdata = dev_get_platdata(dev->parent);
2480 2490
2481 codec->control_data = drvdata->regmap;
2482
2483 if (np) { 2491 if (np) {
2484 if (!pdata) 2492 if (!pdata)
2485 pdata = devm_kzalloc(dev, 2493 pdata = devm_kzalloc(dev,
@@ -2557,6 +2565,9 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)
2557 2565
2558static struct snd_soc_codec_driver ab8500_codec_driver = { 2566static struct snd_soc_codec_driver ab8500_codec_driver = {
2559 .probe = ab8500_codec_probe, 2567 .probe = ab8500_codec_probe,
2568 .read = ab8500_codec_read_reg,
2569 .write = ab8500_codec_write_reg,
2570 .reg_word_size = sizeof(u8),
2560 .controls = ab8500_ctrls, 2571 .controls = ab8500_ctrls,
2561 .num_controls = ARRAY_SIZE(ab8500_ctrls), 2572 .num_controls = ARRAY_SIZE(ab8500_ctrls),
2562 .dapm_widgets = ab8500_dapm_widgets, 2573 .dapm_widgets = ab8500_dapm_widgets,
@@ -2581,15 +2592,6 @@ static int ab8500_codec_driver_probe(struct platform_device *pdev)
2581 drvdata->anc_status = ANC_UNCONFIGURED; 2592 drvdata->anc_status = ANC_UNCONFIGURED;
2582 dev_set_drvdata(&pdev->dev, drvdata); 2593 dev_set_drvdata(&pdev->dev, drvdata);
2583 2594
2584 drvdata->regmap = devm_regmap_init(&pdev->dev, NULL, &pdev->dev,
2585 &ab8500_codec_regmap);
2586 if (IS_ERR(drvdata->regmap)) {
2587 status = PTR_ERR(drvdata->regmap);
2588 dev_err(&pdev->dev, "%s: Failed to allocate regmap: %d\n",
2589 __func__, status);
2590 return status;
2591 }
2592
2593 dev_dbg(&pdev->dev, "%s: Register codec.\n", __func__); 2595 dev_dbg(&pdev->dev, "%s: Register codec.\n", __func__);
2594 status = snd_soc_register_codec(&pdev->dev, &ab8500_codec_driver, 2596 status = snd_soc_register_codec(&pdev->dev, &ab8500_codec_driver,
2595 ab8500_codec_dai, 2597 ab8500_codec_dai,
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 6f05b17d1965..fea991031be1 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1529,6 +1529,8 @@ static void arizona_enable_fll(struct arizona_fll *fll,
1529 try_wait_for_completion(&fll->ok); 1529 try_wait_for_completion(&fll->ok);
1530 1530
1531 regmap_update_bits(arizona->regmap, fll->base + 1, 1531 regmap_update_bits(arizona->regmap, fll->base + 1,
1532 ARIZONA_FLL1_FREERUN, 0);
1533 regmap_update_bits(arizona->regmap, fll->base + 1,
1532 ARIZONA_FLL1_ENA, ARIZONA_FLL1_ENA); 1534 ARIZONA_FLL1_ENA, ARIZONA_FLL1_ENA);
1533 if (use_sync) 1535 if (use_sync)
1534 regmap_update_bits(arizona->regmap, fll->base + 0x11, 1536 regmap_update_bits(arizona->regmap, fll->base + 0x11,
@@ -1546,6 +1548,8 @@ static void arizona_disable_fll(struct arizona_fll *fll)
1546 struct arizona *arizona = fll->arizona; 1548 struct arizona *arizona = fll->arizona;
1547 bool change; 1549 bool change;
1548 1550
1551 regmap_update_bits(arizona->regmap, fll->base + 1,
1552 ARIZONA_FLL1_FREERUN, ARIZONA_FLL1_FREERUN);
1549 regmap_update_bits_check(arizona->regmap, fll->base + 1, 1553 regmap_update_bits_check(arizona->regmap, fll->base + 1,
1550 ARIZONA_FLL1_ENA, 0, &change); 1554 ARIZONA_FLL1_ENA, 0, &change);
1551 regmap_update_bits(arizona->regmap, fll->base + 0x11, 1555 regmap_update_bits(arizona->regmap, fll->base + 0x11,
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index f2d1094424b9..c3c7396a6181 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -37,6 +37,47 @@ struct wm5110_priv {
37 struct arizona_fll fll[2]; 37 struct arizona_fll fll[2];
38}; 38};
39 39
40static const struct reg_default wm5110_sysclk_revd_patch[] = {
41 { 0x3093, 0x1001 },
42 { 0x30E3, 0x1301 },
43 { 0x3133, 0x1201 },
44 { 0x3183, 0x1501 },
45 { 0x31D3, 0x1401 },
46};
47
48static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w,
49 struct snd_kcontrol *kcontrol, int event)
50{
51 struct snd_soc_codec *codec = w->codec;
52 struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
53 struct regmap *regmap = codec->control_data;
54 const struct reg_default *patch = NULL;
55 int i, patch_size;
56
57 switch (arizona->rev) {
58 case 3:
59 patch = wm5110_sysclk_revd_patch;
60 patch_size = ARRAY_SIZE(wm5110_sysclk_revd_patch);
61 break;
62 default:
63 return 0;
64 }
65
66 switch (event) {
67 case SND_SOC_DAPM_POST_PMU:
68 if (patch)
69 for (i = 0; i < patch_size; i++)
70 regmap_write(regmap, patch[i].reg,
71 patch[i].def);
72 break;
73
74 default:
75 break;
76 }
77
78 return 0;
79}
80
40static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0); 81static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0);
41static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0); 82static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
42static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0); 83static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
@@ -400,7 +441,7 @@ static const struct snd_kcontrol_new wm5110_aec_loopback_mux =
400 441
401static const struct snd_soc_dapm_widget wm5110_dapm_widgets[] = { 442static const struct snd_soc_dapm_widget wm5110_dapm_widgets[] = {
402SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT, 443SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT,
403 0, NULL, 0), 444 0, wm5110_sysclk_ev, SND_SOC_DAPM_POST_PMU),
404SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1, 445SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1,
405 ARIZONA_ASYNC_CLK_ENA_SHIFT, 0, NULL, 0), 446 ARIZONA_ASYNC_CLK_ENA_SHIFT, 0, NULL, 0),
406SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK, 447SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK,
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 78c35b44fc04..b3653d37f75f 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -200,9 +200,8 @@ static void rsnd_dma_do_work(struct work_struct *work)
200 return; 200 return;
201 } 201 }
202 202
203 dma_async_issue_pending(dma->chan);
203 } 204 }
204
205 dma_async_issue_pending(dma->chan);
206} 205}
207 206
208int rsnd_dma_available(struct rsnd_dma *dma) 207int rsnd_dma_available(struct rsnd_dma *dma)
@@ -288,15 +287,13 @@ int rsnd_dai_connect(struct rsnd_dai *rdai,
288 struct rsnd_mod *mod, 287 struct rsnd_mod *mod,
289 struct rsnd_dai_stream *io) 288 struct rsnd_dai_stream *io)
290{ 289{
291 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); 290 if (!mod)
292 struct device *dev = rsnd_priv_to_dev(priv);
293
294 if (!mod) {
295 dev_err(dev, "NULL mod\n");
296 return -EIO; 291 return -EIO;
297 }
298 292
299 if (!list_empty(&mod->list)) { 293 if (!list_empty(&mod->list)) {
294 struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
295 struct device *dev = rsnd_priv_to_dev(priv);
296
300 dev_err(dev, "%s%d is not empty\n", 297 dev_err(dev, "%s%d is not empty\n",
301 rsnd_mod_name(mod), 298 rsnd_mod_name(mod),
302 rsnd_mod_id(mod)); 299 rsnd_mod_id(mod));
diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
index f4453e33a847..fa8fa15860b9 100644
--- a/sound/soc/sh/rcar/scu.c
+++ b/sound/soc/sh/rcar/scu.c
@@ -68,7 +68,7 @@ static int rsnd_scu_set_route(struct rsnd_priv *priv,
68 return 0; 68 return 0;
69 69
70 id = rsnd_mod_id(mod); 70 id = rsnd_mod_id(mod);
71 if (id < 0 || id > ARRAY_SIZE(routes)) 71 if (id < 0 || id >= ARRAY_SIZE(routes))
72 return -EIO; 72 return -EIO;
73 73
74 /* 74 /*