Changeset 682
- Timestamp:
- Mar 21, 2021, 9:31:24 AM (4 years ago)
- Location:
- GPL/branches/uniaud32-next
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/alsa-kernel/hda/intel-nhlt.c
r629 r682 32 32 struct nhlt_dmic_array_config *cfg; 33 33 struct nhlt_vendor_dmic_array_config *cfg_vendor; 34 struct nhlt_fmt *fmt_configs; 34 35 unsigned int dmic_geo = 0; 35 u8 j; 36 u16 max_ch = 0; 37 u8 i, j; 36 38 37 39 if (!nhlt) 38 40 return 0; 39 41 40 epnt = (struct nhlt_endpoint *)nhlt->desc; 42 for (j = 0, epnt = nhlt->desc; j < nhlt->endpoint_count; j++, 43 epnt = (struct nhlt_endpoint *)((u8 *)epnt + epnt->length)) { 41 44 42 for (j = 0; j < nhlt->endpoint_count; j++) { 43 if (epnt->linktype == NHLT_LINK_DMIC) { 44 cfg = (struct nhlt_dmic_array_config *) 45 (epnt->config.caps); 45 if (epnt->linktype != NHLT_LINK_DMIC) 46 continue; 47 48 cfg = (struct nhlt_dmic_array_config *)(epnt->config.caps); 49 fmt_configs = (struct nhlt_fmt *)(epnt->config.caps + epnt->config.size); 50 51 /* find max number of channels based on format_configuration */ 52 if (fmt_configs->fmt_count) { 53 dev_dbg(dev, "%s: found %d format definitions\n", 54 __func__, fmt_configs->fmt_count); 55 56 for (i = 0; i < fmt_configs->fmt_count; i++) { 57 struct wav_fmt_ext *fmt_ext; 58 59 fmt_ext = &fmt_configs->fmt_config[i].fmt_ext; 60 61 if (fmt_ext->fmt.channels > max_ch) 62 max_ch = fmt_ext->fmt.channels; 63 } 64 dev_dbg(dev, "%s: max channels found %d\n", __func__, max_ch); 65 } else { 66 dev_dbg(dev, "%s: No format information found\n", __func__); 67 } 68 69 if (cfg->device_config.config_type != NHLT_CONFIG_TYPE_MIC_ARRAY) { 70 dmic_geo = max_ch; 71 } else { 46 72 switch (cfg->array_type) { 47 73 case NHLT_MIC_ARRAY_2CH_SMALL: … … 60 86 break; 61 87 default: 62 dev_warn(dev, "undefined DMIC array_type 0x%0x\n", 63 cfg->array_type); 88 dev_warn(dev, "%s: undefined DMIC array_type 0x%0x\n", 89 __func__, cfg->array_type); 90 } 91 92 if (dmic_geo > 0) { 93 dev_dbg(dev, "%s: Array with %d dmics\n", __func__, dmic_geo); 94 } 95 if (max_ch > dmic_geo) { 96 dev_dbg(dev, "%s: max channels %d exceed dmic number %d\n", 97 __func__, max_ch, dmic_geo); 64 98 } 65 99 } 66 epnt = (struct nhlt_endpoint *)((u8 *)epnt + epnt->length);67 100 } 101 102 dev_dbg(dev, "%s: dmic number %d max_ch %d\n", 103 __func__, dmic_geo, max_ch); 68 104 69 105 return dmic_geo; -
GPL/branches/uniaud32-next/alsa-kernel/include/sound/intel-nhlt.h
r629 r682 114 114 115 115 enum { 116 NHLT_CONFIG_TYPE_GENERIC = 0, 117 NHLT_CONFIG_TYPE_MIC_ARRAY = 1 118 }; 119 120 enum { 116 121 NHLT_MIC_ARRAY_2CH_SMALL = 0xa, 117 122 NHLT_MIC_ARRAY_2CH_BIG = 0xb, -
GPL/branches/uniaud32-next/alsa-kernel/include/sound/version.h
r678 r682 1 1 /* include/version.h */ 2 #define CONFIG_SND_VERSION "5.10.2 0"2 #define CONFIG_SND_VERSION "5.10.25" 3 3 #define CONFIG_SND_DATE "" -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_bind.c
r669 r682 50 50 if (codec->bus->shutdown) 51 51 return; 52 52 #ifndef TARGET_OS2 53 /* ignore unsol events during system suspend/resume */ 54 if (codec->core.dev.power.power_state.event != PM_EVENT_ON) 55 return; 56 #endif 53 57 if (codec->patch_ops.unsol_event) 54 58 codec->patch_ops.unsol_event(codec, ev); -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_controller.c
r643 r682 630 630 178000000); 631 631 632 /* by some reason, the playback stream stalls on PulseAudio with633 * tsched=1 when a capture stream triggers. Until we figure out the634 * real cause, disable tsched mode by telling the PCM info flag.635 */636 if (chip->driver_caps & AZX_DCAPS_AMD_WORKAROUND)637 runtime->hw.info |= SNDRV_PCM_INFO_BATCH;638 639 632 if (chip->align_buffer_size) 640 633 /* constrain buffer sizes to be multiple of 128 -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_intel.c
r678 r682 1053 1053 chip = card->private_data; 1054 1054 chip->pm_prepared = 1; 1055 1056 flush_work(&azx_bus(chip)->unsol_work); 1055 1057 1056 1058 /* HDA controller always requires different WAKEEN for runtime suspend -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_ca0132.c
r641 r682 1280 1280 SND_PCI_QUIRK(0x1102, 0x0018, "Recon3D", QUIRK_R3D), 1281 1281 SND_PCI_QUIRK(0x1102, 0x0051, "Sound Blaster AE-5", QUIRK_AE5), 1282 SND_PCI_QUIRK(0x1102, 0x0191, "Sound Blaster AE-5 Plus", QUIRK_AE5), 1282 1283 SND_PCI_QUIRK(0x1102, 0x0081, "Sound Blaster AE-7", QUIRK_AE7), 1283 1284 {0} -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_conexant.c
r643 r682 156 156 #endif /* NOT_USED */ 157 157 158 static void cxt_init_gpio_led(struct hda_codec *codec) 159 { 160 struct conexant_spec *spec = codec->spec; 161 unsigned int mask = spec->gpio_mute_led_mask | spec->gpio_mic_led_mask; 162 163 if (mask) { 164 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_MASK, 165 mask); 166 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DIRECTION, 167 mask); 168 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 169 spec->gpio_led); 170 } 171 } 172 158 173 static int cx_auto_init(struct hda_codec *codec) 159 174 { … … 163 178 cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true); 164 179 180 cxt_init_gpio_led(codec); 165 181 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT); 166 182 … … 222 238 CXT_FIXUP_HP_GATE_MIC, 223 239 CXT_FIXUP_MUTE_LED_GPIO, 240 CXT_FIXUP_HP_ZBOOK_MUTE_LED, 224 241 CXT_FIXUP_HEADSET_MIC, 225 242 CXT_FIXUP_HP_MIC_NO_PRESENCE, … … 665 682 #endif /* NOT_USED */ 666 683 684 static void cxt_setup_mute_led(struct hda_codec *codec, 685 unsigned int mute, unsigned int mic_mute) 686 { 687 struct conexant_spec *spec = codec->spec; 688 689 spec->gpio_led = 0; 690 spec->mute_led_polarity = 0; 691 #ifdef NOT_USED 692 if (mute) { 693 snd_hda_gen_add_mute_led_cdev(codec, cxt_gpio_mute_update); 694 spec->gpio_mute_led_mask = mute; 695 } 696 if (mic_mute) { 697 snd_hda_gen_add_micmute_led_cdev(codec, cxt_gpio_micmute_update); 698 spec->gpio_mic_led_mask = mic_mute; 699 } 700 #endif /* NOT_USED */ 701 } 702 667 703 static void cxt_fixup_mute_led_gpio(struct hda_codec *codec, 668 704 const struct hda_fixup *fix, int action) 669 705 { 670 struct conexant_spec *spec = codec->spec; 671 static const struct hda_verb gpio_init[] = { 672 { 0x01, AC_VERB_SET_GPIO_MASK, 0x03 }, 673 { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x03 }, 674 {0} 675 }; 676 677 if (action == HDA_FIXUP_ACT_PRE_PROBE) { 678 #ifdef CONFIG_SND_HDA_GENERIC_LEDS 679 snd_hda_gen_add_mute_led_cdev(codec, cxt_gpio_mute_update); 680 #endif 681 spec->gpio_led = 0; 682 spec->mute_led_polarity = 0; 683 spec->gpio_mute_led_mask = 0x01; 684 spec->gpio_mic_led_mask = 0x02; 685 #ifdef CONFIG_SND_HDA_GENERIC_LEDS 686 snd_hda_gen_add_micmute_led_cdev(codec, cxt_gpio_micmute_update); 687 #endif 688 } 689 snd_hda_add_verbs(codec, gpio_init); 690 if (spec->gpio_led) 691 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, 692 spec->gpio_led); 693 } 694 706 if (action == HDA_FIXUP_ACT_PRE_PROBE) 707 cxt_setup_mute_led(codec, 0x01, 0x02); 708 } 709 710 static void cxt_fixup_hp_zbook_mute_led(struct hda_codec *codec, 711 const struct hda_fixup *fix, int action) 712 { 713 if (action == HDA_FIXUP_ACT_PRE_PROBE) 714 cxt_setup_mute_led(codec, 0x10, 0x20); 715 } 695 716 696 717 /* ThinkPad X200 & co with cxt5051 */ … … 898 919 .type = HDA_FIXUP_FUNC, 899 920 .v.func = cxt_fixup_mute_led_gpio, 921 }, 922 [CXT_FIXUP_HP_ZBOOK_MUTE_LED] = { 923 .type = HDA_FIXUP_FUNC, 924 .v.func = cxt_fixup_hp_zbook_mute_led, 900 925 }, 901 926 [CXT_FIXUP_HEADSET_MIC] = { … … 979 1004 SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE), 980 1005 SND_PCI_QUIRK(0x103c, 0x8402, "HP ProBook 645 G4", CXT_FIXUP_MUTE_LED_GPIO), 1006 SND_PCI_QUIRK(0x103c, 0x8427, "HP ZBook Studio G5", CXT_FIXUP_HP_ZBOOK_MUTE_LED), 981 1007 SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE), 982 1008 SND_PCI_QUIRK(0x103c, 0x8456, "HP Z2 G4 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE), … … 1018 1044 { .id = CXT_FIXUP_HP_DOCK, .name = "hp-dock" }, 1019 1045 { .id = CXT_FIXUP_MUTE_LED_GPIO, .name = "mute-led-gpio" }, 1046 { .id = CXT_FIXUP_HP_ZBOOK_MUTE_LED, .name = "hp-zbook-mute-led" }, 1020 1047 { .id = CXT_FIXUP_HP_MIC_NO_PRESENCE, .name = "hp-mic-fix" }, 1021 1048 {0} -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_hdmi.c
r678 r682 2483 2483 2484 2484 #ifdef CONFIG_PM 2485 static int generic_hdmi_suspend(struct hda_codec *codec) 2486 { 2487 struct hdmi_spec *spec = codec->spec; 2488 int pin_idx; 2489 2490 for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) { 2491 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); 2492 cancel_delayed_work_sync(&per_pin->work); 2493 } 2494 return 0; 2495 } 2496 2485 2497 static int generic_hdmi_resume(struct hda_codec *codec) 2486 2498 { … … 2506 2518 .unsol_event = hdmi_unsol_event, 2507 2519 #ifdef CONFIG_PM 2520 .suspend = generic_hdmi_suspend, 2508 2521 .resume = generic_hdmi_resume, 2509 2522 #endif -
GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_realtek.c
r678 r682 3081 3081 SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950), 3082 3082 SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD), 3083 SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS), 3083 3084 SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), 3084 3085 SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3), … … 7083 7084 ALC269_FIXUP_LEMOTE_A190X, 7084 7085 ALC256_FIXUP_INTEL_NUC8_RUGGED, 7086 ALC256_FIXUP_INTEL_NUC10, 7085 7087 ALC255_FIXUP_XIAOMI_HEADSET_MIC, 7086 7088 ALC274_FIXUP_HP_MIC, … … 7093 7095 ALC282_FIXUP_ACER_DISABLE_LINEOUT, 7094 7096 ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST, 7097 ALC256_FIXUP_ACER_HEADSET_MIC, 7095 7098 }; 7096 7099 … … 8786 8789 .v.pins = (const struct hda_pintbl[]) { 8787 8790 { 0x1b, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8791 { } 8792 }, 8793 .chained = true, 8794 .chain_id = ALC269_FIXUP_HEADSET_MODE 8795 }, 8796 [ALC256_FIXUP_INTEL_NUC10] = { 8797 .type = HDA_FIXUP_PINS, 8798 .v.pins = (const struct hda_pintbl[]) { 8799 { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 8788 8800 { } 8789 8801 }, … … 8883 8895 SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS), 8884 8896 SND_PCI_QUIRK(0x1025, 0x1248, "Acer Veriton N4660G", ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE), 8897 SND_PCI_QUIRK(0x1025, 0x1269, "Acer SWIFT SF314-54", ALC256_FIXUP_ACER_HEADSET_MIC), 8885 8898 SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 8886 8899 SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 8887 8900 SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 8901 SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC), 8888 8902 SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), 8889 8903 SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), … … 9132 9146 SND_PCI_QUIRK(0x1558, 0x8560, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC), 9133 9147 SND_PCI_QUIRK(0x1558, 0x8561, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC), 9148 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[5|7][0-9]RZ[Q]", ALC269_FIXUP_DMIC), 9134 9149 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9135 9150 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 9226 9241 SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X), 9227 9242 SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED), 9243 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10), 9228 9244 9229 9245 #if 0 … … 10298 10314 .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE, 10299 10315 }, 10316 #ifdef TARGET_OS2xxx 10317 [ALC256_FIXUP_ACER_HEADSET_MIC] = { 10318 .type = HDA_FIXUP_PINS, 10319 .v.pins = (const struct hda_pintbl[]) { 10320 { 0x19, 0x02a1113c }, /* use as headset mic, without its own jack detect */ 10321 { 0x1a, 0x90a1092f }, /* use as internal mic */ 10322 {0} 10323 }, 10324 .chained = true, 10325 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 10326 }, 10327 #endif 10300 10328 }; 10301 10329 -
GPL/branches/uniaud32-next/include/linux/pm.h
r647 r682 322 322 }; 323 323 324 #define PM_EVENT_ON 0x0000 324 325 #define PM_EVENT_RESTORE 0x0040 325 326
Note:
See TracChangeset
for help on using the changeset viewer.