aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_generic.c68
-rw-r--r--sound/pci/hda/hda_generic.h1
-rw-r--r--sound/pci/hda/patch_realtek.c3
-rw-r--r--sound/pci/hda/patch_via.c10
-rw-r--r--sound/pci/sis7019.c3
-rw-r--r--sound/soc/codecs/cs42l52.c8
-rw-r--r--sound/soc/codecs/cs42l52.h2
-rw-r--r--sound/soc/codecs/max98090.c2
-rw-r--r--sound/soc/codecs/wm5110.c4
-rw-r--r--sound/soc/codecs/wm8994.c12
-rw-r--r--sound/soc/davinci/davinci-mcasp.c7
-rw-r--r--sound/soc/soc-compress.c8
-rw-r--r--sound/usb/6fire/firmware.c6
-rw-r--r--sound/usb/mixer.c1
-rw-r--r--sound/usb/quirks-table.h14
15 files changed, 99 insertions, 50 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index ae85bbd2e6f8..4b1524a861f3 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -788,6 +788,8 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable)
788 return; 788 return;
789 if (codec->inv_eapd) 789 if (codec->inv_eapd)
790 enable = !enable; 790 enable = !enable;
791 if (spec->keep_eapd_on && !enable)
792 return;
791 snd_hda_codec_update_cache(codec, pin, 0, 793 snd_hda_codec_update_cache(codec, pin, 0,
792 AC_VERB_SET_EAPD_BTLENABLE, 794 AC_VERB_SET_EAPD_BTLENABLE,
793 enable ? 0x02 : 0x00); 795 enable ? 0x02 : 0x00);
@@ -1938,17 +1940,7 @@ static int create_speaker_out_ctls(struct hda_codec *codec)
1938 * independent HP controls 1940 * independent HP controls
1939 */ 1941 */
1940 1942
1941/* update HP auto-mute state too */ 1943static void call_hp_automute(struct hda_codec *codec, struct hda_jack_tbl *jack);
1942static void update_hp_automute_hook(struct hda_codec *codec)
1943{
1944 struct hda_gen_spec *spec = codec->spec;
1945
1946 if (spec->hp_automute_hook)
1947 spec->hp_automute_hook(codec, NULL);
1948 else
1949 snd_hda_gen_hp_automute(codec, NULL);
1950}
1951
1952static int indep_hp_info(struct snd_kcontrol *kcontrol, 1944static int indep_hp_info(struct snd_kcontrol *kcontrol,
1953 struct snd_ctl_elem_info *uinfo) 1945 struct snd_ctl_elem_info *uinfo)
1954{ 1946{
@@ -2009,7 +2001,7 @@ static int indep_hp_put(struct snd_kcontrol *kcontrol,
2009 else 2001 else
2010 *dacp = spec->alt_dac_nid; 2002 *dacp = spec->alt_dac_nid;
2011 2003
2012 update_hp_automute_hook(codec); 2004 call_hp_automute(codec, NULL);
2013 ret = 1; 2005 ret = 1;
2014 } 2006 }
2015 unlock: 2007 unlock:
@@ -2305,7 +2297,7 @@ static void update_hp_mic(struct hda_codec *codec, int adc_mux, bool force)
2305 else 2297 else
2306 val = PIN_HP; 2298 val = PIN_HP;
2307 set_pin_target(codec, pin, val, true); 2299 set_pin_target(codec, pin, val, true);
2308 update_hp_automute_hook(codec); 2300 call_hp_automute(codec, NULL);
2309 } 2301 }
2310} 2302}
2311 2303
@@ -2714,7 +2706,7 @@ static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol,
2714 val = snd_hda_get_default_vref(codec, nid); 2706 val = snd_hda_get_default_vref(codec, nid);
2715 } 2707 }
2716 snd_hda_set_pin_ctl_cache(codec, nid, val); 2708 snd_hda_set_pin_ctl_cache(codec, nid, val);
2717 update_hp_automute_hook(codec); 2709 call_hp_automute(codec, NULL);
2718 2710
2719 return 1; 2711 return 1;
2720} 2712}
@@ -3859,20 +3851,42 @@ void snd_hda_gen_mic_autoswitch(struct hda_codec *codec, struct hda_jack_tbl *ja
3859} 3851}
3860EXPORT_SYMBOL_HDA(snd_hda_gen_mic_autoswitch); 3852EXPORT_SYMBOL_HDA(snd_hda_gen_mic_autoswitch);
3861 3853
3862/* update jack retasking */ 3854/* call appropriate hooks */
3863static void update_automute_all(struct hda_codec *codec) 3855static void call_hp_automute(struct hda_codec *codec, struct hda_jack_tbl *jack)
3864{ 3856{
3865 struct hda_gen_spec *spec = codec->spec; 3857 struct hda_gen_spec *spec = codec->spec;
3858 if (spec->hp_automute_hook)
3859 spec->hp_automute_hook(codec, jack);
3860 else
3861 snd_hda_gen_hp_automute(codec, jack);
3862}
3866 3863
3867 update_hp_automute_hook(codec); 3864static void call_line_automute(struct hda_codec *codec,
3865 struct hda_jack_tbl *jack)
3866{
3867 struct hda_gen_spec *spec = codec->spec;
3868 if (spec->line_automute_hook) 3868 if (spec->line_automute_hook)
3869 spec->line_automute_hook(codec, NULL); 3869 spec->line_automute_hook(codec, jack);
3870 else 3870 else
3871 snd_hda_gen_line_automute(codec, NULL); 3871 snd_hda_gen_line_automute(codec, jack);
3872}
3873
3874static void call_mic_autoswitch(struct hda_codec *codec,
3875 struct hda_jack_tbl *jack)
3876{
3877 struct hda_gen_spec *spec = codec->spec;
3872 if (spec->mic_autoswitch_hook) 3878 if (spec->mic_autoswitch_hook)
3873 spec->mic_autoswitch_hook(codec, NULL); 3879 spec->mic_autoswitch_hook(codec, jack);
3874 else 3880 else
3875 snd_hda_gen_mic_autoswitch(codec, NULL); 3881 snd_hda_gen_mic_autoswitch(codec, jack);
3882}
3883
3884/* update jack retasking */
3885static void update_automute_all(struct hda_codec *codec)
3886{
3887 call_hp_automute(codec, NULL);
3888 call_line_automute(codec, NULL);
3889 call_mic_autoswitch(codec, NULL);
3876} 3890}
3877 3891
3878/* 3892/*
@@ -4009,9 +4023,7 @@ static int check_auto_mute_availability(struct hda_codec *codec)
4009 snd_printdd("hda-codec: Enable HP auto-muting on NID 0x%x\n", 4023 snd_printdd("hda-codec: Enable HP auto-muting on NID 0x%x\n",
4010 nid); 4024 nid);
4011 snd_hda_jack_detect_enable_callback(codec, nid, HDA_GEN_HP_EVENT, 4025 snd_hda_jack_detect_enable_callback(codec, nid, HDA_GEN_HP_EVENT,
4012 spec->hp_automute_hook ? 4026 call_hp_automute);
4013 spec->hp_automute_hook :
4014 snd_hda_gen_hp_automute);
4015 spec->detect_hp = 1; 4027 spec->detect_hp = 1;
4016 } 4028 }
4017 4029
@@ -4024,9 +4036,7 @@ static int check_auto_mute_availability(struct hda_codec *codec)
4024 snd_printdd("hda-codec: Enable Line-Out auto-muting on NID 0x%x\n", nid); 4036 snd_printdd("hda-codec: Enable Line-Out auto-muting on NID 0x%x\n", nid);
4025 snd_hda_jack_detect_enable_callback(codec, nid, 4037 snd_hda_jack_detect_enable_callback(codec, nid,
4026 HDA_GEN_FRONT_EVENT, 4038 HDA_GEN_FRONT_EVENT,
4027 spec->line_automute_hook ? 4039 call_line_automute);
4028 spec->line_automute_hook :
4029 snd_hda_gen_line_automute);
4030 spec->detect_lo = 1; 4040 spec->detect_lo = 1;
4031 } 4041 }
4032 spec->automute_lo_possible = spec->detect_hp; 4042 spec->automute_lo_possible = spec->detect_hp;
@@ -4068,9 +4078,7 @@ static bool auto_mic_check_imux(struct hda_codec *codec)
4068 snd_hda_jack_detect_enable_callback(codec, 4078 snd_hda_jack_detect_enable_callback(codec,
4069 spec->am_entry[i].pin, 4079 spec->am_entry[i].pin,
4070 HDA_GEN_MIC_EVENT, 4080 HDA_GEN_MIC_EVENT,
4071 spec->mic_autoswitch_hook ? 4081 call_mic_autoswitch);
4072 spec->mic_autoswitch_hook :
4073 snd_hda_gen_mic_autoswitch);
4074 return true; 4082 return true;
4075} 4083}
4076 4084
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 54e665160379..76200314ee95 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -222,6 +222,7 @@ struct hda_gen_spec {
222 unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */ 222 unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */
223 unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */ 223 unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */
224 unsigned int own_eapd_ctl:1; /* set EAPD by own function */ 224 unsigned int own_eapd_ctl:1; /* set EAPD by own function */
225 unsigned int keep_eapd_on:1; /* don't turn off EAPD automatically */
225 unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */ 226 unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */
226 unsigned int indep_hp:1; /* independent HP supported */ 227 unsigned int indep_hp:1; /* independent HP supported */
227 unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */ 228 unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 59d2e91a9ab6..02e22b4458d2 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3493,6 +3493,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3493 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3493 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3494 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3494 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3495 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3495 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3496 SND_PCI_QUIRK(0x1028, 0x05f8, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3497 SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3496 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), 3498 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
3497 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED), 3499 SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
3498 SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), 3500 SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1),
@@ -3530,6 +3532,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3530 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK), 3532 SND_PCI_QUIRK(0x17aa, 0x21fa, "Thinkpad X230", ALC269_FIXUP_LENOVO_DOCK),
3531 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK), 3533 SND_PCI_QUIRK(0x17aa, 0x21f3, "Thinkpad T430", ALC269_FIXUP_LENOVO_DOCK),
3532 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK), 3534 SND_PCI_QUIRK(0x17aa, 0x21fb, "Thinkpad T430s", ALC269_FIXUP_LENOVO_DOCK),
3535 SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK),
3533 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK), 3536 SND_PCI_QUIRK(0x17aa, 0x2203, "Thinkpad X230 Tablet", ALC269_FIXUP_LENOVO_DOCK),
3534 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), 3537 SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
3535 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), 3538 SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index e0dadcf2030d..e5245544eb52 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -136,6 +136,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec)
136 spec->codec_type = VT1708S; 136 spec->codec_type = VT1708S;
137 spec->no_pin_power_ctl = 1; 137 spec->no_pin_power_ctl = 1;
138 spec->gen.indep_hp = 1; 138 spec->gen.indep_hp = 1;
139 spec->gen.keep_eapd_on = 1;
139 spec->gen.pcm_playback_hook = via_playback_pcm_hook; 140 spec->gen.pcm_playback_hook = via_playback_pcm_hook;
140 return spec; 141 return spec;
141} 142}
@@ -231,9 +232,14 @@ static void vt1708_update_hp_work(struct hda_codec *codec)
231 232
232static void set_widgets_power_state(struct hda_codec *codec) 233static void set_widgets_power_state(struct hda_codec *codec)
233{ 234{
235#if 0 /* FIXME: the assumed connections don't match always with the
236 * actual routes by the generic parser, so better to disable
237 * the control for safety.
238 */
234 struct via_spec *spec = codec->spec; 239 struct via_spec *spec = codec->spec;
235 if (spec->set_widgets_power_state) 240 if (spec->set_widgets_power_state)
236 spec->set_widgets_power_state(codec); 241 spec->set_widgets_power_state(codec);
242#endif
237} 243}
238 244
239static void update_power_state(struct hda_codec *codec, hda_nid_t nid, 245static void update_power_state(struct hda_codec *codec, hda_nid_t nid,
@@ -478,7 +484,9 @@ static int via_suspend(struct hda_codec *codec)
478 /* Fix pop noise on headphones */ 484 /* Fix pop noise on headphones */
479 int i; 485 int i;
480 for (i = 0; i < spec->gen.autocfg.hp_outs; i++) 486 for (i = 0; i < spec->gen.autocfg.hp_outs; i++)
481 snd_hda_set_pin_ctl(codec, spec->gen.autocfg.hp_pins[i], 0); 487 snd_hda_codec_write(codec, spec->gen.autocfg.hp_pins[i],
488 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
489 0x00);
482 } 490 }
483 491
484 return 0; 492 return 0;
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index d59abe1682c5..748e82d4d257 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -1341,7 +1341,8 @@ static int sis_chip_create(struct snd_card *card,
1341 if (rc) 1341 if (rc)
1342 goto error_out; 1342 goto error_out;
1343 1343
1344 if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0) { 1344 rc = pci_set_dma_mask(pci, DMA_BIT_MASK(30));
1345 if (rc < 0) {
1345 dev_err(&pci->dev, "architecture does not support 30-bit PCI busmaster DMA"); 1346 dev_err(&pci->dev, "architecture does not support 30-bit PCI busmaster DMA");
1346 goto error_out_enabled; 1347 goto error_out_enabled;
1347 } 1348 }
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 0f6f481cec09..030f53c96ec0 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -86,7 +86,7 @@ static const struct reg_default cs42l52_reg_defaults[] = {
86 { CS42L52_BEEP_VOL, 0x00 }, /* r1D Beep Volume off Time */ 86 { CS42L52_BEEP_VOL, 0x00 }, /* r1D Beep Volume off Time */
87 { CS42L52_BEEP_TONE_CTL, 0x00 }, /* r1E Beep Tone Cfg. */ 87 { CS42L52_BEEP_TONE_CTL, 0x00 }, /* r1E Beep Tone Cfg. */
88 { CS42L52_TONE_CTL, 0x00 }, /* r1F Tone Ctl */ 88 { CS42L52_TONE_CTL, 0x00 }, /* r1F Tone Ctl */
89 { CS42L52_MASTERA_VOL, 0x88 }, /* r20 Master A Volume */ 89 { CS42L52_MASTERA_VOL, 0x00 }, /* r20 Master A Volume */
90 { CS42L52_MASTERB_VOL, 0x00 }, /* r21 Master B Volume */ 90 { CS42L52_MASTERB_VOL, 0x00 }, /* r21 Master B Volume */
91 { CS42L52_HPA_VOL, 0x00 }, /* r22 Headphone A Volume */ 91 { CS42L52_HPA_VOL, 0x00 }, /* r22 Headphone A Volume */
92 { CS42L52_HPB_VOL, 0x00 }, /* r23 Headphone B Volume */ 92 { CS42L52_HPB_VOL, 0x00 }, /* r23 Headphone B Volume */
@@ -225,7 +225,7 @@ static const char * const mic_bias_level_text[] = {
225}; 225};
226 226
227static const struct soc_enum mic_bias_level_enum = 227static const struct soc_enum mic_bias_level_enum =
228 SOC_ENUM_SINGLE(CS42L52_IFACE_CTL1, 0, 228 SOC_ENUM_SINGLE(CS42L52_IFACE_CTL2, 0,
229 ARRAY_SIZE(mic_bias_level_text), mic_bias_level_text); 229 ARRAY_SIZE(mic_bias_level_text), mic_bias_level_text);
230 230
231static const char * const cs42l52_mic_text[] = { "Single", "Differential" }; 231static const char * const cs42l52_mic_text[] = { "Single", "Differential" };
@@ -413,7 +413,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
413 SOC_ENUM("Headphone Analog Gain", hp_gain_enum), 413 SOC_ENUM("Headphone Analog Gain", hp_gain_enum),
414 414
415 SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL, 415 SOC_DOUBLE_R_SX_TLV("Speaker Volume", CS42L52_SPKA_VOL,
416 CS42L52_SPKB_VOL, 7, 0x1, 0xff, hl_tlv), 416 CS42L52_SPKB_VOL, 0, 0x1, 0xff, hl_tlv),
417 417
418 SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL, 418 SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL,
419 CS42L52_PASSTHRUB_VOL, 6, 0x18, 0x90, pga_tlv), 419 CS42L52_PASSTHRUB_VOL, 6, 0x18, 0x90, pga_tlv),
@@ -441,7 +441,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
441 441
442 SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume", 442 SOC_DOUBLE_R_SX_TLV("PCM Mixer Volume",
443 CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 443 CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL,
444 6, 0x7f, 0x19, hl_tlv), 444 0, 0x7f, 0x19, hl_tlv),
445 SOC_DOUBLE_R("PCM Mixer Switch", 445 SOC_DOUBLE_R("PCM Mixer Switch",
446 CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1), 446 CS42L52_PCMA_MIXER_VOL, CS42L52_PCMB_MIXER_VOL, 7, 1, 1),
447 447
diff --git a/sound/soc/codecs/cs42l52.h b/sound/soc/codecs/cs42l52.h
index 60985c059071..4277012c4719 100644
--- a/sound/soc/codecs/cs42l52.h
+++ b/sound/soc/codecs/cs42l52.h
@@ -157,7 +157,7 @@
157#define CS42L52_PB_CTL1_INV_PCMA (1 << 2) 157#define CS42L52_PB_CTL1_INV_PCMA (1 << 2)
158#define CS42L52_PB_CTL1_MSTB_MUTE (1 << 1) 158#define CS42L52_PB_CTL1_MSTB_MUTE (1 << 1)
159#define CS42L52_PB_CTL1_MSTA_MUTE (1 << 0) 159#define CS42L52_PB_CTL1_MSTA_MUTE (1 << 0)
160#define CS42L52_PB_CTL1_MUTE_MASK 0xFFFD 160#define CS42L52_PB_CTL1_MUTE_MASK 0x03
161#define CS42L52_PB_CTL1_MUTE 3 161#define CS42L52_PB_CTL1_MUTE 3
162#define CS42L52_PB_CTL1_UNMUTE 0 162#define CS42L52_PB_CTL1_UNMUTE 0
163 163
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index ce0d36412c97..8d14a76c7249 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2233,7 +2233,7 @@ static int max98090_probe(struct snd_soc_codec *codec)
2233 dev_dbg(codec->dev, "irq = %d\n", max98090->irq); 2233 dev_dbg(codec->dev, "irq = %d\n", max98090->irq);
2234 2234
2235 ret = request_threaded_irq(max98090->irq, NULL, 2235 ret = request_threaded_irq(max98090->irq, NULL,
2236 max98090_interrupt, IRQF_TRIGGER_FALLING, 2236 max98090_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
2237 "max98090_interrupt", codec); 2237 "max98090_interrupt", codec);
2238 if (ret < 0) { 2238 if (ret < 0) {
2239 dev_err(codec->dev, "request_irq failed: %d\n", 2239 dev_err(codec->dev, "request_irq failed: %d\n",
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 731884e04776..ba38f0679662 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -190,7 +190,7 @@ ARIZONA_MIXER_CONTROLS("DSP2R", ARIZONA_DSP2RMIX_INPUT_1_SOURCE),
190ARIZONA_MIXER_CONTROLS("DSP3L", ARIZONA_DSP3LMIX_INPUT_1_SOURCE), 190ARIZONA_MIXER_CONTROLS("DSP3L", ARIZONA_DSP3LMIX_INPUT_1_SOURCE),
191ARIZONA_MIXER_CONTROLS("DSP3R", ARIZONA_DSP3RMIX_INPUT_1_SOURCE), 191ARIZONA_MIXER_CONTROLS("DSP3R", ARIZONA_DSP3RMIX_INPUT_1_SOURCE),
192ARIZONA_MIXER_CONTROLS("DSP4L", ARIZONA_DSP4LMIX_INPUT_1_SOURCE), 192ARIZONA_MIXER_CONTROLS("DSP4L", ARIZONA_DSP4LMIX_INPUT_1_SOURCE),
193ARIZONA_MIXER_CONTROLS("DSP5R", ARIZONA_DSP4RMIX_INPUT_1_SOURCE), 193ARIZONA_MIXER_CONTROLS("DSP4R", ARIZONA_DSP4RMIX_INPUT_1_SOURCE),
194 194
195ARIZONA_MIXER_CONTROLS("Mic", ARIZONA_MICMIX_INPUT_1_SOURCE), 195ARIZONA_MIXER_CONTROLS("Mic", ARIZONA_MICMIX_INPUT_1_SOURCE),
196ARIZONA_MIXER_CONTROLS("Noise", ARIZONA_NOISEMIX_INPUT_1_SOURCE), 196ARIZONA_MIXER_CONTROLS("Noise", ARIZONA_NOISEMIX_INPUT_1_SOURCE),
@@ -976,6 +976,8 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
976 if (ret != 0) 976 if (ret != 0)
977 return ret; 977 return ret;
978 978
979 arizona_init_spk(codec);
980
979 snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS"); 981 snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS");
980 982
981 priv->core.arizona->dapm = &codec->dapm; 983 priv->core.arizona->dapm = &codec->dapm;
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 1eb152cb1097..dfd997aaadfc 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -383,6 +383,8 @@ static int wm8994_get_drc_enum(struct snd_kcontrol *kcontrol,
383 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 383 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
384 int drc = wm8994_get_drc(kcontrol->id.name); 384 int drc = wm8994_get_drc(kcontrol->id.name);
385 385
386 if (drc < 0)
387 return drc;
386 ucontrol->value.enumerated.item[0] = wm8994->drc_cfg[drc]; 388 ucontrol->value.enumerated.item[0] = wm8994->drc_cfg[drc];
387 389
388 return 0; 390 return 0;
@@ -488,6 +490,9 @@ static int wm8994_get_retune_mobile_enum(struct snd_kcontrol *kcontrol,
488 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 490 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
489 int block = wm8994_get_retune_mobile_block(kcontrol->id.name); 491 int block = wm8994_get_retune_mobile_block(kcontrol->id.name);
490 492
493 if (block < 0)
494 return block;
495
491 ucontrol->value.enumerated.item[0] = wm8994->retune_mobile_cfg[block]; 496 ucontrol->value.enumerated.item[0] = wm8994->retune_mobile_cfg[block];
492 497
493 return 0; 498 return 0;
@@ -1031,7 +1036,7 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w,
1031{ 1036{
1032 struct snd_soc_codec *codec = w->codec; 1037 struct snd_soc_codec *codec = w->codec;
1033 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 1038 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
1034 struct wm8994 *control = codec->control_data; 1039 struct wm8994 *control = wm8994->wm8994;
1035 int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA; 1040 int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA;
1036 int i; 1041 int i;
1037 int dac; 1042 int dac;
@@ -3833,6 +3838,11 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
3833 dev_dbg(codec->dev, "Ignoring removed jack\n"); 3838 dev_dbg(codec->dev, "Ignoring removed jack\n");
3834 return IRQ_HANDLED; 3839 return IRQ_HANDLED;
3835 } 3840 }
3841 } else if (!(reg & WM8958_MICD_STS)) {
3842 snd_soc_jack_report(wm8994->micdet[0].jack, 0,
3843 SND_JACK_MECHANICAL | SND_JACK_HEADSET |
3844 wm8994->btn_mask);
3845 goto out;
3836 } 3846 }
3837 3847
3838 if (wm8994->mic_detecting) 3848 if (wm8994->mic_detecting)
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 56ecfc72f2e9..81490febac6d 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -631,7 +631,8 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev,
631 int word_length) 631 int word_length)
632{ 632{
633 u32 fmt; 633 u32 fmt;
634 u32 rotate = (word_length / 4) & 0x7; 634 u32 tx_rotate = (word_length / 4) & 0x7;
635 u32 rx_rotate = (32 - word_length) / 4;
635 u32 mask = (1ULL << word_length) - 1; 636 u32 mask = (1ULL << word_length) - 1;
636 637
637 /* 638 /*
@@ -655,9 +656,9 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev,
655 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, 656 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG,
656 TXSSZ(fmt), TXSSZ(0x0F)); 657 TXSSZ(fmt), TXSSZ(0x0F));
657 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG, 658 mcasp_mod_bits(dev->base + DAVINCI_MCASP_TXFMT_REG,
658 TXROT(rotate), TXROT(7)); 659 TXROT(tx_rotate), TXROT(7));
659 mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMT_REG, 660 mcasp_mod_bits(dev->base + DAVINCI_MCASP_RXFMT_REG,
660 RXROT(rotate), RXROT(7)); 661 RXROT(rx_rotate), RXROT(7));
661 mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG, 662 mcasp_set_reg(dev->base + DAVINCI_MCASP_RXMASK_REG,
662 mask); 663 mask);
663 } 664 }
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 3853f7eb3f28..06a8000aa07b 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -220,8 +220,12 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
220 goto err; 220 goto err;
221 } 221 }
222 222
223 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, 223 if (cstream->direction == SND_COMPRESS_PLAYBACK)
224 SND_SOC_DAPM_STREAM_START); 224 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
225 SND_SOC_DAPM_STREAM_START);
226 else
227 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE,
228 SND_SOC_DAPM_STREAM_START);
225 229
226 /* cancel any delayed stream shutdown that is pending */ 230 /* cancel any delayed stream shutdown that is pending */
227 rtd->pop_wait = 0; 231 rtd->pop_wait = 0;
diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c
index a1d9b0792a1e..b9defcdeb7ef 100644
--- a/sound/usb/6fire/firmware.c
+++ b/sound/usb/6fire/firmware.c
@@ -42,8 +42,8 @@ static const u8 ep_w_max_packet_size[] = {
42 0x94, 0x01, 0x5c, 0x02 /* alt 3: 404 EP2 and 604 EP6 (25 fpp) */ 42 0x94, 0x01, 0x5c, 0x02 /* alt 3: 404 EP2 and 604 EP6 (25 fpp) */
43}; 43};
44 44
45static const u8 known_fw_versions[][4] = { 45static const u8 known_fw_versions[][2] = {
46 { 0x03, 0x01, 0x0b, 0x00 } 46 { 0x03, 0x01 }
47}; 47};
48 48
49struct ihex_record { 49struct ihex_record {
@@ -343,7 +343,7 @@ static int usb6fire_fw_check(u8 *version)
343 int i; 343 int i;
344 344
345 for (i = 0; i < ARRAY_SIZE(known_fw_versions); i++) 345 for (i = 0; i < ARRAY_SIZE(known_fw_versions); i++)
346 if (!memcmp(version, known_fw_versions + i, 4)) 346 if (!memcmp(version, known_fw_versions + i, 2))
347 return 0; 347 return 0;
348 348
349 snd_printk(KERN_ERR PREFIX "invalid fimware version in device: %*ph. " 349 snd_printk(KERN_ERR PREFIX "invalid fimware version in device: %*ph. "
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index ca4739c3f650..e5c7f9f20fdd 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -886,6 +886,7 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
886 case USB_ID(0x046d, 0x0808): 886 case USB_ID(0x046d, 0x0808):
887 case USB_ID(0x046d, 0x0809): 887 case USB_ID(0x046d, 0x0809):
888 case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */ 888 case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */
889 case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */
889 case USB_ID(0x046d, 0x0991): 890 case USB_ID(0x046d, 0x0991):
890 /* Most audio usb devices lie about volume resolution. 891 /* Most audio usb devices lie about volume resolution.
891 * Most Logitech webcams have res = 384. 892 * Most Logitech webcams have res = 384.
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 7f1722f82c89..8b75bcf136f6 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -215,7 +215,13 @@
215 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL 215 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
216}, 216},
217{ 217{
218 USB_DEVICE(0x046d, 0x0990), 218 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
219 USB_DEVICE_ID_MATCH_INT_CLASS |
220 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
221 .idVendor = 0x046d,
222 .idProduct = 0x0990,
223 .bInterfaceClass = USB_CLASS_AUDIO,
224 .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
219 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 225 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
220 .vendor_name = "Logitech, Inc.", 226 .vendor_name = "Logitech, Inc.",
221 .product_name = "QuickCam Pro 9000", 227 .product_name = "QuickCam Pro 9000",
@@ -1792,7 +1798,11 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1792 USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108), 1798 USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108),
1793 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1799 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1794 .ifnum = 0, 1800 .ifnum = 0,
1795 .type = QUIRK_MIDI_STANDARD_INTERFACE 1801 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1802 .data = & (const struct snd_usb_midi_endpoint_info) {
1803 .out_cables = 0x0007,
1804 .in_cables = 0x0007
1805 }
1796 } 1806 }
1797}, 1807},
1798{ 1808{