diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-11-16 10:42:59 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-11-16 10:42:59 -0500 |
commit | 57260e4088894de25bb1837d529708c3ec705a69 (patch) | |
tree | e7072aed15b203197549099371db55c5d4bc3c0a /sound | |
parent | 2d4d07b97c0b774ea9ce2a2105818208d3df7241 (diff) | |
parent | 3d5e2abe6e265acc5e1fda810301243e9bac92b2 (diff) |
Merge tag 'imx-fixes-rc' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes
From Sascha Hauer <s.hauer@pengutronix.de>:
ARM i.MX fixes for 3.7-rc
* tag 'imx-fixes-rc' of git://git.pengutronix.de/git/imx/linux-2.6:
ARM: imx: ehci: fix host power mask bit
ARM i.MX: fix error-valued pointer dereference in clk_register_gate2()
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/oss/mixer_oss.c | 1 | ||||
-rw-r--r-- | sound/core/oss/pcm_oss.c | 1 | ||||
-rw-r--r-- | sound/core/pcm_native.c | 6 | ||||
-rw-r--r-- | sound/core/sound.c | 2 | ||||
-rw-r--r-- | sound/core/sound_oss.c | 2 | ||||
-rw-r--r-- | sound/i2c/other/ak4113.c | 2 | ||||
-rw-r--r-- | sound/i2c/other/ak4114.c | 2 | ||||
-rw-r--r-- | sound/i2c/other/ak4117.c | 2 | ||||
-rw-r--r-- | sound/pci/es1968.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 21 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 26 | ||||
-rw-r--r-- | sound/pci/hda/patch_via.c | 36 | ||||
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 5 | ||||
-rw-r--r-- | sound/soc/codecs/cs42l52.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 2 | ||||
-rw-r--r-- | sound/usb/endpoint.c | 13 | ||||
-rw-r--r-- | sound/usb/endpoint.h | 1 | ||||
-rw-r--r-- | sound/usb/pcm.c | 3 |
20 files changed, 92 insertions, 40 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index a9a2e63c0222..e8a1d18774b2 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c | |||
@@ -76,6 +76,7 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file) | |||
76 | snd_card_unref(card); | 76 | snd_card_unref(card); |
77 | return -EFAULT; | 77 | return -EFAULT; |
78 | } | 78 | } |
79 | snd_card_unref(card); | ||
79 | return 0; | 80 | return 0; |
80 | } | 81 | } |
81 | 82 | ||
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index f337b66a020b..4c1cc51772e6 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -2454,6 +2454,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file) | |||
2454 | mutex_unlock(&pcm->open_mutex); | 2454 | mutex_unlock(&pcm->open_mutex); |
2455 | if (err < 0) | 2455 | if (err < 0) |
2456 | goto __error; | 2456 | goto __error; |
2457 | snd_card_unref(pcm->card); | ||
2457 | return err; | 2458 | return err; |
2458 | 2459 | ||
2459 | __error: | 2460 | __error: |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 6e8872de5ba0..f9ddecf2f4cd 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -2122,7 +2122,8 @@ static int snd_pcm_playback_open(struct inode *inode, struct file *file) | |||
2122 | pcm = snd_lookup_minor_data(iminor(inode), | 2122 | pcm = snd_lookup_minor_data(iminor(inode), |
2123 | SNDRV_DEVICE_TYPE_PCM_PLAYBACK); | 2123 | SNDRV_DEVICE_TYPE_PCM_PLAYBACK); |
2124 | err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK); | 2124 | err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK); |
2125 | snd_card_unref(pcm->card); | 2125 | if (pcm) |
2126 | snd_card_unref(pcm->card); | ||
2126 | return err; | 2127 | return err; |
2127 | } | 2128 | } |
2128 | 2129 | ||
@@ -2135,7 +2136,8 @@ static int snd_pcm_capture_open(struct inode *inode, struct file *file) | |||
2135 | pcm = snd_lookup_minor_data(iminor(inode), | 2136 | pcm = snd_lookup_minor_data(iminor(inode), |
2136 | SNDRV_DEVICE_TYPE_PCM_CAPTURE); | 2137 | SNDRV_DEVICE_TYPE_PCM_CAPTURE); |
2137 | err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE); | 2138 | err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE); |
2138 | snd_card_unref(pcm->card); | 2139 | if (pcm) |
2140 | snd_card_unref(pcm->card); | ||
2139 | return err; | 2141 | return err; |
2140 | } | 2142 | } |
2141 | 2143 | ||
diff --git a/sound/core/sound.c b/sound/core/sound.c index 89780c323f19..70ccdab74153 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -114,7 +114,7 @@ void *snd_lookup_minor_data(unsigned int minor, int type) | |||
114 | mreg = snd_minors[minor]; | 114 | mreg = snd_minors[minor]; |
115 | if (mreg && mreg->type == type) { | 115 | if (mreg && mreg->type == type) { |
116 | private_data = mreg->private_data; | 116 | private_data = mreg->private_data; |
117 | if (mreg->card_ptr) | 117 | if (private_data && mreg->card_ptr) |
118 | atomic_inc(&mreg->card_ptr->refcount); | 118 | atomic_inc(&mreg->card_ptr->refcount); |
119 | } else | 119 | } else |
120 | private_data = NULL; | 120 | private_data = NULL; |
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index e1d79ee35906..726a49ac9725 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c | |||
@@ -54,7 +54,7 @@ void *snd_lookup_oss_minor_data(unsigned int minor, int type) | |||
54 | mreg = snd_oss_minors[minor]; | 54 | mreg = snd_oss_minors[minor]; |
55 | if (mreg && mreg->type == type) { | 55 | if (mreg && mreg->type == type) { |
56 | private_data = mreg->private_data; | 56 | private_data = mreg->private_data; |
57 | if (mreg->card_ptr) | 57 | if (private_data && mreg->card_ptr) |
58 | atomic_inc(&mreg->card_ptr->refcount); | 58 | atomic_inc(&mreg->card_ptr->refcount); |
59 | } else | 59 | } else |
60 | private_data = NULL; | 60 | private_data = NULL; |
diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c index ef68d710d08c..e04e750a77ed 100644 --- a/sound/i2c/other/ak4113.c +++ b/sound/i2c/other/ak4113.c | |||
@@ -426,7 +426,7 @@ static struct snd_kcontrol_new snd_ak4113_iec958_controls[] = { | |||
426 | }, | 426 | }, |
427 | { | 427 | { |
428 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 428 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
429 | .name = "IEC958 Preample Capture Default", | 429 | .name = "IEC958 Preamble Capture Default", |
430 | .access = SNDRV_CTL_ELEM_ACCESS_READ | | 430 | .access = SNDRV_CTL_ELEM_ACCESS_READ | |
431 | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 431 | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
432 | .info = snd_ak4113_spdif_pinfo, | 432 | .info = snd_ak4113_spdif_pinfo, |
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c index 816e7d225fb0..5bf4fca19e48 100644 --- a/sound/i2c/other/ak4114.c +++ b/sound/i2c/other/ak4114.c | |||
@@ -401,7 +401,7 @@ static struct snd_kcontrol_new snd_ak4114_iec958_controls[] = { | |||
401 | }, | 401 | }, |
402 | { | 402 | { |
403 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 403 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
404 | .name = "IEC958 Preample Capture Default", | 404 | .name = "IEC958 Preamble Capture Default", |
405 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 405 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
406 | .info = snd_ak4114_spdif_pinfo, | 406 | .info = snd_ak4114_spdif_pinfo, |
407 | .get = snd_ak4114_spdif_pget, | 407 | .get = snd_ak4114_spdif_pget, |
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c index b4b2a51fc117..40e33c9f2b09 100644 --- a/sound/i2c/other/ak4117.c +++ b/sound/i2c/other/ak4117.c | |||
@@ -380,7 +380,7 @@ static struct snd_kcontrol_new snd_ak4117_iec958_controls[] = { | |||
380 | }, | 380 | }, |
381 | { | 381 | { |
382 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, | 382 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
383 | .name = "IEC958 Preample Capture Default", | 383 | .name = "IEC958 Preamble Capture Default", |
384 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, | 384 | .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, |
385 | .info = snd_ak4117_spdif_pinfo, | 385 | .info = snd_ak4117_spdif_pinfo, |
386 | .get = snd_ak4117_spdif_pget, | 386 | .get = snd_ak4117_spdif_pget, |
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index 5d0e568fdea1..50169bcfd903 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -2655,6 +2655,8 @@ static struct ess_device_list pm_whitelist[] __devinitdata = { | |||
2655 | { TYPE_MAESTRO2E, 0x1179 }, | 2655 | { TYPE_MAESTRO2E, 0x1179 }, |
2656 | { TYPE_MAESTRO2E, 0x14c0 }, /* HP omnibook 4150 */ | 2656 | { TYPE_MAESTRO2E, 0x14c0 }, /* HP omnibook 4150 */ |
2657 | { TYPE_MAESTRO2E, 0x1558 }, | 2657 | { TYPE_MAESTRO2E, 0x1558 }, |
2658 | { TYPE_MAESTRO2E, 0x125d }, /* a PCI card, e.g. Terratec DMX */ | ||
2659 | { TYPE_MAESTRO2, 0x125d }, /* a PCI card, e.g. SF64-PCE2 */ | ||
2658 | }; | 2660 | }; |
2659 | 2661 | ||
2660 | static struct ess_device_list mpu_blacklist[] __devinitdata = { | 2662 | static struct ess_device_list mpu_blacklist[] __devinitdata = { |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 72b085ae7d46..cd2dbaf1be78 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -3563,6 +3563,8 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { | |||
3563 | /* Teradici */ | 3563 | /* Teradici */ |
3564 | { PCI_DEVICE(0x6549, 0x1200), | 3564 | { PCI_DEVICE(0x6549, 0x1200), |
3565 | .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, | 3565 | .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, |
3566 | { PCI_DEVICE(0x6549, 0x2200), | ||
3567 | .driver_data = AZX_DRIVER_TERA | AZX_DCAPS_NO_64BIT }, | ||
3566 | /* Creative X-Fi (CA0110-IBG) */ | 3568 | /* Creative X-Fi (CA0110-IBG) */ |
3567 | /* CTHDA chips */ | 3569 | /* CTHDA chips */ |
3568 | { PCI_DEVICE(0x1102, 0x0010), | 3570 | { PCI_DEVICE(0x1102, 0x0010), |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index cdd43eadbc67..1eeba7386666 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -545,6 +545,7 @@ static int ad198x_build_pcms(struct hda_codec *codec) | |||
545 | if (spec->multiout.dig_out_nid) { | 545 | if (spec->multiout.dig_out_nid) { |
546 | info++; | 546 | info++; |
547 | codec->num_pcms++; | 547 | codec->num_pcms++; |
548 | codec->spdif_status_reset = 1; | ||
548 | info->name = "AD198x Digital"; | 549 | info->name = "AD198x Digital"; |
549 | info->pcm_type = HDA_PCM_TYPE_SPDIF; | 550 | info->pcm_type = HDA_PCM_TYPE_SPDIF; |
550 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad198x_pcm_digital_playback; | 551 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = ad198x_pcm_digital_playback; |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 61a71131711c..d5f3a26d608d 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -101,8 +101,8 @@ enum { | |||
101 | #define CS420X_VENDOR_NID 0x11 | 101 | #define CS420X_VENDOR_NID 0x11 |
102 | #define CS_DIG_OUT1_PIN_NID 0x10 | 102 | #define CS_DIG_OUT1_PIN_NID 0x10 |
103 | #define CS_DIG_OUT2_PIN_NID 0x15 | 103 | #define CS_DIG_OUT2_PIN_NID 0x15 |
104 | #define CS_DMIC1_PIN_NID 0x12 | 104 | #define CS_DMIC1_PIN_NID 0x0e |
105 | #define CS_DMIC2_PIN_NID 0x0e | 105 | #define CS_DMIC2_PIN_NID 0x12 |
106 | 106 | ||
107 | /* coef indices */ | 107 | /* coef indices */ |
108 | #define IDX_SPDIF_STAT 0x0000 | 108 | #define IDX_SPDIF_STAT 0x0000 |
@@ -1079,14 +1079,18 @@ static void init_input(struct hda_codec *codec) | |||
1079 | cs_automic(codec, NULL); | 1079 | cs_automic(codec, NULL); |
1080 | 1080 | ||
1081 | coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */ | 1081 | coef = 0x000a; /* ADC1/2 - Digital and Analog Soft Ramp */ |
1082 | cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); | ||
1083 | |||
1084 | coef = cs_vendor_coef_get(codec, IDX_BEEP_CFG); | ||
1082 | if (is_active_pin(codec, CS_DMIC2_PIN_NID)) | 1085 | if (is_active_pin(codec, CS_DMIC2_PIN_NID)) |
1083 | coef |= 0x0500; /* DMIC2 2 chan on, GPIO1 off */ | 1086 | coef |= 1 << 4; /* DMIC2 2 chan on, GPIO1 off */ |
1084 | if (is_active_pin(codec, CS_DMIC1_PIN_NID)) | 1087 | if (is_active_pin(codec, CS_DMIC1_PIN_NID)) |
1085 | coef |= 0x1800; /* DMIC1 2 chan on, GPIO0 off | 1088 | coef |= 1 << 3; /* DMIC1 2 chan on, GPIO0 off |
1086 | * No effect if SPDIF_OUT2 is | 1089 | * No effect if SPDIF_OUT2 is |
1087 | * selected in IDX_SPDIF_CTL. | 1090 | * selected in IDX_SPDIF_CTL. |
1088 | */ | 1091 | */ |
1089 | cs_vendor_coef_set(codec, IDX_ADC_CFG, coef); | 1092 | |
1093 | cs_vendor_coef_set(codec, IDX_BEEP_CFG, coef); | ||
1090 | } else { | 1094 | } else { |
1091 | if (spec->mic_detect) | 1095 | if (spec->mic_detect) |
1092 | cs_automic(codec, NULL); | 1096 | cs_automic(codec, NULL); |
@@ -1107,7 +1111,7 @@ static const struct hda_verb cs_coef_init_verbs[] = { | |||
1107 | | 0x0400 /* Disable Coefficient Auto increment */ | 1111 | | 0x0400 /* Disable Coefficient Auto increment */ |
1108 | )}, | 1112 | )}, |
1109 | /* Beep */ | 1113 | /* Beep */ |
1110 | {0x11, AC_VERB_SET_COEF_INDEX, IDX_DAC_CFG}, | 1114 | {0x11, AC_VERB_SET_COEF_INDEX, IDX_BEEP_CFG}, |
1111 | {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */ | 1115 | {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */ |
1112 | 1116 | ||
1113 | {} /* terminator */ | 1117 | {} /* terminator */ |
@@ -1728,8 +1732,7 @@ static int cs421x_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
1728 | 1732 | ||
1729 | } | 1733 | } |
1730 | 1734 | ||
1731 | static struct snd_kcontrol_new cs421x_capture_source = { | 1735 | static const struct snd_kcontrol_new cs421x_capture_source = { |
1732 | |||
1733 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 1736 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
1734 | .name = "Capture Source", | 1737 | .name = "Capture Source", |
1735 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, | 1738 | .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, |
@@ -1946,7 +1949,7 @@ static int cs421x_suspend(struct hda_codec *codec) | |||
1946 | } | 1949 | } |
1947 | #endif | 1950 | #endif |
1948 | 1951 | ||
1949 | static struct hda_codec_ops cs421x_patch_ops = { | 1952 | static const struct hda_codec_ops cs421x_patch_ops = { |
1950 | .build_controls = cs421x_build_controls, | 1953 | .build_controls = cs421x_build_controls, |
1951 | .build_pcms = cs_build_pcms, | 1954 | .build_pcms = cs_build_pcms, |
1952 | .init = cs421x_init, | 1955 | .init = cs421x_init, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f7397ad02a0d..c0ce3b1f04b4 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5840,7 +5840,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
5840 | return alc_parse_auto_config(codec, alc269_ignore, ssids); | 5840 | return alc_parse_auto_config(codec, alc269_ignore, ssids); |
5841 | } | 5841 | } |
5842 | 5842 | ||
5843 | static void alc269_toggle_power_output(struct hda_codec *codec, int power_up) | 5843 | static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) |
5844 | { | 5844 | { |
5845 | int val = alc_read_coef_idx(codec, 0x04); | 5845 | int val = alc_read_coef_idx(codec, 0x04); |
5846 | if (power_up) | 5846 | if (power_up) |
@@ -5857,10 +5857,10 @@ static void alc269_shutup(struct hda_codec *codec) | |||
5857 | if (spec->codec_variant != ALC269_TYPE_ALC269VB) | 5857 | if (spec->codec_variant != ALC269_TYPE_ALC269VB) |
5858 | return; | 5858 | return; |
5859 | 5859 | ||
5860 | if ((alc_get_coef0(codec) & 0x00ff) == 0x017) | 5860 | if (spec->codec_variant == ALC269_TYPE_ALC269VB) |
5861 | alc269_toggle_power_output(codec, 0); | 5861 | alc269vb_toggle_power_output(codec, 0); |
5862 | if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { | 5862 | if (spec->codec_variant == ALC269_TYPE_ALC269VB && |
5863 | alc269_toggle_power_output(codec, 0); | 5863 | (alc_get_coef0(codec) & 0x00ff) == 0x018) { |
5864 | msleep(150); | 5864 | msleep(150); |
5865 | } | 5865 | } |
5866 | } | 5866 | } |
@@ -5870,24 +5870,22 @@ static int alc269_resume(struct hda_codec *codec) | |||
5870 | { | 5870 | { |
5871 | struct alc_spec *spec = codec->spec; | 5871 | struct alc_spec *spec = codec->spec; |
5872 | 5872 | ||
5873 | if (spec->codec_variant == ALC269_TYPE_ALC269VB || | 5873 | if (spec->codec_variant == ALC269_TYPE_ALC269VB) |
5874 | alc269vb_toggle_power_output(codec, 0); | ||
5875 | if (spec->codec_variant == ALC269_TYPE_ALC269VB && | ||
5874 | (alc_get_coef0(codec) & 0x00ff) == 0x018) { | 5876 | (alc_get_coef0(codec) & 0x00ff) == 0x018) { |
5875 | alc269_toggle_power_output(codec, 0); | ||
5876 | msleep(150); | 5877 | msleep(150); |
5877 | } | 5878 | } |
5878 | 5879 | ||
5879 | codec->patch_ops.init(codec); | 5880 | codec->patch_ops.init(codec); |
5880 | 5881 | ||
5881 | if (spec->codec_variant == ALC269_TYPE_ALC269VB || | 5882 | if (spec->codec_variant == ALC269_TYPE_ALC269VB) |
5883 | alc269vb_toggle_power_output(codec, 1); | ||
5884 | if (spec->codec_variant == ALC269_TYPE_ALC269VB && | ||
5882 | (alc_get_coef0(codec) & 0x00ff) == 0x017) { | 5885 | (alc_get_coef0(codec) & 0x00ff) == 0x017) { |
5883 | alc269_toggle_power_output(codec, 1); | ||
5884 | msleep(200); | 5886 | msleep(200); |
5885 | } | 5887 | } |
5886 | 5888 | ||
5887 | if (spec->codec_variant == ALC269_TYPE_ALC269VB || | ||
5888 | (alc_get_coef0(codec) & 0x00ff) == 0x018) | ||
5889 | alc269_toggle_power_output(codec, 1); | ||
5890 | |||
5891 | snd_hda_codec_resume_amp(codec); | 5889 | snd_hda_codec_resume_amp(codec); |
5892 | snd_hda_codec_resume_cache(codec); | 5890 | snd_hda_codec_resume_cache(codec); |
5893 | hda_call_check_power_status(codec, 0x01); | 5891 | hda_call_check_power_status(codec, 0x01); |
@@ -7079,6 +7077,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
7079 | .patch = patch_alc662 }, | 7077 | .patch = patch_alc662 }, |
7080 | { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 }, | 7078 | { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 }, |
7081 | { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, | 7079 | { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, |
7080 | { .id = 0x10ec0668, .name = "ALC668", .patch = patch_alc662 }, | ||
7082 | { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, | 7081 | { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, |
7083 | { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, | 7082 | { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, |
7084 | { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, | 7083 | { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, |
@@ -7096,6 +7095,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
7096 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc882 }, | 7095 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc882 }, |
7097 | { .id = 0x10ec0892, .name = "ALC892", .patch = patch_alc662 }, | 7096 | { .id = 0x10ec0892, .name = "ALC892", .patch = patch_alc662 }, |
7098 | { .id = 0x10ec0899, .name = "ALC898", .patch = patch_alc882 }, | 7097 | { .id = 0x10ec0899, .name = "ALC898", .patch = patch_alc882 }, |
7098 | { .id = 0x10ec0900, .name = "ALC1150", .patch = patch_alc882 }, | ||
7099 | {} /* terminator */ | 7099 | {} /* terminator */ |
7100 | }; | 7100 | }; |
7101 | 7101 | ||
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 72a2f60b087c..019e1a00414a 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -1809,11 +1809,11 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec) | |||
1809 | { | 1809 | { |
1810 | struct via_spec *spec = codec->spec; | 1810 | struct via_spec *spec = codec->spec; |
1811 | const struct auto_pin_cfg *cfg = &spec->autocfg; | 1811 | const struct auto_pin_cfg *cfg = &spec->autocfg; |
1812 | int i, dac_num; | 1812 | int i; |
1813 | hda_nid_t nid; | 1813 | hda_nid_t nid; |
1814 | 1814 | ||
1815 | spec->multiout.num_dacs = 0; | ||
1815 | spec->multiout.dac_nids = spec->private_dac_nids; | 1816 | spec->multiout.dac_nids = spec->private_dac_nids; |
1816 | dac_num = 0; | ||
1817 | for (i = 0; i < cfg->line_outs; i++) { | 1817 | for (i = 0; i < cfg->line_outs; i++) { |
1818 | hda_nid_t dac = 0; | 1818 | hda_nid_t dac = 0; |
1819 | nid = cfg->line_out_pins[i]; | 1819 | nid = cfg->line_out_pins[i]; |
@@ -1824,16 +1824,13 @@ static int via_auto_fill_dac_nids(struct hda_codec *codec) | |||
1824 | if (!i && parse_output_path(codec, nid, dac, 1, | 1824 | if (!i && parse_output_path(codec, nid, dac, 1, |
1825 | &spec->out_mix_path)) | 1825 | &spec->out_mix_path)) |
1826 | dac = spec->out_mix_path.path[0]; | 1826 | dac = spec->out_mix_path.path[0]; |
1827 | if (dac) { | 1827 | if (dac) |
1828 | spec->private_dac_nids[i] = dac; | 1828 | spec->private_dac_nids[spec->multiout.num_dacs++] = dac; |
1829 | dac_num++; | ||
1830 | } | ||
1831 | } | 1829 | } |
1832 | if (!spec->out_path[0].depth && spec->out_mix_path.depth) { | 1830 | if (!spec->out_path[0].depth && spec->out_mix_path.depth) { |
1833 | spec->out_path[0] = spec->out_mix_path; | 1831 | spec->out_path[0] = spec->out_mix_path; |
1834 | spec->out_mix_path.depth = 0; | 1832 | spec->out_mix_path.depth = 0; |
1835 | } | 1833 | } |
1836 | spec->multiout.num_dacs = dac_num; | ||
1837 | return 0; | 1834 | return 0; |
1838 | } | 1835 | } |
1839 | 1836 | ||
@@ -3628,6 +3625,7 @@ static void set_widgets_power_state_vt2002P(struct hda_codec *codec) | |||
3628 | */ | 3625 | */ |
3629 | enum { | 3626 | enum { |
3630 | VIA_FIXUP_INTMIC_BOOST, | 3627 | VIA_FIXUP_INTMIC_BOOST, |
3628 | VIA_FIXUP_ASUS_G75, | ||
3631 | }; | 3629 | }; |
3632 | 3630 | ||
3633 | static void via_fixup_intmic_boost(struct hda_codec *codec, | 3631 | static void via_fixup_intmic_boost(struct hda_codec *codec, |
@@ -3642,13 +3640,35 @@ static const struct hda_fixup via_fixups[] = { | |||
3642 | .type = HDA_FIXUP_FUNC, | 3640 | .type = HDA_FIXUP_FUNC, |
3643 | .v.func = via_fixup_intmic_boost, | 3641 | .v.func = via_fixup_intmic_boost, |
3644 | }, | 3642 | }, |
3643 | [VIA_FIXUP_ASUS_G75] = { | ||
3644 | .type = HDA_FIXUP_PINS, | ||
3645 | .v.pins = (const struct hda_pintbl[]) { | ||
3646 | /* set 0x24 and 0x33 as speakers */ | ||
3647 | { 0x24, 0x991301f0 }, | ||
3648 | { 0x33, 0x991301f1 }, /* subwoofer */ | ||
3649 | { } | ||
3650 | } | ||
3651 | }, | ||
3645 | }; | 3652 | }; |
3646 | 3653 | ||
3647 | static const struct snd_pci_quirk vt2002p_fixups[] = { | 3654 | static const struct snd_pci_quirk vt2002p_fixups[] = { |
3655 | SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75), | ||
3648 | SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST), | 3656 | SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST), |
3649 | {} | 3657 | {} |
3650 | }; | 3658 | }; |
3651 | 3659 | ||
3660 | /* NIDs 0x24 and 0x33 on VT1802 have connections to non-existing NID 0x3e | ||
3661 | * Replace this with mixer NID 0x1c | ||
3662 | */ | ||
3663 | static void fix_vt1802_connections(struct hda_codec *codec) | ||
3664 | { | ||
3665 | static hda_nid_t conn_24[] = { 0x14, 0x1c }; | ||
3666 | static hda_nid_t conn_33[] = { 0x1c }; | ||
3667 | |||
3668 | snd_hda_override_conn_list(codec, 0x24, ARRAY_SIZE(conn_24), conn_24); | ||
3669 | snd_hda_override_conn_list(codec, 0x33, ARRAY_SIZE(conn_33), conn_33); | ||
3670 | } | ||
3671 | |||
3652 | /* patch for vt2002P */ | 3672 | /* patch for vt2002P */ |
3653 | static int patch_vt2002P(struct hda_codec *codec) | 3673 | static int patch_vt2002P(struct hda_codec *codec) |
3654 | { | 3674 | { |
@@ -3663,6 +3683,8 @@ static int patch_vt2002P(struct hda_codec *codec) | |||
3663 | spec->aa_mix_nid = 0x21; | 3683 | spec->aa_mix_nid = 0x21; |
3664 | override_mic_boost(codec, 0x2b, 0, 3, 40); | 3684 | override_mic_boost(codec, 0x2b, 0, 3, 40); |
3665 | override_mic_boost(codec, 0x29, 0, 3, 40); | 3685 | override_mic_boost(codec, 0x29, 0, 3, 40); |
3686 | if (spec->codec_type == VT1802) | ||
3687 | fix_vt1802_connections(codec); | ||
3666 | add_secret_dac_path(codec); | 3688 | add_secret_dac_path(codec); |
3667 | 3689 | ||
3668 | snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups); | 3690 | snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups); |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index f1cd1e387801..748e36c66603 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -3979,7 +3979,8 @@ static int snd_hdspm_get_sync_check(struct snd_kcontrol *kcontrol, | |||
3979 | case 8: /* SYNC IN */ | 3979 | case 8: /* SYNC IN */ |
3980 | val = hdspm_sync_in_sync_check(hdspm); break; | 3980 | val = hdspm_sync_in_sync_check(hdspm); break; |
3981 | default: | 3981 | default: |
3982 | val = hdspm_s1_sync_check(hdspm, ucontrol->id.index-1); | 3982 | val = hdspm_s1_sync_check(hdspm, |
3983 | kcontrol->private_value-1); | ||
3983 | } | 3984 | } |
3984 | break; | 3985 | break; |
3985 | 3986 | ||
@@ -4899,7 +4900,7 @@ snd_hdspm_proc_read_madi(struct snd_info_entry * entry, | |||
4899 | insel = "Coaxial"; | 4900 | insel = "Coaxial"; |
4900 | break; | 4901 | break; |
4901 | default: | 4902 | default: |
4902 | insel = "Unkown"; | 4903 | insel = "Unknown"; |
4903 | } | 4904 | } |
4904 | 4905 | ||
4905 | snd_iprintf(buffer, | 4906 | snd_iprintf(buffer, |
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 61599298fb26..4d8db3685e96 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c | |||
@@ -763,7 +763,7 @@ static int cs42l52_set_sysclk(struct snd_soc_dai *codec_dai, | |||
763 | if ((freq >= CS42L52_MIN_CLK) && (freq <= CS42L52_MAX_CLK)) { | 763 | if ((freq >= CS42L52_MIN_CLK) && (freq <= CS42L52_MAX_CLK)) { |
764 | cs42l52->sysclk = freq; | 764 | cs42l52->sysclk = freq; |
765 | } else { | 765 | } else { |
766 | dev_err(codec->dev, "Invalid freq paramter\n"); | 766 | dev_err(codec->dev, "Invalid freq parameter\n"); |
767 | return -EINVAL; | 767 | return -EINVAL; |
768 | } | 768 | } |
769 | return 0; | 769 | return 0; |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 3fddc7ad1127..b2b2b37131bd 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -3722,7 +3722,7 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data) | |||
3722 | } while (count--); | 3722 | } while (count--); |
3723 | 3723 | ||
3724 | if (count == 0) | 3724 | if (count == 0) |
3725 | dev_warn(codec->dev, "No impedence range reported for jack\n"); | 3725 | dev_warn(codec->dev, "No impedance range reported for jack\n"); |
3726 | 3726 | ||
3727 | #ifndef CONFIG_SND_SOC_WM8994_MODULE | 3727 | #ifndef CONFIG_SND_SOC_WM8994_MODULE |
3728 | trace_snd_soc_jack_irq(dev_name(codec->dev)); | 3728 | trace_snd_soc_jack_irq(dev_name(codec->dev)); |
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 7f78c6d782b0..34de6f2faf61 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #define EP_FLAG_ACTIVATED 0 | 36 | #define EP_FLAG_ACTIVATED 0 |
37 | #define EP_FLAG_RUNNING 1 | 37 | #define EP_FLAG_RUNNING 1 |
38 | #define EP_FLAG_STOPPING 2 | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * snd_usb_endpoint is a model that abstracts everything related to an | 41 | * snd_usb_endpoint is a model that abstracts everything related to an |
@@ -502,10 +503,20 @@ static int wait_clear_urbs(struct snd_usb_endpoint *ep) | |||
502 | if (alive) | 503 | if (alive) |
503 | snd_printk(KERN_ERR "timeout: still %d active urbs on EP #%x\n", | 504 | snd_printk(KERN_ERR "timeout: still %d active urbs on EP #%x\n", |
504 | alive, ep->ep_num); | 505 | alive, ep->ep_num); |
506 | clear_bit(EP_FLAG_STOPPING, &ep->flags); | ||
505 | 507 | ||
506 | return 0; | 508 | return 0; |
507 | } | 509 | } |
508 | 510 | ||
511 | /* sync the pending stop operation; | ||
512 | * this function itself doesn't trigger the stop operation | ||
513 | */ | ||
514 | void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep) | ||
515 | { | ||
516 | if (ep && test_bit(EP_FLAG_STOPPING, &ep->flags)) | ||
517 | wait_clear_urbs(ep); | ||
518 | } | ||
519 | |||
509 | /* | 520 | /* |
510 | * unlink active urbs. | 521 | * unlink active urbs. |
511 | */ | 522 | */ |
@@ -918,6 +929,8 @@ void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep, | |||
918 | 929 | ||
919 | if (wait) | 930 | if (wait) |
920 | wait_clear_urbs(ep); | 931 | wait_clear_urbs(ep); |
932 | else | ||
933 | set_bit(EP_FLAG_STOPPING, &ep->flags); | ||
921 | } | 934 | } |
922 | } | 935 | } |
923 | 936 | ||
diff --git a/sound/usb/endpoint.h b/sound/usb/endpoint.h index 6376ccf10fd4..3d4c9705041f 100644 --- a/sound/usb/endpoint.h +++ b/sound/usb/endpoint.h | |||
@@ -19,6 +19,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep, | |||
19 | int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep); | 19 | int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep); |
20 | void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep, | 20 | void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep, |
21 | int force, int can_sleep, int wait); | 21 | int force, int can_sleep, int wait); |
22 | void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep); | ||
22 | int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep); | 23 | int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep); |
23 | int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep); | 24 | int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep); |
24 | void snd_usb_endpoint_free(struct list_head *head); | 25 | void snd_usb_endpoint_free(struct list_head *head); |
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 37428f74dbb6..5c12a3fe8c3e 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c | |||
@@ -568,6 +568,9 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) | |||
568 | goto unlock; | 568 | goto unlock; |
569 | } | 569 | } |
570 | 570 | ||
571 | snd_usb_endpoint_sync_pending_stop(subs->sync_endpoint); | ||
572 | snd_usb_endpoint_sync_pending_stop(subs->data_endpoint); | ||
573 | |||
571 | ret = set_format(subs, subs->cur_audiofmt); | 574 | ret = set_format(subs, subs->cur_audiofmt); |
572 | if (ret < 0) | 575 | if (ret < 0) |
573 | goto unlock; | 576 | goto unlock; |