Merge tag 'sound-fix-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Two peaks in diffstat are for the audio EQ init of IDT codecs and the
EMU2004 usb mixer addition, both of which are pretty device-specific,
so safe to apply. The rest are a bunch of small fixes, most of them
are regression fixes"

* tag 'sound-fix-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits)
ALSA: hda - load EQ params into IDT codec on HP bNB13 systems
ASoC: cs42l52: Correct MIC CTL mask
ASoC: wm8962: Turn on regcache_cache_only before disabling regulator
ALSA: jack: Unregister input device at disconnection
ALSA: pcsp: Fix the order of input device unregistration
ASoC: fsl: imx-pcm-fiq: omit fiq counter to avoid harm in unbalanced situations
ASoC: blackfin: Fix missing break
ALSA: usb-audio: add front jack channel selector for EMU0204
ALSA: hda - Don't clear the power state at snd_hda_codec_reset()
ASoC: arizona: Fix typo in name of EQ coefficient controls
ALSA: hda - Control EAPD for Master volume on Lenovo N100
ALSA: hda - Don't turn off EAPD for headphone on Lenovo N100
ALSA: isa: not allocating enough space
ALSA: snd-aoa: two copy and paste bugs
ASoC: wm8997: Correct typo in ISRC mux routes
ALSA: hda - Check keep_eapd_on before inv_eapd
ALSA: hda - Fix Line Out automute on Realtek multifunction jacks
ALSA: msnd: Avoid duplicated driver name
ALSA: compress_core: don't return -EBADFD from poll if paused
ALSA: hda - hdmi: Fix wrong baseline length in ATI/AMD generated ELD
...

