Changeset 682


Ignore:
Timestamp:
Mar 21, 2021, 9:31:24 AM (4 years ago)
Author:
Paul Smedley
Message:

Update linux code to 5.10.25

Location:
GPL/branches/uniaud32-next
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/alsa-kernel/hda/intel-nhlt.c

    r629 r682  
    3232        struct nhlt_dmic_array_config *cfg;
    3333        struct nhlt_vendor_dmic_array_config *cfg_vendor;
     34        struct nhlt_fmt *fmt_configs;
    3435        unsigned int dmic_geo = 0;
    35         u8 j;
     36        u16 max_ch = 0;
     37        u8 i, j;
    3638
    3739        if (!nhlt)
    3840                return 0;
    3941
    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)) {
    4144
    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 {
    4672                        switch (cfg->array_type) {
    4773                        case NHLT_MIC_ARRAY_2CH_SMALL:
     
    6086                                break;
    6187                        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);
    6498                        }
    6599                }
    66                 epnt = (struct nhlt_endpoint *)((u8 *)epnt + epnt->length);
    67100        }
     101
     102        dev_dbg(dev, "%s: dmic number %d max_ch %d\n",
     103                __func__, dmic_geo, max_ch);
    68104
    69105        return dmic_geo;
  • GPL/branches/uniaud32-next/alsa-kernel/include/sound/intel-nhlt.h

    r629 r682  
    114114
    115115enum {
     116        NHLT_CONFIG_TYPE_GENERIC = 0,
     117        NHLT_CONFIG_TYPE_MIC_ARRAY = 1
     118};
     119
     120enum {
    116121        NHLT_MIC_ARRAY_2CH_SMALL = 0xa,
    117122        NHLT_MIC_ARRAY_2CH_BIG = 0xb,
  • GPL/branches/uniaud32-next/alsa-kernel/include/sound/version.h

    r678 r682  
    11/* include/version.h */
    2 #define CONFIG_SND_VERSION "5.10.20"
     2#define CONFIG_SND_VERSION "5.10.25"
    33#define CONFIG_SND_DATE ""
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_bind.c

    r669 r682  
    5050        if (codec->bus->shutdown)
    5151                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
    5357        if (codec->patch_ops.unsol_event)
    5458                codec->patch_ops.unsol_event(codec, ev);
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_controller.c

    r643 r682  
    630630                                     178000000);
    631631
    632         /* by some reason, the playback stream stalls on PulseAudio with
    633          * tsched=1 when a capture stream triggers.  Until we figure out the
    634          * 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 
    639632        if (chip->align_buffer_size)
    640633                /* constrain buffer sizes to be multiple of 128
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_intel.c

    r678 r682  
    10531053        chip = card->private_data;
    10541054        chip->pm_prepared = 1;
     1055
     1056        flush_work(&azx_bus(chip)->unsol_work);
    10551057
    10561058        /* HDA controller always requires different WAKEEN for runtime suspend
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_ca0132.c

    r641 r682  
    12801280        SND_PCI_QUIRK(0x1102, 0x0018, "Recon3D", QUIRK_R3D),
    12811281        SND_PCI_QUIRK(0x1102, 0x0051, "Sound Blaster AE-5", QUIRK_AE5),
     1282        SND_PCI_QUIRK(0x1102, 0x0191, "Sound Blaster AE-5 Plus", QUIRK_AE5),
    12821283        SND_PCI_QUIRK(0x1102, 0x0081, "Sound Blaster AE-7", QUIRK_AE7),
    12831284        {0}
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_conexant.c

    r643 r682  
    156156#endif /* NOT_USED */
    157157
     158static 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
    158173static int cx_auto_init(struct hda_codec *codec)
    159174{
     
    163178                cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true);
    164179
     180        cxt_init_gpio_led(codec);
    165181        snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT);
    166182
     
    222238        CXT_FIXUP_HP_GATE_MIC,
    223239        CXT_FIXUP_MUTE_LED_GPIO,
     240        CXT_FIXUP_HP_ZBOOK_MUTE_LED,
    224241        CXT_FIXUP_HEADSET_MIC,
    225242        CXT_FIXUP_HP_MIC_NO_PRESENCE,
     
    665682#endif /* NOT_USED */
    666683
     684static 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
    667703static void cxt_fixup_mute_led_gpio(struct hda_codec *codec,
    668704                                const struct hda_fixup *fix, int action)
    669705{
    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
     710static 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}
    695716
    696717/* ThinkPad X200 & co with cxt5051 */
     
    898919                .type = HDA_FIXUP_FUNC,
    899920                .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,
    900925        },
    901926        [CXT_FIXUP_HEADSET_MIC] = {
     
    9791004        SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
    9801005        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),
    9811007        SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE),
    9821008        SND_PCI_QUIRK(0x103c, 0x8456, "HP Z2 G4 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
     
    10181044        { .id = CXT_FIXUP_HP_DOCK, .name = "hp-dock" },
    10191045        { .id = CXT_FIXUP_MUTE_LED_GPIO, .name = "mute-led-gpio" },
     1046        { .id = CXT_FIXUP_HP_ZBOOK_MUTE_LED, .name = "hp-zbook-mute-led" },
    10201047        { .id = CXT_FIXUP_HP_MIC_NO_PRESENCE, .name = "hp-mic-fix" },
    10211048        {0}
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_hdmi.c

    r678 r682  
    24832483
    24842484#ifdef CONFIG_PM
     2485static 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
    24852497static int generic_hdmi_resume(struct hda_codec *codec)
    24862498{
     
    25062518        .unsol_event            = hdmi_unsol_event,
    25072519#ifdef CONFIG_PM
     2520        .suspend                = generic_hdmi_suspend,
    25082521        .resume                 = generic_hdmi_resume,
    25092522#endif
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_realtek.c

    r678 r682  
    30813081        SND_PCI_QUIRK(0x1462, 0x1293, "MSI-GP65", ALC1220_FIXUP_CLEVO_P950),
    30823082        SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
     3083        SND_PCI_QUIRK(0x1462, 0xcc34, "MSI Godlike X570", ALC1220_FIXUP_GB_DUAL_CODECS),
    30833084        SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
    30843085        SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
     
    70837084        ALC269_FIXUP_LEMOTE_A190X,
    70847085        ALC256_FIXUP_INTEL_NUC8_RUGGED,
     7086        ALC256_FIXUP_INTEL_NUC10,
    70857087        ALC255_FIXUP_XIAOMI_HEADSET_MIC,
    70867088        ALC274_FIXUP_HP_MIC,
     
    70937095        ALC282_FIXUP_ACER_DISABLE_LINEOUT,
    70947096        ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
     7097        ALC256_FIXUP_ACER_HEADSET_MIC,
    70957098};
    70967099
     
    87868789                .v.pins = (const struct hda_pintbl[]) {
    87878790                        { 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 */
    87888800                        { }
    87898801                },
     
    88838895        SND_PCI_QUIRK(0x1025, 0x1247, "Acer vCopperbox", ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS),
    88848896        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),
    88858898        SND_PCI_QUIRK(0x1025, 0x128f, "Acer Veriton Z6860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
    88868899        SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
    88878900        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),
    88888902        SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
    88898903        SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
     
    91329146        SND_PCI_QUIRK(0x1558, 0x8560, "System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC),
    91339147        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),
    91349149        SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
    91359150        SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
     
    92269241        SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
    92279242        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),
    92289244
    92299245#if 0
     
    1029810314                .chain_id = ALC255_FIXUP_ACER_MIC_NO_PRESENCE,
    1029910315        },
     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
    1030010328};
    1030110329
  • GPL/branches/uniaud32-next/include/linux/pm.h

    r647 r682  
    322322};
    323323
     324#define PM_EVENT_ON             0x0000
    324325#define PM_EVENT_RESTORE        0x0040
    325326
Note: See TracChangeset for help on using the changeset viewer.