diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-08 03:30:04 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-08 03:30:04 -0400 |
commit | d820306cbe56fb010f500ae58f9725f49812d39a (patch) | |
tree | 1c9554107c7f279d05d6f54b1b5d69735d51195d /sound | |
parent | 6d5eba5aac4ec9bba3d6b3e6425d857706d12ccb (diff) | |
parent | 39edac70e9aedf451fccaa851b273ace9fcca0bd (diff) |
Merge branch 'for-linus' into for-next
For updating the HDMI chmap fix.
Conflicts:
sound/pci/hda/patch_hdmi.c
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 72 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 11 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 18 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 43 | ||||
-rw-r--r-- | sound/soc/blackfin/bf6xx-i2s.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/88pm860x-codec.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/ab8500-codec.c | 7 | ||||
-rw-r--r-- | sound/soc/codecs/max98095.c | 4 | ||||
-rw-r--r-- | sound/soc/fsl/imx-sgtl5000.c | 7 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 1 | ||||
-rw-r--r-- | sound/usb/usx2y/usbusx2yaudio.c | 22 | ||||
-rw-r--r-- | sound/usb/usx2y/usx2yhwdeppcm.c | 7 |
13 files changed, 150 insertions, 47 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 445ca481d8d3..bf578ba2677e 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -175,6 +175,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = { | |||
175 | { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, | 175 | { 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, |
176 | { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] | 176 | { 0x54524108, 0xffffffff, "TR28028", patch_tritech_tr28028, NULL }, // added by xin jin [07/09/99] |
177 | { 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)] | 177 | { 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)] |
178 | { 0x54584e03, 0xffffffff, "TLV320AIC27", NULL, NULL }, | ||
178 | { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, | 179 | { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, |
179 | { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF | 180 | { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF |
180 | { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF | 181 | { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF |
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index b524f89a1f13..18d972501585 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -111,6 +111,9 @@ enum { | |||
111 | /* 0x0009 - 0x0014 -> 12 test regs */ | 111 | /* 0x0009 - 0x0014 -> 12 test regs */ |
112 | /* 0x0015 - visibility reg */ | 112 | /* 0x0015 - visibility reg */ |
113 | 113 | ||
114 | /* Cirrus Logic CS4208 */ | ||
115 | #define CS4208_VENDOR_NID 0x24 | ||
116 | |||
114 | /* | 117 | /* |
115 | * Cirrus Logic CS4210 | 118 | * Cirrus Logic CS4210 |
116 | * | 119 | * |
@@ -223,6 +226,16 @@ static const struct hda_verb cs_coef_init_verbs[] = { | |||
223 | {} /* terminator */ | 226 | {} /* terminator */ |
224 | }; | 227 | }; |
225 | 228 | ||
229 | static const struct hda_verb cs4208_coef_init_verbs[] = { | ||
230 | {0x01, AC_VERB_SET_POWER_STATE, 0x00}, /* AFG: D0 */ | ||
231 | {0x24, AC_VERB_SET_PROC_STATE, 0x01}, /* VPW: processing on */ | ||
232 | {0x24, AC_VERB_SET_COEF_INDEX, 0x0033}, | ||
233 | {0x24, AC_VERB_SET_PROC_COEF, 0x0001}, /* A1 ICS */ | ||
234 | {0x24, AC_VERB_SET_COEF_INDEX, 0x0034}, | ||
235 | {0x24, AC_VERB_SET_PROC_COEF, 0x1C01}, /* A1 Enable, A Thresh = 300mV */ | ||
236 | {} /* terminator */ | ||
237 | }; | ||
238 | |||
226 | /* Errata: CS4207 rev C0/C1/C2 Silicon | 239 | /* Errata: CS4207 rev C0/C1/C2 Silicon |
227 | * | 240 | * |
228 | * http://www.cirrus.com/en/pubs/errata/ER880C3.pdf | 241 | * http://www.cirrus.com/en/pubs/errata/ER880C3.pdf |
@@ -295,6 +308,8 @@ static int cs_init(struct hda_codec *codec) | |||
295 | /* init_verb sequence for C0/C1/C2 errata*/ | 308 | /* init_verb sequence for C0/C1/C2 errata*/ |
296 | snd_hda_sequence_write(codec, cs_errata_init_verbs); | 309 | snd_hda_sequence_write(codec, cs_errata_init_verbs); |
297 | snd_hda_sequence_write(codec, cs_coef_init_verbs); | 310 | snd_hda_sequence_write(codec, cs_coef_init_verbs); |
311 | } else if (spec->vendor_nid == CS4208_VENDOR_NID) { | ||
312 | snd_hda_sequence_write(codec, cs4208_coef_init_verbs); | ||
298 | } | 313 | } |
299 | 314 | ||
300 | snd_hda_gen_init(codec); | 315 | snd_hda_gen_init(codec); |
@@ -434,6 +449,29 @@ static const struct hda_pintbl mba42_pincfgs[] = { | |||
434 | {} /* terminator */ | 449 | {} /* terminator */ |
435 | }; | 450 | }; |
436 | 451 | ||
452 | static const struct hda_pintbl mba6_pincfgs[] = { | ||
453 | { 0x10, 0x032120f0 }, /* HP */ | ||
454 | { 0x11, 0x500000f0 }, | ||
455 | { 0x12, 0x90100010 }, /* Speaker */ | ||
456 | { 0x13, 0x500000f0 }, | ||
457 | { 0x14, 0x500000f0 }, | ||
458 | { 0x15, 0x770000f0 }, | ||
459 | { 0x16, 0x770000f0 }, | ||
460 | { 0x17, 0x430000f0 }, | ||
461 | { 0x18, 0x43ab9030 }, /* Mic */ | ||
462 | { 0x19, 0x770000f0 }, | ||
463 | { 0x1a, 0x770000f0 }, | ||
464 | { 0x1b, 0x770000f0 }, | ||
465 | { 0x1c, 0x90a00090 }, | ||
466 | { 0x1d, 0x500000f0 }, | ||
467 | { 0x1e, 0x500000f0 }, | ||
468 | { 0x1f, 0x500000f0 }, | ||
469 | { 0x20, 0x500000f0 }, | ||
470 | { 0x21, 0x430000f0 }, | ||
471 | { 0x22, 0x430000f0 }, | ||
472 | {} /* terminator */ | ||
473 | }; | ||
474 | |||
437 | static void cs420x_fixup_gpio_13(struct hda_codec *codec, | 475 | static void cs420x_fixup_gpio_13(struct hda_codec *codec, |
438 | const struct hda_fixup *fix, int action) | 476 | const struct hda_fixup *fix, int action) |
439 | { | 477 | { |
@@ -556,22 +594,23 @@ static int patch_cs420x(struct hda_codec *codec) | |||
556 | 594 | ||
557 | /* | 595 | /* |
558 | * CS4208 support: | 596 | * CS4208 support: |
559 | * Its layout is no longer compatible with CS4206/CS4207, and the generic | 597 | * Its layout is no longer compatible with CS4206/CS4207 |
560 | * parser seems working fairly well, except for trivial fixups. | ||
561 | */ | 598 | */ |
562 | enum { | 599 | enum { |
600 | CS4208_MBA6, | ||
563 | CS4208_GPIO0, | 601 | CS4208_GPIO0, |
564 | }; | 602 | }; |
565 | 603 | ||
566 | static const struct hda_model_fixup cs4208_models[] = { | 604 | static const struct hda_model_fixup cs4208_models[] = { |
567 | { .id = CS4208_GPIO0, .name = "gpio0" }, | 605 | { .id = CS4208_GPIO0, .name = "gpio0" }, |
606 | { .id = CS4208_MBA6, .name = "mba6" }, | ||
568 | {} | 607 | {} |
569 | }; | 608 | }; |
570 | 609 | ||
571 | static const struct snd_pci_quirk cs4208_fixup_tbl[] = { | 610 | static const struct snd_pci_quirk cs4208_fixup_tbl[] = { |
572 | /* codec SSID */ | 611 | /* codec SSID */ |
573 | SND_PCI_QUIRK(0x106b, 0x7100, "MacBookPro 6,1", CS4208_GPIO0), | 612 | SND_PCI_QUIRK(0x106b, 0x7100, "MacBookAir 6,1", CS4208_MBA6), |
574 | SND_PCI_QUIRK(0x106b, 0x7200, "MacBookPro 6,2", CS4208_GPIO0), | 613 | SND_PCI_QUIRK(0x106b, 0x7200, "MacBookAir 6,2", CS4208_MBA6), |
575 | {} /* terminator */ | 614 | {} /* terminator */ |
576 | }; | 615 | }; |
577 | 616 | ||
@@ -588,18 +627,35 @@ static void cs4208_fixup_gpio0(struct hda_codec *codec, | |||
588 | } | 627 | } |
589 | 628 | ||
590 | static const struct hda_fixup cs4208_fixups[] = { | 629 | static const struct hda_fixup cs4208_fixups[] = { |
630 | [CS4208_MBA6] = { | ||
631 | .type = HDA_FIXUP_PINS, | ||
632 | .v.pins = mba6_pincfgs, | ||
633 | .chained = true, | ||
634 | .chain_id = CS4208_GPIO0, | ||
635 | }, | ||
591 | [CS4208_GPIO0] = { | 636 | [CS4208_GPIO0] = { |
592 | .type = HDA_FIXUP_FUNC, | 637 | .type = HDA_FIXUP_FUNC, |
593 | .v.func = cs4208_fixup_gpio0, | 638 | .v.func = cs4208_fixup_gpio0, |
594 | }, | 639 | }, |
595 | }; | 640 | }; |
596 | 641 | ||
642 | /* correct the 0dB offset of input pins */ | ||
643 | static void cs4208_fix_amp_caps(struct hda_codec *codec, hda_nid_t adc) | ||
644 | { | ||
645 | unsigned int caps; | ||
646 | |||
647 | caps = query_amp_caps(codec, adc, HDA_INPUT); | ||
648 | caps &= ~(AC_AMPCAP_OFFSET); | ||
649 | caps |= 0x02; | ||
650 | snd_hda_override_amp_caps(codec, adc, HDA_INPUT, caps); | ||
651 | } | ||
652 | |||
597 | static int patch_cs4208(struct hda_codec *codec) | 653 | static int patch_cs4208(struct hda_codec *codec) |
598 | { | 654 | { |
599 | struct cs_spec *spec; | 655 | struct cs_spec *spec; |
600 | int err; | 656 | int err; |
601 | 657 | ||
602 | spec = cs_alloc_spec(codec, 0); /* no specific w/a */ | 658 | spec = cs_alloc_spec(codec, CS4208_VENDOR_NID); |
603 | if (!spec) | 659 | if (!spec) |
604 | return -ENOMEM; | 660 | return -ENOMEM; |
605 | 661 | ||
@@ -609,6 +665,12 @@ static int patch_cs4208(struct hda_codec *codec) | |||
609 | cs4208_fixups); | 665 | cs4208_fixups); |
610 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); | 666 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
611 | 667 | ||
668 | snd_hda_override_wcaps(codec, 0x18, | ||
669 | get_wcaps(codec, 0x18) | AC_WCAP_STEREO); | ||
670 | cs4208_fix_amp_caps(codec, 0x18); | ||
671 | cs4208_fix_amp_caps(codec, 0x1b); | ||
672 | cs4208_fix_amp_caps(codec, 0x1c); | ||
673 | |||
612 | err = cs_parse_auto_config(codec); | 674 | err = cs_parse_auto_config(codec); |
613 | if (err < 0) | 675 | if (err < 0) |
614 | goto error; | 676 | goto error; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 4edd2d0f9a3c..ec68eaea0336 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3231,6 +3231,7 @@ enum { | |||
3231 | CXT_FIXUP_INC_MIC_BOOST, | 3231 | CXT_FIXUP_INC_MIC_BOOST, |
3232 | CXT_FIXUP_HEADPHONE_MIC_PIN, | 3232 | CXT_FIXUP_HEADPHONE_MIC_PIN, |
3233 | CXT_FIXUP_HEADPHONE_MIC, | 3233 | CXT_FIXUP_HEADPHONE_MIC, |
3234 | CXT_FIXUP_GPIO1, | ||
3234 | }; | 3235 | }; |
3235 | 3236 | ||
3236 | static void cxt_fixup_stereo_dmic(struct hda_codec *codec, | 3237 | static void cxt_fixup_stereo_dmic(struct hda_codec *codec, |
@@ -3375,6 +3376,15 @@ static const struct hda_fixup cxt_fixups[] = { | |||
3375 | .type = HDA_FIXUP_FUNC, | 3376 | .type = HDA_FIXUP_FUNC, |
3376 | .v.func = cxt_fixup_headphone_mic, | 3377 | .v.func = cxt_fixup_headphone_mic, |
3377 | }, | 3378 | }, |
3379 | [CXT_FIXUP_GPIO1] = { | ||
3380 | .type = HDA_FIXUP_VERBS, | ||
3381 | .v.verbs = (const struct hda_verb[]) { | ||
3382 | { 0x01, AC_VERB_SET_GPIO_MASK, 0x01 }, | ||
3383 | { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01 }, | ||
3384 | { 0x01, AC_VERB_SET_GPIO_DATA, 0x01 }, | ||
3385 | { } | ||
3386 | }, | ||
3387 | }, | ||
3378 | }; | 3388 | }; |
3379 | 3389 | ||
3380 | static const struct snd_pci_quirk cxt5051_fixups[] = { | 3390 | static const struct snd_pci_quirk cxt5051_fixups[] = { |
@@ -3384,6 +3394,7 @@ static const struct snd_pci_quirk cxt5051_fixups[] = { | |||
3384 | 3394 | ||
3385 | static const struct snd_pci_quirk cxt5066_fixups[] = { | 3395 | static const struct snd_pci_quirk cxt5066_fixups[] = { |
3386 | SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC), | 3396 | SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC), |
3397 | SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_GPIO1), | ||
3387 | SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), | 3398 | SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), |
3388 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), | 3399 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410), |
3389 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410), | 3400 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410), |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 00e041333904..b899eba6f279 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -976,6 +976,14 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, | |||
976 | } | 976 | } |
977 | 977 | ||
978 | /* | 978 | /* |
979 | * always configure channel mapping, it may have been changed by the | ||
980 | * user in the meantime | ||
981 | */ | ||
982 | hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, | ||
983 | channels, per_pin->chmap, | ||
984 | per_pin->chmap_set); | ||
985 | |||
986 | /* | ||
979 | * sizeof(ai) is used instead of sizeof(*hdmi_ai) or | 987 | * sizeof(ai) is used instead of sizeof(*hdmi_ai) or |
980 | * sizeof(*dp_ai) to avoid partial match/update problems when | 988 | * sizeof(*dp_ai) to avoid partial match/update problems when |
981 | * the user switches between HDMI/DP monitors. | 989 | * the user switches between HDMI/DP monitors. |
@@ -986,20 +994,10 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, | |||
986 | "pin=%d channels=%d ca=0x%02x\n", | 994 | "pin=%d channels=%d ca=0x%02x\n", |
987 | pin_nid, | 995 | pin_nid, |
988 | active_channels, ca); | 996 | active_channels, ca); |
989 | hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, | ||
990 | channels, per_pin->chmap, | ||
991 | per_pin->chmap_set); | ||
992 | hdmi_stop_infoframe_trans(codec, pin_nid); | 997 | hdmi_stop_infoframe_trans(codec, pin_nid); |
993 | hdmi_fill_audio_infoframe(codec, pin_nid, | 998 | hdmi_fill_audio_infoframe(codec, pin_nid, |
994 | ai.bytes, sizeof(ai)); | 999 | ai.bytes, sizeof(ai)); |
995 | hdmi_start_infoframe_trans(codec, pin_nid); | 1000 | hdmi_start_infoframe_trans(codec, pin_nid); |
996 | } else { | ||
997 | /* For non-pcm audio switch, setup new channel mapping | ||
998 | * accordingly */ | ||
999 | if (per_pin->non_pcm != non_pcm) | ||
1000 | hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, | ||
1001 | channels, per_pin->chmap, | ||
1002 | per_pin->chmap_set); | ||
1003 | } | 1001 | } |
1004 | 1002 | ||
1005 | per_pin->non_pcm = non_pcm; | 1003 | per_pin->non_pcm = non_pcm; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bc07d369fac4..52c26d3a61d4 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3439,6 +3439,9 @@ static void alc283_fixup_chromebook(struct hda_codec *codec, | |||
3439 | /* Set to manual mode */ | 3439 | /* Set to manual mode */ |
3440 | val = alc_read_coef_idx(codec, 0x06); | 3440 | val = alc_read_coef_idx(codec, 0x06); |
3441 | alc_write_coef_idx(codec, 0x06, val & ~0x000c); | 3441 | alc_write_coef_idx(codec, 0x06, val & ~0x000c); |
3442 | /* Enable Line1 input control by verb */ | ||
3443 | val = alc_read_coef_idx(codec, 0x1a); | ||
3444 | alc_write_coef_idx(codec, 0x1a, val | (1 << 4)); | ||
3442 | break; | 3445 | break; |
3443 | } | 3446 | } |
3444 | } | 3447 | } |
@@ -3493,6 +3496,15 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec, | |||
3493 | } | 3496 | } |
3494 | } | 3497 | } |
3495 | 3498 | ||
3499 | static void alc290_fixup_mono_speakers(struct hda_codec *codec, | ||
3500 | const struct hda_fixup *fix, int action) | ||
3501 | { | ||
3502 | if (action == HDA_FIXUP_ACT_PRE_PROBE) | ||
3503 | /* Remove DAC node 0x03, as it seems to be | ||
3504 | giving mono output */ | ||
3505 | snd_hda_override_wcaps(codec, 0x03, 0); | ||
3506 | } | ||
3507 | |||
3496 | enum { | 3508 | enum { |
3497 | ALC269_FIXUP_SONY_VAIO, | 3509 | ALC269_FIXUP_SONY_VAIO, |
3498 | ALC275_FIXUP_SONY_VAIO_GPIO2, | 3510 | ALC275_FIXUP_SONY_VAIO_GPIO2, |
@@ -3519,6 +3531,7 @@ enum { | |||
3519 | ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, | 3531 | ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, |
3520 | ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, | 3532 | ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, |
3521 | ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, | 3533 | ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, |
3534 | ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, | ||
3522 | ALC269_FIXUP_HEADSET_MODE, | 3535 | ALC269_FIXUP_HEADSET_MODE, |
3523 | ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, | 3536 | ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, |
3524 | ALC269_FIXUP_ASUS_X101_FUNC, | 3537 | ALC269_FIXUP_ASUS_X101_FUNC, |
@@ -3531,6 +3544,8 @@ enum { | |||
3531 | ALC269VB_FIXUP_ORDISSIMO_EVE2, | 3544 | ALC269VB_FIXUP_ORDISSIMO_EVE2, |
3532 | ALC283_FIXUP_CHROME_BOOK, | 3545 | ALC283_FIXUP_CHROME_BOOK, |
3533 | ALC282_FIXUP_ASUS_TX300, | 3546 | ALC282_FIXUP_ASUS_TX300, |
3547 | ALC283_FIXUP_INT_MIC, | ||
3548 | ALC290_FIXUP_MONO_SPEAKERS, | ||
3534 | }; | 3549 | }; |
3535 | 3550 | ||
3536 | static const struct hda_fixup alc269_fixups[] = { | 3551 | static const struct hda_fixup alc269_fixups[] = { |
@@ -3708,6 +3723,15 @@ static const struct hda_fixup alc269_fixups[] = { | |||
3708 | .chained = true, | 3723 | .chained = true, |
3709 | .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC | 3724 | .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC |
3710 | }, | 3725 | }, |
3726 | [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = { | ||
3727 | .type = HDA_FIXUP_PINS, | ||
3728 | .v.pins = (const struct hda_pintbl[]) { | ||
3729 | { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ | ||
3730 | { } | ||
3731 | }, | ||
3732 | .chained = true, | ||
3733 | .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC | ||
3734 | }, | ||
3711 | [ALC269_FIXUP_HEADSET_MODE] = { | 3735 | [ALC269_FIXUP_HEADSET_MODE] = { |
3712 | .type = HDA_FIXUP_FUNC, | 3736 | .type = HDA_FIXUP_FUNC, |
3713 | .v.func = alc_fixup_headset_mode, | 3737 | .v.func = alc_fixup_headset_mode, |
@@ -3790,6 +3814,22 @@ static const struct hda_fixup alc269_fixups[] = { | |||
3790 | .type = HDA_FIXUP_FUNC, | 3814 | .type = HDA_FIXUP_FUNC, |
3791 | .v.func = alc282_fixup_asus_tx300, | 3815 | .v.func = alc282_fixup_asus_tx300, |
3792 | }, | 3816 | }, |
3817 | [ALC283_FIXUP_INT_MIC] = { | ||
3818 | .type = HDA_FIXUP_VERBS, | ||
3819 | .v.verbs = (const struct hda_verb[]) { | ||
3820 | {0x20, AC_VERB_SET_COEF_INDEX, 0x1a}, | ||
3821 | {0x20, AC_VERB_SET_PROC_COEF, 0x0011}, | ||
3822 | { } | ||
3823 | }, | ||
3824 | .chained = true, | ||
3825 | .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST | ||
3826 | }, | ||
3827 | [ALC290_FIXUP_MONO_SPEAKERS] = { | ||
3828 | .type = HDA_FIXUP_FUNC, | ||
3829 | .v.func = alc290_fixup_mono_speakers, | ||
3830 | .chained = true, | ||
3831 | .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, | ||
3832 | }, | ||
3793 | }; | 3833 | }; |
3794 | 3834 | ||
3795 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 3835 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
@@ -3831,6 +3871,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
3831 | SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3871 | SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3832 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3872 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3833 | SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3873 | SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3874 | SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), | ||
3834 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 3875 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
3835 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 3876 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
3836 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), | 3877 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), |
@@ -3874,7 +3915,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
3874 | SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 3915 | SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
3875 | SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 3916 | SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
3876 | SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 3917 | SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
3877 | SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 3918 | SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), |
3878 | SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 3919 | SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
3879 | SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 3920 | SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
3880 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), | 3921 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), |
diff --git a/sound/soc/blackfin/bf6xx-i2s.c b/sound/soc/blackfin/bf6xx-i2s.c index c02405cc007d..5810a0603f2f 100644 --- a/sound/soc/blackfin/bf6xx-i2s.c +++ b/sound/soc/blackfin/bf6xx-i2s.c | |||
@@ -88,6 +88,7 @@ static int bfin_i2s_hw_params(struct snd_pcm_substream *substream, | |||
88 | case SNDRV_PCM_FORMAT_S8: | 88 | case SNDRV_PCM_FORMAT_S8: |
89 | param.spctl |= 0x70; | 89 | param.spctl |= 0x70; |
90 | sport->wdsize = 1; | 90 | sport->wdsize = 1; |
91 | break; | ||
91 | case SNDRV_PCM_FORMAT_S16_LE: | 92 | case SNDRV_PCM_FORMAT_S16_LE: |
92 | param.spctl |= 0xf0; | 93 | param.spctl |= 0xf0; |
93 | sport->wdsize = 2; | 94 | sport->wdsize = 2; |
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index 8af04343cc1a..259d1ac4492f 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c | |||
@@ -349,6 +349,9 @@ static int snd_soc_put_volsw_2r_st(struct snd_kcontrol *kcontrol, | |||
349 | val = ucontrol->value.integer.value[0]; | 349 | val = ucontrol->value.integer.value[0]; |
350 | val2 = ucontrol->value.integer.value[1]; | 350 | val2 = ucontrol->value.integer.value[1]; |
351 | 351 | ||
352 | if (val >= ARRAY_SIZE(st_table) || val2 >= ARRAY_SIZE(st_table)) | ||
353 | return -EINVAL; | ||
354 | |||
352 | err = snd_soc_update_bits(codec, reg, 0x3f, st_table[val].m); | 355 | err = snd_soc_update_bits(codec, reg, 0x3f, st_table[val].m); |
353 | if (err < 0) | 356 | if (err < 0) |
354 | return err; | 357 | return err; |
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index b8ba0adacfce..80555d7551e6 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c | |||
@@ -1225,13 +1225,18 @@ static int anc_status_control_put(struct snd_kcontrol *kcontrol, | |||
1225 | struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); | 1225 | struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); |
1226 | struct device *dev = codec->dev; | 1226 | struct device *dev = codec->dev; |
1227 | bool apply_fir, apply_iir; | 1227 | bool apply_fir, apply_iir; |
1228 | int req, status; | 1228 | unsigned int req; |
1229 | int status; | ||
1229 | 1230 | ||
1230 | dev_dbg(dev, "%s: Enter.\n", __func__); | 1231 | dev_dbg(dev, "%s: Enter.\n", __func__); |
1231 | 1232 | ||
1232 | mutex_lock(&drvdata->anc_lock); | 1233 | mutex_lock(&drvdata->anc_lock); |
1233 | 1234 | ||
1234 | req = ucontrol->value.integer.value[0]; | 1235 | req = ucontrol->value.integer.value[0]; |
1236 | if (req >= ARRAY_SIZE(enum_anc_state)) { | ||
1237 | status = -EINVAL; | ||
1238 | goto cleanup; | ||
1239 | } | ||
1235 | if (req != ANC_APPLY_FIR_IIR && req != ANC_APPLY_FIR && | 1240 | if (req != ANC_APPLY_FIR_IIR && req != ANC_APPLY_FIR && |
1236 | req != ANC_APPLY_IIR) { | 1241 | req != ANC_APPLY_IIR) { |
1237 | dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n", | 1242 | dev_err(dev, "%s: ERROR: Unsupported status to set '%s'!\n", |
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 41cdd1642970..8dbcacd44e6a 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c | |||
@@ -1863,7 +1863,7 @@ static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol, | |||
1863 | struct max98095_pdata *pdata = max98095->pdata; | 1863 | struct max98095_pdata *pdata = max98095->pdata; |
1864 | int channel = max98095_get_eq_channel(kcontrol->id.name); | 1864 | int channel = max98095_get_eq_channel(kcontrol->id.name); |
1865 | struct max98095_cdata *cdata; | 1865 | struct max98095_cdata *cdata; |
1866 | int sel = ucontrol->value.integer.value[0]; | 1866 | unsigned int sel = ucontrol->value.integer.value[0]; |
1867 | struct max98095_eq_cfg *coef_set; | 1867 | struct max98095_eq_cfg *coef_set; |
1868 | int fs, best, best_val, i; | 1868 | int fs, best, best_val, i; |
1869 | int regmask, regsave; | 1869 | int regmask, regsave; |
@@ -2016,7 +2016,7 @@ static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol, | |||
2016 | struct max98095_pdata *pdata = max98095->pdata; | 2016 | struct max98095_pdata *pdata = max98095->pdata; |
2017 | int channel = max98095_get_bq_channel(codec, kcontrol->id.name); | 2017 | int channel = max98095_get_bq_channel(codec, kcontrol->id.name); |
2018 | struct max98095_cdata *cdata; | 2018 | struct max98095_cdata *cdata; |
2019 | int sel = ucontrol->value.integer.value[0]; | 2019 | unsigned int sel = ucontrol->value.integer.value[0]; |
2020 | struct max98095_biquad_cfg *coef_set; | 2020 | struct max98095_biquad_cfg *coef_set; |
2021 | int fs, best, best_val, i; | 2021 | int fs, best, best_val, i; |
2022 | int regmask, regsave; | 2022 | int regmask, regsave; |
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 46c5b4fdfc52..ca1be1d9dcf0 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c | |||
@@ -62,7 +62,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
62 | struct device_node *ssi_np, *codec_np; | 62 | struct device_node *ssi_np, *codec_np; |
63 | struct platform_device *ssi_pdev; | 63 | struct platform_device *ssi_pdev; |
64 | struct i2c_client *codec_dev; | 64 | struct i2c_client *codec_dev; |
65 | struct imx_sgtl5000_data *data; | 65 | struct imx_sgtl5000_data *data = NULL; |
66 | int int_port, ext_port; | 66 | int int_port, ext_port; |
67 | int ret; | 67 | int ret; |
68 | 68 | ||
@@ -128,7 +128,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
128 | goto fail; | 128 | goto fail; |
129 | } | 129 | } |
130 | 130 | ||
131 | data->codec_clk = devm_clk_get(&codec_dev->dev, NULL); | 131 | data->codec_clk = clk_get(&codec_dev->dev, NULL); |
132 | if (IS_ERR(data->codec_clk)) { | 132 | if (IS_ERR(data->codec_clk)) { |
133 | ret = PTR_ERR(data->codec_clk); | 133 | ret = PTR_ERR(data->codec_clk); |
134 | goto fail; | 134 | goto fail; |
@@ -172,6 +172,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |||
172 | return 0; | 172 | return 0; |
173 | 173 | ||
174 | fail: | 174 | fail: |
175 | if (data && !IS_ERR(data->codec_clk)) | ||
176 | clk_put(data->codec_clk); | ||
175 | if (ssi_np) | 177 | if (ssi_np) |
176 | of_node_put(ssi_np); | 178 | of_node_put(ssi_np); |
177 | if (codec_np) | 179 | if (codec_np) |
@@ -185,6 +187,7 @@ static int imx_sgtl5000_remove(struct platform_device *pdev) | |||
185 | struct imx_sgtl5000_data *data = platform_get_drvdata(pdev); | 187 | struct imx_sgtl5000_data *data = platform_get_drvdata(pdev); |
186 | 188 | ||
187 | snd_soc_unregister_card(&data->card); | 189 | snd_soc_unregister_card(&data->card); |
190 | clk_put(data->codec_clk); | ||
188 | 191 | ||
189 | return 0; | 192 | return 0; |
190 | } | 193 | } |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4d0561312f3b..1a38be0d0ca8 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1380,7 +1380,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order) | |||
1380 | return -ENODEV; | 1380 | return -ENODEV; |
1381 | 1381 | ||
1382 | list_add(&cpu_dai->dapm.list, &card->dapm_list); | 1382 | list_add(&cpu_dai->dapm.list, &card->dapm_list); |
1383 | snd_soc_dapm_new_dai_widgets(&cpu_dai->dapm, cpu_dai); | ||
1384 | } | 1383 | } |
1385 | 1384 | ||
1386 | if (cpu_dai->driver->probe) { | 1385 | if (cpu_dai->driver->probe) { |
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 63fb5219f0f8..6234a51625b1 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c | |||
@@ -299,19 +299,6 @@ static void usX2Y_error_urb_status(struct usX2Ydev *usX2Y, | |||
299 | usX2Y_clients_stop(usX2Y); | 299 | usX2Y_clients_stop(usX2Y); |
300 | } | 300 | } |
301 | 301 | ||
302 | static void usX2Y_error_sequence(struct usX2Ydev *usX2Y, | ||
303 | struct snd_usX2Y_substream *subs, struct urb *urb) | ||
304 | { | ||
305 | snd_printk(KERN_ERR | ||
306 | "Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n" | ||
307 | "Most probably some urb of usb-frame %i is still missing.\n" | ||
308 | "Cause could be too long delays in usb-hcd interrupt handling.\n", | ||
309 | usb_get_current_frame_number(usX2Y->dev), | ||
310 | subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", | ||
311 | usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame); | ||
312 | usX2Y_clients_stop(usX2Y); | ||
313 | } | ||
314 | |||
315 | static void i_usX2Y_urb_complete(struct urb *urb) | 302 | static void i_usX2Y_urb_complete(struct urb *urb) |
316 | { | 303 | { |
317 | struct snd_usX2Y_substream *subs = urb->context; | 304 | struct snd_usX2Y_substream *subs = urb->context; |
@@ -328,12 +315,9 @@ static void i_usX2Y_urb_complete(struct urb *urb) | |||
328 | usX2Y_error_urb_status(usX2Y, subs, urb); | 315 | usX2Y_error_urb_status(usX2Y, subs, urb); |
329 | return; | 316 | return; |
330 | } | 317 | } |
331 | if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF))) | 318 | |
332 | subs->completed_urb = urb; | 319 | subs->completed_urb = urb; |
333 | else { | 320 | |
334 | usX2Y_error_sequence(usX2Y, subs, urb); | ||
335 | return; | ||
336 | } | ||
337 | { | 321 | { |
338 | struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE], | 322 | struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE], |
339 | *playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; | 323 | *playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; |
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index f2a1acdc4d83..814d0e887c62 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c | |||
@@ -244,13 +244,8 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb) | |||
244 | usX2Y_error_urb_status(usX2Y, subs, urb); | 244 | usX2Y_error_urb_status(usX2Y, subs, urb); |
245 | return; | 245 | return; |
246 | } | 246 | } |
247 | if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF))) | ||
248 | subs->completed_urb = urb; | ||
249 | else { | ||
250 | usX2Y_error_sequence(usX2Y, subs, urb); | ||
251 | return; | ||
252 | } | ||
253 | 247 | ||
248 | subs->completed_urb = urb; | ||
254 | capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; | 249 | capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; |
255 | capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; | 250 | capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; |
256 | playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; | 251 | playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; |