+803 -76
+2 -2
sound/aoa/fabrics/layout.c
··· 644 644 struct snd_ctl_elem_value *ucontrol) \ 645 645 { \ 646 646 struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \ 647 - if (gpio->methods && gpio->methods->get_##n) \ 647 + if (gpio->methods && gpio->methods->set_##n) \ 648 648 gpio->methods->set_##n(gpio, \ 649 649 !!ucontrol->value.integer.value[0]); \ 650 650 return 1; \ ··· 1135 1135 { 1136 1136 struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev); 1137 1137 1138 - if (ldev->gpio.methods && ldev->gpio.methods->all_amps_off) 1138 + if (ldev->gpio.methods && ldev->gpio.methods->all_amps_restore) 1139 1139 ldev->gpio.methods->all_amps_restore(&ldev->gpio); 1140 1140 1141 1141 return 0;
+1 -2
sound/core/compress_offload.c
··· 384 384 return -EFAULT; 385 385 386 386 mutex_lock(&stream->device->lock); 387 - if (stream->runtime->state == SNDRV_PCM_STATE_PAUSED || 388 - stream->runtime->state == SNDRV_PCM_STATE_OPEN) { 387 + if (stream->runtime->state == SNDRV_PCM_STATE_OPEN) { 389 388 retval = -EBADFD; 390 389 goto out; 391 390 }
+16 -3
sound/core/jack.c
··· 34 34 SW_LINEIN_INSERT, 35 35 }; 36 36 37 - static int snd_jack_dev_free(struct snd_device *device) 37 + static int snd_jack_dev_disconnect(struct snd_device *device) 38 38 { 39 39 struct snd_jack *jack = device->device_data; 40 40 41 - if (jack->private_free) 42 - jack->private_free(jack); 41 + if (!jack->input_dev) 42 + return 0; 43 43 44 44 /* If the input device is registered with the input subsystem 45 45 * then we need to use a different deallocator. */ ··· 47 47 input_unregister_device(jack->input_dev); 48 48 else 49 49 input_free_device(jack->input_dev); 50 + jack->input_dev = NULL; 51 + return 0; 52 + } 53 + 54 + static int snd_jack_dev_free(struct snd_device *device) 55 + { 56 + struct snd_jack *jack = device->device_data; 57 + 58 + if (jack->private_free) 59 + jack->private_free(jack); 60 + 61 + snd_jack_dev_disconnect(device); 50 62 51 63 kfree(jack->id); 52 64 kfree(jack); ··· 122 110 static struct snd_device_ops ops = { 123 111 .dev_free = snd_jack_dev_free, 124 112 .dev_register = snd_jack_dev_register, 113 + .dev_disconnect = snd_jack_dev_disconnect, 125 114 }; 126 115 127 116 jack = kzalloc(sizeof(struct snd_jack), GFP_KERNEL);
+1 -1
sound/drivers/pcsp/pcsp.c
··· 188 188 static int pcsp_remove(struct platform_device *dev) 189 189 { 190 190 struct snd_pcsp *chip = platform_get_drvdata(dev); 191 - alsa_card_pcsp_exit(chip); 192 191 pcspkr_input_remove(chip->input_dev); 192 + alsa_card_pcsp_exit(chip); 193 193 return 0; 194 194 } 195 195
+2 -2
sound/isa/msnd/msnd_pinnacle.c
··· 73 73 #ifdef MSND_CLASSIC 74 74 # include "msnd_classic.h" 75 75 # define LOGNAME "msnd_classic" 76 + # define DEV_NAME "msnd-classic" 76 77 #else 77 78 # include "msnd_pinnacle.h" 78 79 # define LOGNAME "snd_msnd_pinnacle" 80 + # define DEV_NAME "msnd-pinnacle" 79 81 #endif 80 82 81 83 static void set_default_audio_parameters(struct snd_msnd *chip) ··· 1068 1066 snd_msnd_unload(dev_get_drvdata(pdev)); 1069 1067 return 0; 1070 1068 } 1071 - 1072 - #define DEV_NAME "msnd-pinnacle" 1073 1069 1074 1070 static struct isa_driver snd_msnd_driver = { 1075 1071 .match = snd_msnd_isa_match,
+1 -1
sound/isa/wavefront/wavefront_synth.c
··· 1196 1196 int num_samples; 1197 1197 unsigned char *msample_hdr; 1198 1198 1199 - msample_hdr = kmalloc(sizeof(WF_MSAMPLE_BYTES), GFP_KERNEL); 1199 + msample_hdr = kmalloc(WF_MSAMPLE_BYTES, GFP_KERNEL); 1200 1200 if (! msample_hdr) 1201 1201 return -ENOMEM; 1202 1202
-3
sound/pci/hda/hda_codec.c
··· 2579 2579 cancel_delayed_work_sync(&codec->jackpoll_work); 2580 2580 #ifdef CONFIG_PM 2581 2581 cancel_delayed_work_sync(&codec->power_work); 2582 - codec->power_on = 0; 2583 - codec->power_transition = 0; 2584 - codec->power_jiffies = jiffies; 2585 2582 flush_workqueue(bus->workq); 2586 2583 #endif 2587 2584 snd_hda_ctls_clear(codec);
+29 -8
sound/pci/hda/hda_eld.c
··· 680 680 681 681 spkalloc = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SPEAKER_ALLOCATION, 0); 682 682 683 - if (!spkalloc) { 683 + if (spkalloc <= 0) { 684 684 snd_printd(KERN_INFO "HDMI ATI/AMD: no speaker allocation for ELD\n"); 685 685 return -EINVAL; 686 686 } ··· 742 742 snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_AUDIO_DESCRIPTOR, i << 3); 743 743 ati_sad = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_AUDIO_DESCRIPTOR, 0); 744 744 745 + if (ati_sad <= 0) 746 + continue; 747 + 745 748 if (ati_sad & ATI_AUDIODESC_RATES) { 746 749 /* format is supported, copy SAD as-is */ 747 750 buf[pos++] = (ati_sad & 0x0000ff) >> 0; ··· 768 765 return -EINVAL; 769 766 } 770 767 768 + /* 769 + * HDMI VSDB latency format: 770 + * separately for both audio and video: 771 + * 0 field not valid or unknown latency 772 + * [1..251] msecs = (x-1)*2 (max 500ms with x = 251 = 0xfb) 773 + * 255 audio/video not supported 774 + * 775 + * HDA latency format: 776 + * single value indicating video latency relative to audio: 777 + * 0 unknown or 0ms 778 + * [1..250] msecs = x*2 (max 500ms with x = 250 = 0xfa) 779 + * [251..255] reserved 780 + */ 771 781 aud_synch = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_AUDIO_VIDEO_DELAY, 0); 772 782 if ((aud_synch & ATI_DELAY_VIDEO_LATENCY) && (aud_synch & ATI_DELAY_AUDIO_LATENCY)) { 773 - int video_latency = (aud_synch & ATI_DELAY_VIDEO_LATENCY) - 1; 774 - int audio_latency = ((aud_synch & ATI_DELAY_AUDIO_LATENCY) >> 8) - 1; 783 + int video_latency_hdmi = (aud_synch & ATI_DELAY_VIDEO_LATENCY); 784 + int audio_latency_hdmi = (aud_synch & ATI_DELAY_AUDIO_LATENCY) >> 8; 775 785 776 - if (video_latency > audio_latency) 777 - buf[6] = min(video_latency - audio_latency, 0xfa); 786 + if (video_latency_hdmi <= 0xfb && audio_latency_hdmi <= 0xfb && 787 + video_latency_hdmi > audio_latency_hdmi) 788 + buf[6] = video_latency_hdmi - audio_latency_hdmi; 789 + /* else unknown/invalid or 0ms or video ahead of audio, so use zero */ 778 790 } 779 - 780 - /* Baseline length */ 781 - buf[2] = pos - 4; 782 791 783 792 /* SAD count */ 784 793 buf[5] |= ((pos - ELD_FIXED_BYTES - sink_desc_len) / 3) << 4; 794 + 795 + /* Baseline ELD block length is 4-byte aligned */ 796 + pos = round_up(pos, 4); 797 + 798 + /* Baseline ELD length (4-byte header is not counted in) */ 799 + buf[2] = (pos - 4) / 4; 785 800 786 801 *eld_size = pos; 787 802
+2 -2
sound/pci/hda/hda_generic.c
··· 796 796 if (spec->own_eapd_ctl || 797 797 !(snd_hda_query_pin_caps(codec, pin) & AC_PINCAP_EAPD)) 798 798 return; 799 - if (codec->inv_eapd) 800 - enable = !enable; 801 799 if (spec->keep_eapd_on && !enable) 802 800 return; 801 + if (codec->inv_eapd) 802 + enable = !enable; 803 803 snd_hda_codec_update_cache(codec, pin, 0, 804 804 AC_VERB_SET_EAPD_BTLENABLE, 805 805 enable ? 0x02 : 0x00);
+19 -14
sound/pci/hda/patch_analog.c
··· 139 139 } 140 140 #endif 141 141 142 + /* follow EAPD via vmaster hook */ 143 + static void ad_vmaster_eapd_hook(void *private_data, int enabled) 144 + { 145 + struct hda_codec *codec = private_data; 146 + struct ad198x_spec *spec = codec->spec; 147 + 148 + if (!spec->eapd_nid) 149 + return; 150 + snd_hda_codec_update_cache(codec, spec->eapd_nid, 0, 151 + AC_VERB_SET_EAPD_BTLENABLE, 152 + enabled ? 0x02 : 0x00); 153 + } 142 154 143 155 /* 144 156 * Automatic parse of I/O pins from the BIOS configuration ··· 231 219 static void ad_fixup_inv_jack_detect(struct hda_codec *codec, 232 220 const struct hda_fixup *fix, int action) 233 221 { 234 - if (action == HDA_FIXUP_ACT_PRE_PROBE) 222 + struct ad198x_spec *spec = codec->spec; 223 + 224 + if (action == HDA_FIXUP_ACT_PRE_PROBE) { 235 225 codec->inv_jack_detect = 1; 226 + spec->gen.keep_eapd_on = 1; 227 + spec->gen.vmaster_mute.hook = ad_vmaster_eapd_hook; 228 + spec->eapd_nid = 0x1b; 229 + } 236 230 } 237 231 238 232 enum { ··· 482 464 /* 483 465 * AD1981 HD specific 484 466 */ 485 - 486 - /* follow EAPD via vmaster hook */ 487 - static void ad_vmaster_eapd_hook(void *private_data, int enabled) 488 - { 489 - struct hda_codec *codec = private_data; 490 - struct ad198x_spec *spec = codec->spec; 491 - 492 - if (!spec->eapd_nid) 493 - return; 494 - snd_hda_codec_update_cache(codec, spec->eapd_nid, 0, 495 - AC_VERB_SET_EAPD_BTLENABLE, 496 - enabled ? 0x02 : 0x00); 497 - } 498 467 499 468 static void ad1981_fixup_hp_eapd(struct hda_codec *codec, 500 469 const struct hda_fixup *fix, int action)
+55 -1
sound/pci/hda/patch_cirrus.c
··· 47 47 unsigned int spdif_present:1; 48 48 unsigned int sense_b:1; 49 49 hda_nid_t vendor_nid; 50 + 51 + /* for MBP SPDIF control */ 52 + int (*spdif_sw_put)(struct snd_kcontrol *kcontrol, 53 + struct snd_ctl_elem_value *ucontrol); 50 54 }; 51 55 52 56 /* available models with CS420x */ ··· 335 331 return 0; 336 332 } 337 333 334 + static int cs_build_controls(struct hda_codec *codec) 335 + { 336 + int err; 337 + 338 + err = snd_hda_gen_build_controls(codec); 339 + if (err < 0) 340 + return err; 341 + snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_BUILD); 342 + return 0; 343 + } 344 + 338 345 #define cs_free snd_hda_gen_free 339 346 340 347 static const struct hda_codec_ops cs_patch_ops = { 341 - .build_controls = snd_hda_gen_build_controls, 348 + .build_controls = cs_build_controls, 342 349 .build_pcms = snd_hda_gen_build_pcms, 343 350 .init = cs_init, 344 351 .free = cs_free, ··· 614 599 enum { 615 600 CS4208_MAC_AUTO, 616 601 CS4208_MBA6, 602 + CS4208_MBP11, 617 603 CS4208_GPIO0, 618 604 }; 619 605 620 606 static const struct hda_model_fixup cs4208_models[] = { 621 607 { .id = CS4208_GPIO0, .name = "gpio0" }, 622 608 { .id = CS4208_MBA6, .name = "mba6" }, 609 + { .id = CS4208_MBP11, .name = "mbp11" }, 623 610 {} 624 611 }; 625 612 ··· 632 615 633 616 /* codec SSID matching */ 634 617 static const struct snd_pci_quirk cs4208_mac_fixup_tbl[] = { 618 + SND_PCI_QUIRK(0x106b, 0x5e00, "MacBookPro 11,2", CS4208_MBP11), 635 619 SND_PCI_QUIRK(0x106b, 0x7100, "MacBookAir 6,1", CS4208_MBA6), 636 620 SND_PCI_QUIRK(0x106b, 0x7200, "MacBookAir 6,2", CS4208_MBA6), 637 621 {} /* terminator */ ··· 664 646 snd_hda_apply_fixup(codec, action); 665 647 } 666 648 649 + static int cs4208_spdif_sw_put(struct snd_kcontrol *kcontrol, 650 + struct snd_ctl_elem_value *ucontrol) 651 + { 652 + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 653 + struct cs_spec *spec = codec->spec; 654 + hda_nid_t pin = spec->gen.autocfg.dig_out_pins[0]; 655 + int pinctl = ucontrol->value.integer.value[0] ? PIN_OUT : 0; 656 + 657 + snd_hda_set_pin_ctl_cache(codec, pin, pinctl); 658 + return spec->spdif_sw_put(kcontrol, ucontrol); 659 + } 660 + 661 + /* hook the SPDIF switch */ 662 + static void cs4208_fixup_spdif_switch(struct hda_codec *codec, 663 + const struct hda_fixup *fix, int action) 664 + { 665 + if (action == HDA_FIXUP_ACT_BUILD) { 666 + struct cs_spec *spec = codec->spec; 667 + struct snd_kcontrol *kctl; 668 + 669 + if (!spec->gen.autocfg.dig_out_pins[0]) 670 + return; 671 + kctl = snd_hda_find_mixer_ctl(codec, "IEC958 Playback Switch"); 672 + if (!kctl) 673 + return; 674 + spec->spdif_sw_put = kctl->put; 675 + kctl->put = cs4208_spdif_sw_put; 676 + } 677 + } 678 + 667 679 static const struct hda_fixup cs4208_fixups[] = { 668 680 [CS4208_MBA6] = { 669 681 .type = HDA_FIXUP_PINS, 670 682 .v.pins = mba6_pincfgs, 683 + .chained = true, 684 + .chain_id = CS4208_GPIO0, 685 + }, 686 + [CS4208_MBP11] = { 687 + .type = HDA_FIXUP_FUNC, 688 + .v.func = cs4208_fixup_spdif_switch, 671 689 .chained = true, 672 690 .chain_id = CS4208_GPIO0, 673 691 },
+7 -4
sound/pci/hda/patch_hdmi.c
··· 763 763 { SNDRV_CHMAP_RC, RC }, 764 764 { SNDRV_CHMAP_FLC, FLC }, 765 765 { SNDRV_CHMAP_FRC, FRC }, 766 - { SNDRV_CHMAP_FLH, FLH }, 767 - { SNDRV_CHMAP_FRH, FRH }, 766 + { SNDRV_CHMAP_TFL, FLH }, 767 + { SNDRV_CHMAP_TFR, FRH }, 768 768 { SNDRV_CHMAP_FLW, FLW }, 769 769 { SNDRV_CHMAP_FRW, FRW }, 770 770 { SNDRV_CHMAP_TC, TC }, 771 - { SNDRV_CHMAP_FCH, FCH }, 771 + { SNDRV_CHMAP_TFC, FCH }, 772 772 {} /* terminator */ 773 773 }; 774 774 ··· 1246 1246 if (snd_hda_query_pin_caps(codec, pin_nid) & AC_PINCAP_HBR) { 1247 1247 pinctl = snd_hda_codec_read(codec, pin_nid, 0, 1248 1248 AC_VERB_GET_PIN_WIDGET_CONTROL, 0); 1249 + 1250 + if (pinctl < 0) 1251 + return hbr ? -EINVAL : 0; 1249 1252 1250 1253 new_pinctl = pinctl & ~AC_PINCTL_EPT; 1251 1254 if (hbr) ··· 3094 3091 int hbr_ctl, hbr_ctl_new; 3095 3092 3096 3093 hbr_ctl = snd_hda_codec_read(codec, pin_nid, 0, ATI_VERB_GET_HBR_CONTROL, 0); 3097 - if (hbr_ctl & ATI_HBR_CAPABLE) { 3094 + if (hbr_ctl >= 0 && (hbr_ctl & ATI_HBR_CAPABLE)) { 3098 3095 if (hbr) 3099 3096 hbr_ctl_new = hbr_ctl | ATI_HBR_ENABLE; 3100 3097 else
+3 -1
sound/pci/hda/patch_realtek.c
··· 3344 3344 else 3345 3345 new_headset_mode = ALC_HEADSET_MODE_HEADPHONE; 3346 3346 3347 - if (new_headset_mode == spec->current_headset_mode) 3347 + if (new_headset_mode == spec->current_headset_mode) { 3348 + snd_hda_gen_update_outputs(codec); 3348 3349 return; 3350 + } 3349 3351 3350 3352 switch (new_headset_mode) { 3351 3353 case ALC_HEADSET_MODE_UNPLUGGED:
+531 -1
sound/pci/hda/patch_sigmatel.c
··· 100 100 STAC_92HD83XXX_HEADSET_JACK, 101 101 STAC_92HD83XXX_HP, 102 102 STAC_HP_ENVY_BASS, 103 + STAC_HP_BNB13_EQ, 103 104 STAC_92HD83XXX_MODELS 104 105 }; 105 106 ··· 2107 2106 spec->headset_jack = 1; 2108 2107 } 2109 2108 2109 + static const struct hda_verb hp_bnb13_eq_verbs[] = { 2110 + /* 44.1KHz base */ 2111 + { 0x22, 0x7A6, 0x3E }, 2112 + { 0x22, 0x7A7, 0x68 }, 2113 + { 0x22, 0x7A8, 0x17 }, 2114 + { 0x22, 0x7A9, 0x3E }, 2115 + { 0x22, 0x7AA, 0x68 }, 2116 + { 0x22, 0x7AB, 0x17 }, 2117 + { 0x22, 0x7AC, 0x00 }, 2118 + { 0x22, 0x7AD, 0x80 }, 2119 + { 0x22, 0x7A6, 0x83 }, 2120 + { 0x22, 0x7A7, 0x2F }, 2121 + { 0x22, 0x7A8, 0xD1 }, 2122 + { 0x22, 0x7A9, 0x83 }, 2123 + { 0x22, 0x7AA, 0x2F }, 2124 + { 0x22, 0x7AB, 0xD1 }, 2125 + { 0x22, 0x7AC, 0x01 }, 2126 + { 0x22, 0x7AD, 0x80 }, 2127 + { 0x22, 0x7A6, 0x3E }, 2128 + { 0x22, 0x7A7, 0x68 }, 2129 + { 0x22, 0x7A8, 0x17 }, 2130 + { 0x22, 0x7A9, 0x3E }, 2131 + { 0x22, 0x7AA, 0x68 }, 2132 + { 0x22, 0x7AB, 0x17 }, 2133 + { 0x22, 0x7AC, 0x02 }, 2134 + { 0x22, 0x7AD, 0x80 }, 2135 + { 0x22, 0x7A6, 0x7C }, 2136 + { 0x22, 0x7A7, 0xC6 }, 2137 + { 0x22, 0x7A8, 0x0C }, 2138 + { 0x22, 0x7A9, 0x7C }, 2139 + { 0x22, 0x7AA, 0xC6 }, 2140 + { 0x22, 0x7AB, 0x0C }, 2141 + { 0x22, 0x7AC, 0x03 }, 2142 + { 0x22, 0x7AD, 0x80 }, 2143 + { 0x22, 0x7A6, 0xC3 }, 2144 + { 0x22, 0x7A7, 0x25 }, 2145 + { 0x22, 0x7A8, 0xAF }, 2146 + { 0x22, 0x7A9, 0xC3 }, 2147 + { 0x22, 0x7AA, 0x25 }, 2148 + { 0x22, 0x7AB, 0xAF }, 2149 + { 0x22, 0x7AC, 0x04 }, 2150 + { 0x22, 0x7AD, 0x80 }, 2151 + { 0x22, 0x7A6, 0x3E }, 2152 + { 0x22, 0x7A7, 0x85 }, 2153 + { 0x22, 0x7A8, 0x73 }, 2154 + { 0x22, 0x7A9, 0x3E }, 2155 + { 0x22, 0x7AA, 0x85 }, 2156 + { 0x22, 0x7AB, 0x73 }, 2157 + { 0x22, 0x7AC, 0x05 }, 2158 + { 0x22, 0x7AD, 0x80 }, 2159 + { 0x22, 0x7A6, 0x85 }, 2160 + { 0x22, 0x7A7, 0x39 }, 2161 + { 0x22, 0x7A8, 0xC7 }, 2162 + { 0x22, 0x7A9, 0x85 }, 2163 + { 0x22, 0x7AA, 0x39 }, 2164 + { 0x22, 0x7AB, 0xC7 }, 2165 + { 0x22, 0x7AC, 0x06 }, 2166 + { 0x22, 0x7AD, 0x80 }, 2167 + { 0x22, 0x7A6, 0x3C }, 2168 + { 0x22, 0x7A7, 0x90 }, 2169 + { 0x22, 0x7A8, 0xB0 }, 2170 + { 0x22, 0x7A9, 0x3C }, 2171 + { 0x22, 0x7AA, 0x90 }, 2172 + { 0x22, 0x7AB, 0xB0 }, 2173 + { 0x22, 0x7AC, 0x07 }, 2174 + { 0x22, 0x7AD, 0x80 }, 2175 + { 0x22, 0x7A6, 0x7A }, 2176 + { 0x22, 0x7A7, 0xC6 }, 2177 + { 0x22, 0x7A8, 0x39 }, 2178 + { 0x22, 0x7A9, 0x7A }, 2179 + { 0x22, 0x7AA, 0xC6 }, 2180 + { 0x22, 0x7AB, 0x39 }, 2181 + { 0x22, 0x7AC, 0x08 }, 2182 + { 0x22, 0x7AD, 0x80 }, 2183 + { 0x22, 0x7A6, 0xC4 }, 2184 + { 0x22, 0x7A7, 0xE9 }, 2185 + { 0x22, 0x7A8, 0xDC }, 2186 + { 0x22, 0x7A9, 0xC4 }, 2187 + { 0x22, 0x7AA, 0xE9 }, 2188 + { 0x22, 0x7AB, 0xDC }, 2189 + { 0x22, 0x7AC, 0x09 }, 2190 + { 0x22, 0x7AD, 0x80 }, 2191 + { 0x22, 0x7A6, 0x3D }, 2192 + { 0x22, 0x7A7, 0xE1 }, 2193 + { 0x22, 0x7A8, 0x0D }, 2194 + { 0x22, 0x7A9, 0x3D }, 2195 + { 0x22, 0x7AA, 0xE1 }, 2196 + { 0x22, 0x7AB, 0x0D }, 2197 + { 0x22, 0x7AC, 0x0A }, 2198 + { 0x22, 0x7AD, 0x80 }, 2199 + { 0x22, 0x7A6, 0x89 }, 2200 + { 0x22, 0x7A7, 0xB6 }, 2201 + { 0x22, 0x7A8, 0xEB }, 2202 + { 0x22, 0x7A9, 0x89 }, 2203 + { 0x22, 0x7AA, 0xB6 }, 2204 + { 0x22, 0x7AB, 0xEB }, 2205 + { 0x22, 0x7AC, 0x0B }, 2206 + { 0x22, 0x7AD, 0x80 }, 2207 + { 0x22, 0x7A6, 0x39 }, 2208 + { 0x22, 0x7A7, 0x9D }, 2209 + { 0x22, 0x7A8, 0xFE }, 2210 + { 0x22, 0x7A9, 0x39 }, 2211 + { 0x22, 0x7AA, 0x9D }, 2212 + { 0x22, 0x7AB, 0xFE }, 2213 + { 0x22, 0x7AC, 0x0C }, 2214 + { 0x22, 0x7AD, 0x80 }, 2215 + { 0x22, 0x7A6, 0x76 }, 2216 + { 0x22, 0x7A7, 0x49 }, 2217 + { 0x22, 0x7A8, 0x15 }, 2218 + { 0x22, 0x7A9, 0x76 }, 2219 + { 0x22, 0x7AA, 0x49 }, 2220 + { 0x22, 0x7AB, 0x15 }, 2221 + { 0x22, 0x7AC, 0x0D }, 2222 + { 0x22, 0x7AD, 0x80 }, 2223 + { 0x22, 0x7A6, 0xC8 }, 2224 + { 0x22, 0x7A7, 0x80 }, 2225 + { 0x22, 0x7A8, 0xF5 }, 2226 + { 0x22, 0x7A9, 0xC8 }, 2227 + { 0x22, 0x7AA, 0x80 }, 2228 + { 0x22, 0x7AB, 0xF5 }, 2229 + { 0x22, 0x7AC, 0x0E }, 2230 + { 0x22, 0x7AD, 0x80 }, 2231 + { 0x22, 0x7A6, 0x40 }, 2232 + { 0x22, 0x7A7, 0x00 }, 2233 + { 0x22, 0x7A8, 0x00 }, 2234 + { 0x22, 0x7A9, 0x40 }, 2235 + { 0x22, 0x7AA, 0x00 }, 2236 + { 0x22, 0x7AB, 0x00 }, 2237 + { 0x22, 0x7AC, 0x0F }, 2238 + { 0x22, 0x7AD, 0x80 }, 2239 + { 0x22, 0x7A6, 0x90 }, 2240 + { 0x22, 0x7A7, 0x68 }, 2241 + { 0x22, 0x7A8, 0xF1 }, 2242 + { 0x22, 0x7A9, 0x90 }, 2243 + { 0x22, 0x7AA, 0x68 }, 2244 + { 0x22, 0x7AB, 0xF1 }, 2245 + { 0x22, 0x7AC, 0x10 }, 2246 + { 0x22, 0x7AD, 0x80 }, 2247 + { 0x22, 0x7A6, 0x34 }, 2248 + { 0x22, 0x7A7, 0x47 }, 2249 + { 0x22, 0x7A8, 0x6C }, 2250 + { 0x22, 0x7A9, 0x34 }, 2251 + { 0x22, 0x7AA, 0x47 }, 2252 + { 0x22, 0x7AB, 0x6C }, 2253 + { 0x22, 0x7AC, 0x11 }, 2254 + { 0x22, 0x7AD, 0x80 }, 2255 + { 0x22, 0x7A6, 0x6F }, 2256 + { 0x22, 0x7A7, 0x97 }, 2257 + { 0x22, 0x7A8, 0x0F }, 2258 + { 0x22, 0x7A9, 0x6F }, 2259 + { 0x22, 0x7AA, 0x97 }, 2260 + { 0x22, 0x7AB, 0x0F }, 2261 + { 0x22, 0x7AC, 0x12 }, 2262 + { 0x22, 0x7AD, 0x80 }, 2263 + { 0x22, 0x7A6, 0xCB }, 2264 + { 0x22, 0x7A7, 0xB8 }, 2265 + { 0x22, 0x7A8, 0x94 }, 2266 + { 0x22, 0x7A9, 0xCB }, 2267 + { 0x22, 0x7AA, 0xB8 }, 2268 + { 0x22, 0x7AB, 0x94 }, 2269 + { 0x22, 0x7AC, 0x13 }, 2270 + { 0x22, 0x7AD, 0x80 }, 2271 + { 0x22, 0x7A6, 0x40 }, 2272 + { 0x22, 0x7A7, 0x00 }, 2273 + { 0x22, 0x7A8, 0x00 }, 2274 + { 0x22, 0x7A9, 0x40 }, 2275 + { 0x22, 0x7AA, 0x00 }, 2276 + { 0x22, 0x7AB, 0x00 }, 2277 + { 0x22, 0x7AC, 0x14 }, 2278 + { 0x22, 0x7AD, 0x80 }, 2279 + { 0x22, 0x7A6, 0x95 }, 2280 + { 0x22, 0x7A7, 0x76 }, 2281 + { 0x22, 0x7A8, 0x5B }, 2282 + { 0x22, 0x7A9, 0x95 }, 2283 + { 0x22, 0x7AA, 0x76 }, 2284 + { 0x22, 0x7AB, 0x5B }, 2285 + { 0x22, 0x7AC, 0x15 }, 2286 + { 0x22, 0x7AD, 0x80 }, 2287 + { 0x22, 0x7A6, 0x31 }, 2288 + { 0x22, 0x7A7, 0xAC }, 2289 + { 0x22, 0x7A8, 0x31 }, 2290 + { 0x22, 0x7A9, 0x31 }, 2291 + { 0x22, 0x7AA, 0xAC }, 2292 + { 0x22, 0x7AB, 0x31 }, 2293 + { 0x22, 0x7AC, 0x16 }, 2294 + { 0x22, 0x7AD, 0x80 }, 2295 + { 0x22, 0x7A6, 0x6A }, 2296 + { 0x22, 0x7A7, 0x89 }, 2297 + { 0x22, 0x7A8, 0xA5 }, 2298 + { 0x22, 0x7A9, 0x6A }, 2299 + { 0x22, 0x7AA, 0x89 }, 2300 + { 0x22, 0x7AB, 0xA5 }, 2301 + { 0x22, 0x7AC, 0x17 }, 2302 + { 0x22, 0x7AD, 0x80 }, 2303 + { 0x22, 0x7A6, 0xCE }, 2304 + { 0x22, 0x7A7, 0x53 }, 2305 + { 0x22, 0x7A8, 0xCF }, 2306 + { 0x22, 0x7A9, 0xCE }, 2307 + { 0x22, 0x7AA, 0x53 }, 2308 + { 0x22, 0x7AB, 0xCF }, 2309 + { 0x22, 0x7AC, 0x18 }, 2310 + { 0x22, 0x7AD, 0x80 }, 2311 + { 0x22, 0x7A6, 0x40 }, 2312 + { 0x22, 0x7A7, 0x00 }, 2313 + { 0x22, 0x7A8, 0x00 }, 2314 + { 0x22, 0x7A9, 0x40 }, 2315 + { 0x22, 0x7AA, 0x00 }, 2316 + { 0x22, 0x7AB, 0x00 }, 2317 + { 0x22, 0x7AC, 0x19 }, 2318 + { 0x22, 0x7AD, 0x80 }, 2319 + /* 48KHz base */ 2320 + { 0x22, 0x7A6, 0x3E }, 2321 + { 0x22, 0x7A7, 0x88 }, 2322 + { 0x22, 0x7A8, 0xDC }, 2323 + { 0x22, 0x7A9, 0x3E }, 2324 + { 0x22, 0x7AA, 0x88 }, 2325 + { 0x22, 0x7AB, 0xDC }, 2326 + { 0x22, 0x7AC, 0x1A }, 2327 + { 0x22, 0x7AD, 0x80 }, 2328 + { 0x22, 0x7A6, 0x82 }, 2329 + { 0x22, 0x7A7, 0xEE }, 2330 + { 0x22, 0x7A8, 0x46 }, 2331 + { 0x22, 0x7A9, 0x82 }, 2332 + { 0x22, 0x7AA, 0xEE }, 2333 + { 0x22, 0x7AB, 0x46 }, 2334 + { 0x22, 0x7AC, 0x1B }, 2335 + { 0x22, 0x7AD, 0x80 }, 2336 + { 0x22, 0x7A6, 0x3E }, 2337 + { 0x22, 0x7A7, 0x88 }, 2338 + { 0x22, 0x7A8, 0xDC }, 2339 + { 0x22, 0x7A9, 0x3E }, 2340 + { 0x22, 0x7AA, 0x88 }, 2341 + { 0x22, 0x7AB, 0xDC }, 2342 + { 0x22, 0x7AC, 0x1C }, 2343 + { 0x22, 0x7AD, 0x80 }, 2344 + { 0x22, 0x7A6, 0x7D }, 2345 + { 0x22, 0x7A7, 0x09 }, 2346 + { 0x22, 0x7A8, 0x28 }, 2347 + { 0x22, 0x7A9, 0x7D }, 2348 + { 0x22, 0x7AA, 0x09 }, 2349 + { 0x22, 0x7AB, 0x28 }, 2350 + { 0x22, 0x7AC, 0x1D }, 2351 + { 0x22, 0x7AD, 0x80 }, 2352 + { 0x22, 0x7A6, 0xC2 }, 2353 + { 0x22, 0x7A7, 0xE5 }, 2354 + { 0x22, 0x7A8, 0xB4 }, 2355 + { 0x22, 0x7A9, 0xC2 }, 2356 + { 0x22, 0x7AA, 0xE5 }, 2357 + { 0x22, 0x7AB, 0xB4 }, 2358 + { 0x22, 0x7AC, 0x1E }, 2359 + { 0x22, 0x7AD, 0x80 }, 2360 + { 0x22, 0x7A6, 0x3E }, 2361 + { 0x22, 0x7A7, 0xA3 }, 2362 + { 0x22, 0x7A8, 0x1F }, 2363 + { 0x22, 0x7A9, 0x3E }, 2364 + { 0x22, 0x7AA, 0xA3 }, 2365 + { 0x22, 0x7AB, 0x1F }, 2366 + { 0x22, 0x7AC, 0x1F }, 2367 + { 0x22, 0x7AD, 0x80 }, 2368 + { 0x22, 0x7A6, 0x84 }, 2369 + { 0x22, 0x7A7, 0xCA }, 2370 + { 0x22, 0x7A8, 0xF1 }, 2371 + { 0x22, 0x7A9, 0x84 }, 2372 + { 0x22, 0x7AA, 0xCA }, 2373 + { 0x22, 0x7AB, 0xF1 }, 2374 + { 0x22, 0x7AC, 0x20 }, 2375 + { 0x22, 0x7AD, 0x80 }, 2376 + { 0x22, 0x7A6, 0x3C }, 2377 + { 0x22, 0x7A7, 0xD5 }, 2378 + { 0x22, 0x7A8, 0x9C }, 2379 + { 0x22, 0x7A9, 0x3C }, 2380 + { 0x22, 0x7AA, 0xD5 }, 2381 + { 0x22, 0x7AB, 0x9C }, 2382 + { 0x22, 0x7AC, 0x21 }, 2383 + { 0x22, 0x7AD, 0x80 }, 2384 + { 0x22, 0x7A6, 0x7B }, 2385 + { 0x22, 0x7A7, 0x35 }, 2386 + { 0x22, 0x7A8, 0x0F }, 2387 + { 0x22, 0x7A9, 0x7B }, 2388 + { 0x22, 0x7AA, 0x35 }, 2389 + { 0x22, 0x7AB, 0x0F }, 2390 + { 0x22, 0x7AC, 0x22 }, 2391 + { 0x22, 0x7AD, 0x80 }, 2392 + { 0x22, 0x7A6, 0xC4 }, 2393 + { 0x22, 0x7A7, 0x87 }, 2394 + { 0x22, 0x7A8, 0x45 }, 2395 + { 0x22, 0x7A9, 0xC4 }, 2396 + { 0x22, 0x7AA, 0x87 }, 2397 + { 0x22, 0x7AB, 0x45 }, 2398 + { 0x22, 0x7AC, 0x23 }, 2399 + { 0x22, 0x7AD, 0x80 }, 2400 + { 0x22, 0x7A6, 0x3E }, 2401 + { 0x22, 0x7A7, 0x0A }, 2402 + { 0x22, 0x7A8, 0x78 }, 2403 + { 0x22, 0x7A9, 0x3E }, 2404 + { 0x22, 0x7AA, 0x0A }, 2405 + { 0x22, 0x7AB, 0x78 }, 2406 + { 0x22, 0x7AC, 0x24 }, 2407 + { 0x22, 0x7AD, 0x80 }, 2408 + { 0x22, 0x7A6, 0x88 }, 2409 + { 0x22, 0x7A7, 0xE2 }, 2410 + { 0x22, 0x7A8, 0x05 }, 2411 + { 0x22, 0x7A9, 0x88 }, 2412 + { 0x22, 0x7AA, 0xE2 }, 2413 + { 0x22, 0x7AB, 0x05 }, 2414 + { 0x22, 0x7AC, 0x25 }, 2415 + { 0x22, 0x7AD, 0x80 }, 2416 + { 0x22, 0x7A6, 0x3A }, 2417 + { 0x22, 0x7A7, 0x1A }, 2418 + { 0x22, 0x7A8, 0xA3 }, 2419 + { 0x22, 0x7A9, 0x3A }, 2420 + { 0x22, 0x7AA, 0x1A }, 2421 + { 0x22, 0x7AB, 0xA3 }, 2422 + { 0x22, 0x7AC, 0x26 }, 2423 + { 0x22, 0x7AD, 0x80 }, 2424 + { 0x22, 0x7A6, 0x77 }, 2425 + { 0x22, 0x7A7, 0x1D }, 2426 + { 0x22, 0x7A8, 0xFB }, 2427 + { 0x22, 0x7A9, 0x77 }, 2428 + { 0x22, 0x7AA, 0x1D }, 2429 + { 0x22, 0x7AB, 0xFB }, 2430 + { 0x22, 0x7AC, 0x27 }, 2431 + { 0x22, 0x7AD, 0x80 }, 2432 + { 0x22, 0x7A6, 0xC7 }, 2433 + { 0x22, 0x7A7, 0xDA }, 2434 + { 0x22, 0x7A8, 0xE5 }, 2435 + { 0x22, 0x7A9, 0xC7 }, 2436 + { 0x22, 0x7AA, 0xDA }, 2437 + { 0x22, 0x7AB, 0xE5 }, 2438 + { 0x22, 0x7AC, 0x28 }, 2439 + { 0x22, 0x7AD, 0x80 }, 2440 + { 0x22, 0x7A6, 0x40 }, 2441 + { 0x22, 0x7A7, 0x00 }, 2442 + { 0x22, 0x7A8, 0x00 }, 2443 + { 0x22, 0x7A9, 0x40 }, 2444 + { 0x22, 0x7AA, 0x00 }, 2445 + { 0x22, 0x7AB, 0x00 }, 2446 + { 0x22, 0x7AC, 0x29 }, 2447 + { 0x22, 0x7AD, 0x80 }, 2448 + { 0x22, 0x7A6, 0x8E }, 2449 + { 0x22, 0x7A7, 0xD7 }, 2450 + { 0x22, 0x7A8, 0x22 }, 2451 + { 0x22, 0x7A9, 0x8E }, 2452 + { 0x22, 0x7AA, 0xD7 }, 2453 + { 0x22, 0x7AB, 0x22 }, 2454 + { 0x22, 0x7AC, 0x2A }, 2455 + { 0x22, 0x7AD, 0x80 }, 2456 + { 0x22, 0x7A6, 0x35 }, 2457 + { 0x22, 0x7A7, 0x26 }, 2458 + { 0x22, 0x7A8, 0xC6 }, 2459 + { 0x22, 0x7A9, 0x35 }, 2460 + { 0x22, 0x7AA, 0x26 }, 2461 + { 0x22, 0x7AB, 0xC6 }, 2462 + { 0x22, 0x7AC, 0x2B }, 2463 + { 0x22, 0x7AD, 0x80 }, 2464 + { 0x22, 0x7A6, 0x71 }, 2465 + { 0x22, 0x7A7, 0x28 }, 2466 + { 0x22, 0x7A8, 0xDE }, 2467 + { 0x22, 0x7A9, 0x71 }, 2468 + { 0x22, 0x7AA, 0x28 }, 2469 + { 0x22, 0x7AB, 0xDE }, 2470 + { 0x22, 0x7AC, 0x2C }, 2471 + { 0x22, 0x7AD, 0x80 }, 2472 + { 0x22, 0x7A6, 0xCA }, 2473 + { 0x22, 0x7A7, 0xD9 }, 2474 + { 0x22, 0x7A8, 0x3A }, 2475 + { 0x22, 0x7A9, 0xCA }, 2476 + { 0x22, 0x7AA, 0xD9 }, 2477 + { 0x22, 0x7AB, 0x3A }, 2478 + { 0x22, 0x7AC, 0x2D }, 2479 + { 0x22, 0x7AD, 0x80 }, 2480 + { 0x22, 0x7A6, 0x40 }, 2481 + { 0x22, 0x7A7, 0x00 }, 2482 + { 0x22, 0x7A8, 0x00 }, 2483 + { 0x22, 0x7A9, 0x40 }, 2484 + { 0x22, 0x7AA, 0x00 }, 2485 + { 0x22, 0x7AB, 0x00 }, 2486 + { 0x22, 0x7AC, 0x2E }, 2487 + { 0x22, 0x7AD, 0x80 }, 2488 + { 0x22, 0x7A6, 0x93 }, 2489 + { 0x22, 0x7A7, 0x5E }, 2490 + { 0x22, 0x7A8, 0xD8 }, 2491 + { 0x22, 0x7A9, 0x93 }, 2492 + { 0x22, 0x7AA, 0x5E }, 2493 + { 0x22, 0x7AB, 0xD8 }, 2494 + { 0x22, 0x7AC, 0x2F }, 2495 + { 0x22, 0x7AD, 0x80 }, 2496 + { 0x22, 0x7A6, 0x32 }, 2497 + { 0x22, 0x7A7, 0xB7 }, 2498 + { 0x22, 0x7A8, 0xB1 }, 2499 + { 0x22, 0x7A9, 0x32 }, 2500 + { 0x22, 0x7AA, 0xB7 }, 2501 + { 0x22, 0x7AB, 0xB1 }, 2502 + { 0x22, 0x7AC, 0x30 }, 2503 + { 0x22, 0x7AD, 0x80 }, 2504 + { 0x22, 0x7A6, 0x6C }, 2505 + { 0x22, 0x7A7, 0xA1 }, 2506 + { 0x22, 0x7A8, 0x28 }, 2507 + { 0x22, 0x7A9, 0x6C }, 2508 + { 0x22, 0x7AA, 0xA1 }, 2509 + { 0x22, 0x7AB, 0x28 }, 2510 + { 0x22, 0x7AC, 0x31 }, 2511 + { 0x22, 0x7AD, 0x80 }, 2512 + { 0x22, 0x7A6, 0xCD }, 2513 + { 0x22, 0x7A7, 0x48 }, 2514 + { 0x22, 0x7A8, 0x4F }, 2515 + { 0x22, 0x7A9, 0xCD }, 2516 + { 0x22, 0x7AA, 0x48 }, 2517 + { 0x22, 0x7AB, 0x4F }, 2518 + { 0x22, 0x7AC, 0x32 }, 2519 + { 0x22, 0x7AD, 0x80 }, 2520 + { 0x22, 0x7A6, 0x40 }, 2521 + { 0x22, 0x7A7, 0x00 }, 2522 + { 0x22, 0x7A8, 0x00 }, 2523 + { 0x22, 0x7A9, 0x40 }, 2524 + { 0x22, 0x7AA, 0x00 }, 2525 + { 0x22, 0x7AB, 0x00 }, 2526 + { 0x22, 0x7AC, 0x33 }, 2527 + { 0x22, 0x7AD, 0x80 }, 2528 + /* common */ 2529 + { 0x22, 0x782, 0xC1 }, 2530 + { 0x22, 0x771, 0x2C }, 2531 + { 0x22, 0x772, 0x2C }, 2532 + { 0x22, 0x788, 0x04 }, 2533 + { 0x01, 0x7B0, 0x08 }, 2534 + {} 2535 + }; 2536 + 2110 2537 static const struct hda_fixup stac92hd83xxx_fixups[] = { 2111 2538 [STAC_92HD83XXX_REF] = { 2112 2539 .type = HDA_FIXUP_PINS, ··· 2603 2174 {} 2604 2175 }, 2605 2176 }, 2177 + [STAC_HP_BNB13_EQ] = { 2178 + .type = HDA_FIXUP_VERBS, 2179 + .v.verbs = hp_bnb13_eq_verbs, 2180 + .chained = true, 2181 + .chain_id = STAC_92HD83XXX_HP_MIC_LED, 2182 + }, 2606 2183 }; 2607 2184 2608 2185 static const struct hda_model_fixup stac92hd83xxx_models[] = { ··· 2624 2189 { .id = STAC_92HD83XXX_HP_MIC_LED, .name = "hp-mic-led" }, 2625 2190 { .id = STAC_92HD83XXX_HEADSET_JACK, .name = "headset-jack" }, 2626 2191 { .id = STAC_HP_ENVY_BASS, .name = "hp-envy-bass" }, 2192 + { .id = STAC_HP_BNB13_EQ, .name = "hp-bnb13-eq" }, 2627 2193 {} 2628 2194 }; 2629 2195 ··· 2671 2235 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1888, 2672 2236 "HP Envy Spectre", STAC_HP_ENVY_BASS), 2673 2237 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18df, 2674 - "HP Folio", STAC_92HD83XXX_HP_MIC_LED), 2238 + "HP Folio", STAC_HP_BNB13_EQ), 2239 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18F8, 2240 + "HP bNB13", STAC_HP_BNB13_EQ), 2241 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1909, 2242 + "HP bNB13", STAC_HP_BNB13_EQ), 2243 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x190A, 2244 + "HP bNB13", STAC_HP_BNB13_EQ), 2245 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1940, 2246 + "HP bNB13", STAC_HP_BNB13_EQ), 2247 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1941, 2248 + "HP bNB13", STAC_HP_BNB13_EQ), 2249 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1942, 2250 + "HP bNB13", STAC_HP_BNB13_EQ), 2251 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1943, 2252 + "HP bNB13", STAC_HP_BNB13_EQ), 2253 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1944, 2254 + "HP bNB13", STAC_HP_BNB13_EQ), 2255 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1945, 2256 + "HP bNB13", STAC_HP_BNB13_EQ), 2257 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1946, 2258 + "HP bNB13", STAC_HP_BNB13_EQ), 2259 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1948, 2260 + "HP bNB13", STAC_HP_BNB13_EQ), 2261 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1949, 2262 + "HP bNB13", STAC_HP_BNB13_EQ), 2263 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194A, 2264 + "HP bNB13", STAC_HP_BNB13_EQ), 2265 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194B, 2266 + "HP bNB13", STAC_HP_BNB13_EQ), 2267 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194C, 2268 + "HP bNB13", STAC_HP_BNB13_EQ), 2269 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194E, 2270 + "HP bNB13", STAC_HP_BNB13_EQ), 2271 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x194F, 2272 + "HP bNB13", STAC_HP_BNB13_EQ), 2273 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1950, 2274 + "HP bNB13", STAC_HP_BNB13_EQ), 2275 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1951, 2276 + "HP bNB13", STAC_HP_BNB13_EQ), 2277 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x195A, 2278 + "HP bNB13", STAC_HP_BNB13_EQ), 2279 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x195B, 2280 + "HP bNB13", STAC_HP_BNB13_EQ), 2281 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x195C, 2282 + "HP bNB13", STAC_HP_BNB13_EQ), 2283 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1991, 2284 + "HP bNB13", STAC_HP_BNB13_EQ), 2285 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2103, 2286 + "HP bNB13", STAC_HP_BNB13_EQ), 2287 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2104, 2288 + "HP bNB13", STAC_HP_BNB13_EQ), 2289 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2105, 2290 + "HP bNB13", STAC_HP_BNB13_EQ), 2291 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2106, 2292 + "HP bNB13", STAC_HP_BNB13_EQ), 2293 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2107, 2294 + "HP bNB13", STAC_HP_BNB13_EQ), 2295 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2108, 2296 + "HP bNB13", STAC_HP_BNB13_EQ), 2297 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2109, 2298 + "HP bNB13", STAC_HP_BNB13_EQ), 2299 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x210A, 2300 + "HP bNB13", STAC_HP_BNB13_EQ), 2301 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x210B, 2302 + "HP bNB13", STAC_HP_BNB13_EQ), 2303 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x211C, 2304 + "HP bNB13", STAC_HP_BNB13_EQ), 2305 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x211D, 2306 + "HP bNB13", STAC_HP_BNB13_EQ), 2307 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x211E, 2308 + "HP bNB13", STAC_HP_BNB13_EQ), 2309 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x211F, 2310 + "HP bNB13", STAC_HP_BNB13_EQ), 2311 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2120, 2312 + "HP bNB13", STAC_HP_BNB13_EQ), 2313 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2121, 2314 + "HP bNB13", STAC_HP_BNB13_EQ), 2315 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2122, 2316 + "HP bNB13", STAC_HP_BNB13_EQ), 2317 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2123, 2318 + "HP bNB13", STAC_HP_BNB13_EQ), 2319 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x213E, 2320 + "HP bNB13", STAC_HP_BNB13_EQ), 2321 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x213F, 2322 + "HP bNB13", STAC_HP_BNB13_EQ), 2323 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2140, 2324 + "HP bNB13", STAC_HP_BNB13_EQ), 2325 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x21B2, 2326 + "HP bNB13", STAC_HP_BNB13_EQ), 2327 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x21B3, 2328 + "HP bNB13", STAC_HP_BNB13_EQ), 2329 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x21B5, 2330 + "HP bNB13", STAC_HP_BNB13_EQ), 2331 + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x21B6, 2332 + "HP bNB13", STAC_HP_BNB13_EQ), 2675 2333 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x1900, 2676 2334 "HP", STAC_92HD83XXX_HP_MIC_LED), 2677 2335 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x2000,
+1
sound/soc/blackfin/bf5xx-i2s.c
··· 121 121 bf5xx_i2s->tcr2 |= 7; 122 122 bf5xx_i2s->rcr2 |= 7; 123 123 sport_handle->wdsize = 1; 124 + break; 124 125 case SNDRV_PCM_FORMAT_S16_LE: 125 126 bf5xx_i2s->tcr2 |= 15; 126 127 bf5xx_i2s->rcr2 |= 15;
+1 -1
sound/soc/codecs/cs42l52.h
··· 179 179 #define CS42L52_MICB_CTL 0x11 180 180 #define CS42L52_MIC_CTL_MIC_SEL_MASK 0xBF 181 181 #define CS42L52_MIC_CTL_MIC_SEL_SHIFT 6 182 - #define CS42L52_MIC_CTL_TYPE_MASK 0xDF 182 + #define CS42L52_MIC_CTL_TYPE_MASK 0x20 183 183 #define CS42L52_MIC_CTL_TYPE_SHIFT 5 184 184 185 185
+4 -4
sound/soc/codecs/wm5102.c
··· 685 685 ARIZONA_MIXER_CONTROLS("EQ3", ARIZONA_EQ3MIX_INPUT_1_SOURCE), 686 686 ARIZONA_MIXER_CONTROLS("EQ4", ARIZONA_EQ4MIX_INPUT_1_SOURCE), 687 687 688 - SND_SOC_BYTES_MASK("EQ1 Coefficeints", ARIZONA_EQ1_1, 21, 688 + SND_SOC_BYTES_MASK("EQ1 Coefficients", ARIZONA_EQ1_1, 21, 689 689 ARIZONA_EQ1_ENA_MASK), 690 - SND_SOC_BYTES_MASK("EQ2 Coefficeints", ARIZONA_EQ2_1, 21, 690 + SND_SOC_BYTES_MASK("EQ2 Coefficients", ARIZONA_EQ2_1, 21, 691 691 ARIZONA_EQ2_ENA_MASK), 692 - SND_SOC_BYTES_MASK("EQ3 Coefficeints", ARIZONA_EQ3_1, 21, 692 + SND_SOC_BYTES_MASK("EQ3 Coefficients", ARIZONA_EQ3_1, 21, 693 693 ARIZONA_EQ3_ENA_MASK), 694 - SND_SOC_BYTES_MASK("EQ4 Coefficeints", ARIZONA_EQ4_1, 21, 694 + SND_SOC_BYTES_MASK("EQ4 Coefficients", ARIZONA_EQ4_1, 21, 695 695 ARIZONA_EQ4_ENA_MASK), 696 696 697 697 SOC_SINGLE_TLV("EQ1 B1 Volume", ARIZONA_EQ1_1, ARIZONA_EQ1_B1_GAIN_SHIFT,
+4 -4
sound/soc/codecs/wm5110.c
··· 101 101 ARIZONA_MIXER_CONTROLS("EQ3", ARIZONA_EQ3MIX_INPUT_1_SOURCE), 102 102 ARIZONA_MIXER_CONTROLS("EQ4", ARIZONA_EQ4MIX_INPUT_1_SOURCE), 103 103 104 - SND_SOC_BYTES_MASK("EQ1 Coefficeints", ARIZONA_EQ1_1, 21, 104 + SND_SOC_BYTES_MASK("EQ1 Coefficients", ARIZONA_EQ1_1, 21, 105 105 ARIZONA_EQ1_ENA_MASK), 106 - SND_SOC_BYTES_MASK("EQ2 Coefficeints", ARIZONA_EQ2_1, 21, 106 + SND_SOC_BYTES_MASK("EQ2 Coefficients", ARIZONA_EQ2_1, 21, 107 107 ARIZONA_EQ2_ENA_MASK), 108 - SND_SOC_BYTES_MASK("EQ3 Coefficeints", ARIZONA_EQ3_1, 21, 108 + SND_SOC_BYTES_MASK("EQ3 Coefficients", ARIZONA_EQ3_1, 21, 109 109 ARIZONA_EQ3_ENA_MASK), 110 - SND_SOC_BYTES_MASK("EQ4 Coefficeints", ARIZONA_EQ4_1, 21, 110 + SND_SOC_BYTES_MASK("EQ4 Coefficients", ARIZONA_EQ4_1, 21, 111 111 ARIZONA_EQ4_ENA_MASK), 112 112 113 113 SOC_SINGLE_TLV("EQ1 B1 Volume", ARIZONA_EQ1_1, ARIZONA_EQ1_B1_GAIN_SHIFT,
+2
sound/soc/codecs/wm8962.c
··· 3728 3728 if (ret < 0) 3729 3729 goto err_enable; 3730 3730 3731 + regcache_cache_only(wm8962->regmap, true); 3732 + 3731 3733 /* The drivers should power up as needed */ 3732 3734 regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies); 3733 3735
+5 -5
sound/soc/codecs/wm8997.c
··· 170 170 ARIZONA_MIXER_CONTROLS("EQ3", ARIZONA_EQ3MIX_INPUT_1_SOURCE), 171 171 ARIZONA_MIXER_CONTROLS("EQ4", ARIZONA_EQ4MIX_INPUT_1_SOURCE), 172 172 173 - SND_SOC_BYTES_MASK("EQ1 Coefficeints", ARIZONA_EQ1_1, 21, 173 + SND_SOC_BYTES_MASK("EQ1 Coefficients", ARIZONA_EQ1_1, 21, 174 174 ARIZONA_EQ1_ENA_MASK), 175 - SND_SOC_BYTES_MASK("EQ2 Coefficeints", ARIZONA_EQ2_1, 21, 175 + SND_SOC_BYTES_MASK("EQ2 Coefficients", ARIZONA_EQ2_1, 21, 176 176 ARIZONA_EQ2_ENA_MASK), 177 - SND_SOC_BYTES_MASK("EQ3 Coefficeints", ARIZONA_EQ3_1, 21, 177 + SND_SOC_BYTES_MASK("EQ3 Coefficients", ARIZONA_EQ3_1, 21, 178 178 ARIZONA_EQ3_ENA_MASK), 179 - SND_SOC_BYTES_MASK("EQ4 Coefficeints", ARIZONA_EQ4_1, 21, 179 + SND_SOC_BYTES_MASK("EQ4 Coefficients", ARIZONA_EQ4_1, 21, 180 180 ARIZONA_EQ4_ENA_MASK), 181 181 182 182 SOC_SINGLE_TLV("EQ1 B1 Volume", ARIZONA_EQ1_1, ARIZONA_EQ1_B1_GAIN_SHIFT, ··· 887 887 ARIZONA_MIXER_ROUTES("Mic Mute Mixer", "Mic"), 888 888 889 889 ARIZONA_MUX_ROUTES("ISRC1INT1", "ISRC1INT1"), 890 - ARIZONA_MUX_ROUTES("ISRC1INT2", "ISRC2INT2"), 890 + ARIZONA_MUX_ROUTES("ISRC1INT2", "ISRC1INT2"), 891 891 892 892 ARIZONA_MUX_ROUTES("ISRC1DEC1", "ISRC1DEC1"), 893 893 ARIZONA_MUX_ROUTES("ISRC1DEC2", "ISRC1DEC2"),
+17 -12
sound/soc/fsl/imx-pcm-fiq.c
··· 42 42 struct hrtimer hrt; 43 43 int poll_time_ns; 44 44 struct snd_pcm_substream *substream; 45 - atomic_t running; 45 + atomic_t playing; 46 + atomic_t capturing; 46 47 }; 47 48 48 49 static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt) ··· 53 52 struct snd_pcm_substream *substream = iprtd->substream; 54 53 struct pt_regs regs; 55 54 56 - if (!atomic_read(&iprtd->running)) 55 + if (!atomic_read(&iprtd->playing) && !atomic_read(&iprtd->capturing)) 57 56 return HRTIMER_NORESTART; 58 57 59 58 get_fiq_regs(&regs); ··· 107 106 return 0; 108 107 } 109 108 110 - static int fiq_enable; 111 109 static int imx_pcm_fiq; 112 110 113 111 static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) ··· 118 118 case SNDRV_PCM_TRIGGER_START: 119 119 case SNDRV_PCM_TRIGGER_RESUME: 120 120 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 121 - atomic_set(&iprtd->running, 1); 121 + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 122 + atomic_set(&iprtd->playing, 1); 123 + else 124 + atomic_set(&iprtd->capturing, 1); 122 125 hrtimer_start(&iprtd->hrt, ns_to_ktime(iprtd->poll_time_ns), 123 126 HRTIMER_MODE_REL); 124 - if (++fiq_enable == 1) 125 - enable_fiq(imx_pcm_fiq); 126 - 127 + enable_fiq(imx_pcm_fiq); 127 128 break; 128 129 129 130 case SNDRV_PCM_TRIGGER_STOP: 130 131 case SNDRV_PCM_TRIGGER_SUSPEND: 131 132 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 132 - atomic_set(&iprtd->running, 0); 133 - 134 - if (--fiq_enable == 0) 133 + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 134 + atomic_set(&iprtd->playing, 0); 135 + else 136 + atomic_set(&iprtd->capturing, 0); 137 + if (!atomic_read(&iprtd->playing) && 138 + !atomic_read(&iprtd->capturing)) 135 139 disable_fiq(imx_pcm_fiq); 136 - 137 140 break; 141 + 138 142 default: 139 143 return -EINVAL; 140 144 } ··· 186 182 187 183 iprtd->substream = substream; 188 184 189 - atomic_set(&iprtd->running, 0); 185 + atomic_set(&iprtd->playing, 0); 186 + atomic_set(&iprtd->capturing, 0); 190 187 hrtimer_init(&iprtd->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 191 188 iprtd->hrt.function = snd_hrtimer_callback; 192 189
+8 -3
sound/sparc/cs4231.c
··· 907 907 struct snd_cs4231 *chip = snd_pcm_substream_chip(substream); 908 908 struct snd_pcm_runtime *runtime = substream->runtime; 909 909 unsigned long flags; 910 + int ret = 0; 910 911 911 912 spin_lock_irqsave(&chip->lock, flags); 912 913 913 914 chip->image[CS4231_IFACE_CTRL] &= ~(CS4231_PLAYBACK_ENABLE | 914 915 CS4231_PLAYBACK_PIO); 915 916 916 - if (WARN_ON(runtime->period_size > 0xffff + 1)) 917 - return -EINVAL; 917 + if (WARN_ON(runtime->period_size > 0xffff + 1)) { 918 + ret = -EINVAL; 919 + goto out; 920 + } 918 921 919 922 chip->p_periods_sent = 0; 923 + 924 + out: 920 925 spin_unlock_irqrestore(&chip->lock, flags); 921 926 922 - return 0; 927 + return ret; 923 928 } 924 929 925 930 static int snd_cs4231_capture_hw_params(struct snd_pcm_substream *substream,
+90
sound/usb/mixer_quirks.c
··· 433 433 } 434 434 } 435 435 436 + /* EMU0204 */ 437 + static int snd_emu0204_ch_switch_info(struct snd_kcontrol *kcontrol, 438 + struct snd_ctl_elem_info *uinfo) 439 + { 440 + static const char *texts[2] = {"1/2", 441 + "3/4" 442 + }; 443 + 444 + uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 445 + uinfo->count = 1; 446 + uinfo->value.enumerated.items = 2; 447 + if (uinfo->value.enumerated.item > 1) 448 + uinfo->value.enumerated.item = 1; 449 + strcpy(uinfo->value.enumerated.name, 450 + texts[uinfo->value.enumerated.item]); 451 + 452 + return 0; 453 + } 454 + 455 + static int snd_emu0204_ch_switch_get(struct snd_kcontrol *kcontrol, 456 + struct snd_ctl_elem_value *ucontrol) 457 + { 458 + ucontrol->value.enumerated.item[0] = kcontrol->private_value; 459 + return 0; 460 + } 461 + 462 + static int snd_emu0204_ch_switch_put(struct snd_kcontrol *kcontrol, 463 + struct snd_ctl_elem_value *ucontrol) 464 + { 465 + struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol); 466 + unsigned int value = ucontrol->value.enumerated.item[0]; 467 + int err, changed; 468 + unsigned char buf[2]; 469 + 470 + if (value > 1) 471 + return -EINVAL; 472 + 473 + buf[0] = 0x01; 474 + buf[1] = value ? 0x02 : 0x01; 475 + 476 + changed = value != kcontrol->private_value; 477 + down_read(&mixer->chip->shutdown_rwsem); 478 + if (mixer->chip->shutdown) { 479 + err = -ENODEV; 480 + goto out; 481 + } 482 + err = snd_usb_ctl_msg(mixer->chip->dev, 483 + usb_sndctrlpipe(mixer->chip->dev, 0), UAC_SET_CUR, 484 + USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT, 485 + 0x0400, 0x0e00, buf, 2); 486 + out: 487 + up_read(&mixer->chip->shutdown_rwsem); 488 + if (err < 0) 489 + return err; 490 + kcontrol->private_value = value; 491 + return changed; 492 + } 493 + 494 + 495 + static struct snd_kcontrol_new snd_emu0204_controls[] = { 496 + { 497 + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 498 + .name = "Front Jack Channels", 499 + .info = snd_emu0204_ch_switch_info, 500 + .get = snd_emu0204_ch_switch_get, 501 + .put = snd_emu0204_ch_switch_put, 502 + .private_value = 0, 503 + }, 504 + }; 505 + 506 + static int snd_emu0204_controls_create(struct usb_mixer_interface *mixer) 507 + { 508 + int i, err; 509 + 510 + for (i = 0; i < ARRAY_SIZE(snd_emu0204_controls); ++i) { 511 + err = snd_ctl_add(mixer->chip->card, 512 + snd_ctl_new1(&snd_emu0204_controls[i], mixer)); 513 + if (err < 0) 514 + return err; 515 + } 516 + 517 + return 0; 518 + } 436 519 /* ASUS Xonar U1 / U3 controls */ 437 520 438 521 static int snd_xonar_u1_switch_get(struct snd_kcontrol *kcontrol, ··· 1626 1543 if (!snd_card_proc_new(mixer->chip->card, "audigy2nx", &entry)) 1627 1544 snd_info_set_text_ops(entry, mixer, 1628 1545 snd_audigy2nx_proc_read); 1546 + break; 1547 + 1548 + /* EMU0204 */ 1549 + case USB_ID(0x041e, 0x3f19): 1550 + err = snd_emu0204_controls_create(mixer); 1551 + if (err < 0) 1552 + break; 1629 1553 break; 1630 1554 1631 1555 case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */
+2 -2
sound/usb/stream.c
··· 273 273 SNDRV_CHMAP_TSL, /* top side left */ 274 274 SNDRV_CHMAP_TSR, /* top side right */ 275 275 SNDRV_CHMAP_BC, /* bottom center */ 276 - SNDRV_CHMAP_BLC, /* bottom left center */ 277 - SNDRV_CHMAP_BRC, /* bottom right center */ 276 + SNDRV_CHMAP_RLC, /* back left of center */ 277 + SNDRV_CHMAP_RRC, /* back right of center */ 278 278 0 /* terminator */ 279 279 }; 280 280 struct snd_pcm_chmap_elem *chmap;