Changeset 755


Ignore:
Timestamp:
Nov 6, 2022, 5:05:32 AM (3 years ago)
Author:
Paul Smedley
Message:

Update source to linux 6.0.7 code

Location:
GPL/branches/uniaud32-exp/alsa-kernel
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-exp/alsa-kernel/core/control.c

    r750 r755  
    766766}
    767767EXPORT_SYMBOL(snd_ctl_rename_id);
     768
     769/**
     770 * snd_ctl_rename - rename the control on the card
     771 * @card: the card instance
     772 * @kctl: the control to rename
     773 * @name: the new name
     774 *
     775 * Renames the specified control on the card to the new name.
     776 *
     777 * Make sure to take the control write lock - down_write(&card->controls_rwsem).
     778 */
     779void snd_ctl_rename(struct snd_card *card, struct snd_kcontrol *kctl,
     780                    const char *name)
     781{
     782        remove_hash_entries(card, kctl);
     783
     784        if (strscpy(kctl->id.name, name, sizeof(kctl->id.name)) < 0)
     785                pr_warn("ALSA: Renamed control new name '%s' truncated to '%s'\n",
     786                        name, kctl->id.name);
     787
     788        add_hash_entries(card, kctl);
     789}
     790EXPORT_SYMBOL(snd_ctl_rename);
    768791
    769792#ifndef CONFIG_SND_CTL_FAST_LOOKUP
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/control.h

    r750 r755  
    139139int snd_ctl_remove_id(struct snd_card * card, struct snd_ctl_elem_id *id);
    140140int snd_ctl_rename_id(struct snd_card * card, struct snd_ctl_elem_id *src_id, struct snd_ctl_elem_id *dst_id);
     141void snd_ctl_rename(struct snd_card *card, struct snd_kcontrol *kctl, const char *name);
    141142int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, int active);
    142143struct snd_kcontrol *snd_ctl_find_numid(struct snd_card * card, unsigned int numid);
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/soc-acpi-intel-match.h

    r750 r755  
    3131extern struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[];
    3232extern struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[];
     33extern struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[];
    3334extern struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[];
    3435
     
    3940extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[];
    4041extern struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[];
     42extern struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_sdw_machines[];
    4143extern struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[];
    4244
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/version.h

    r754 r755  
    11/* include/version.h */
    2 #define CONFIG_SND_VERSION "6.0.3"
     2#define CONFIG_SND_VERSION "6.0.7"
    33#define CONFIG_SND_DATE ""
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/ac97/ac97_codec.c

    r711 r755  
    20572057        if (err < 0) {
    20582058                ac97_err(ac97, "Can't register ac97 bus\n");
     2059                put_device(&ac97->dev);
    20592060                ac97->dev.bus = NULL;
    20602061                return err;
     
    27092710static void set_ctl_name(char *dst, const char *src, const char *suffix)
    27102711{
    2711         if (suffix)
    2712                 sprintf(dst, "%s %s", src, suffix);
    2713         else
    2714                 strcpy(dst, src);
    2715 }       
     2712        const size_t msize = SNDRV_CTL_ELEM_ID_NAME_MAXLEN;
     2713
     2714        if (suffix) {
     2715                if (snprintf(dst, msize, "%s %s", src, suffix) >= msize)
     2716                        pr_warn("ALSA: AC97 control name '%s %s' truncated to '%s'\n",
     2717                                src, suffix, dst);
     2718        } else {
     2719                if (strscpy(dst, src, msize) < 0)
     2720                        pr_warn("ALSA: AC97 control name '%s' truncated to '%s'\n",
     2721                                src, dst);
     2722        }
     2723}
    27162724
    27172725/* remove the control with the given name and optional suffix */
     
    27402748{
    27412749        struct snd_kcontrol *kctl = ctl_find(ac97, src, suffix);
     2750        char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
     2751
    27422752        if (kctl) {
    2743                 set_ctl_name(kctl->id.name, dst, suffix);
     2753                set_ctl_name(name, dst, suffix);
     2754                snd_ctl_rename(ac97->bus->card, kctl, name);
    27442755                return 0;
    27452756        }
     
    27602771{
    27612772        struct snd_kcontrol *kctl1, *kctl2;
     2773        char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
     2774
    27622775        kctl1 = ctl_find(ac97, s1, suffix);
    27632776        kctl2 = ctl_find(ac97, s2, suffix);
    27642777        if (kctl1 && kctl2) {
    2765                 set_ctl_name(kctl1->id.name, s2, suffix);
    2766                 set_ctl_name(kctl2->id.name, s1, suffix);
     2778                set_ctl_name(name, s2, suffix);
     2779                snd_ctl_rename(ac97->bus->card, kctl1, name);
     2780
     2781                set_ctl_name(name, s1, suffix);
     2782                snd_ctl_rename(ac97->bus->card, kctl2, name);
     2783
    27672784                return 0;
    27682785        }
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/au88x0/au88x0.h

    r615 r755  
    142142        stream_t dma_wt[NR_WT];
    143143        wt_voice_t wt_voice[NR_WT];     /* WT register cache. */
    144         char mixwt[(NR_WT / NR_WTPB) * 6];      /* WT mixin objects */
     144        s8 mixwt[(NR_WT / NR_WTPB) * 6];        /* WT mixin objects */
    145145#endif
    146146
     
    236236static int vortex_adb_allocroute(vortex_t * vortex, int dma, int nr_ch,
    237237                                 int dir, int type, int subdev);
    238 static char vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out,
    239                                   int restype);
     238static int vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out,
     239                                 int restype);
    240240#ifndef CHIP_AU8810
    241241static int vortex_wt_allocroute(vortex_t * vortex, int dma, int nr_ch);
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/au88x0/au88x0_core.c

    r697 r755  
    19991999 restype: Indicates type of resource to be checked in or out.
    20002000*/
    2001 static char
     2001static int
    20022002vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out, int restype)
    20032003{
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/ca0106/ca0106_mixer.c

    r738 r755  
    721721        struct snd_kcontrol *kctl = ctl_find(card, src);
    722722        if (kctl) {
    723                 strcpy(kctl->id.name, dst);
     723                snd_ctl_rename(card, kctl, dst);
    724724                return 0;
    725725        }
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/emu10k1/emumixer.c

    r697 r755  
    17681768        struct snd_kcontrol *kctl = ctl_find(card, src);
    17691769        if (kctl) {
    1770                 strcpy(kctl->id.name, dst);
     1770                snd_ctl_rename(card, kctl, dst);
    17711771                return 0;
    17721772        }
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_codec.c

    r754 r755  
    944944
    945945        codec->bus = bus;
    946         codec->depop_delay = -1;
    947         codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
     946        codec->core.type = HDA_DEV_LEGACY;
     947
     948        return codec;
     949}
     950EXPORT_SYMBOL_GPL(snd_hda_codec_device_init);
     951
     952/**
     953 * snd_hda_codec_new - create a HDA codec
     954 * @bus: the bus to assign
     955 * @card: card for this codec
     956 * @codec_addr: the codec address
     957 * @codecp: the pointer to store the generated codec
     958 *
     959 * Returns 0 if successful, or a negative error code.
     960 */
     961int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
     962                      unsigned int codec_addr, struct hda_codec **codecp)
     963{
     964        struct hda_codec *codec;
     965        int ret;
     966
     967        codec = snd_hda_codec_device_init(bus, codec_addr, "hdaudioC%dD%d",
     968                                          card->number, codec_addr);
     969        if (IS_ERR(codec))
     970                return PTR_ERR(codec);
     971        *codecp = codec;
     972
     973        ret = snd_hda_codec_device_new(bus, card, codec_addr, *codecp, true);
     974        if (ret)
     975                put_device(hda_codec_dev(*codecp));
     976
     977        return ret;
     978}
     979EXPORT_SYMBOL_GPL(snd_hda_codec_new);
     980
     981int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card,
     982                        unsigned int codec_addr, struct hda_codec *codec,
     983                        bool snddev_managed)
     984{
     985        char component[31];
     986        hda_nid_t fg;
     987        int err;
     988        static const struct snd_device_ops dev_ops = {
     989                .dev_register = snd_hda_codec_dev_register,
     990                .dev_free = snd_hda_codec_dev_free,
     991        };
     992
     993        dev_dbg(card->dev, "%s: entry\n", __func__);
     994
     995        if (snd_BUG_ON(!bus))
     996                return -EINVAL;
     997        if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS))
     998                return -EINVAL;
     999
    9481000        codec->core.dev.release = snd_hda_codec_dev_release;
    9491001        codec->core.exec_verb = codec_exec_verb;
    950         codec->core.type = HDA_DEV_LEGACY;
    951 
     1002
     1003        codec->card = card;
     1004        codec->addr = codec_addr;
    9521005        mutex_init(&codec->spdif_mutex);
    9531006        mutex_init(&codec->control_mutex);
     
    9621015        INIT_LIST_HEAD(&codec->conn_list);
    9631016        INIT_LIST_HEAD(&codec->pcm_list_head);
    964         INIT_DELAYED_WORK(&codec->jackpoll_work, hda_jackpoll_work);
    9651017        refcount_set(&codec->pcm_ref, 1);
    9661018        init_waitqueue_head(&codec->remove_sleep);
    9671019
    968         return codec;
    969 }
    970 EXPORT_SYMBOL_GPL(snd_hda_codec_device_init);
    971 
    972 /**
    973  * snd_hda_codec_new - create a HDA codec
    974  * @bus: the bus to assign
    975  * @card: card for this codec
    976  * @codec_addr: the codec address
    977  * @codecp: the pointer to store the generated codec
    978  *
    979  * Returns 0 if successful, or a negative error code.
    980  */
    981 int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
    982                       unsigned int codec_addr, struct hda_codec **codecp)
    983 {
    984         struct hda_codec *codec;
    985         int ret;
    986 
    987         codec = snd_hda_codec_device_init(bus, codec_addr, "hdaudioC%dD%d",
    988                                           card->number, codec_addr);
    989         if (IS_ERR(codec))
    990                 return PTR_ERR(codec);
    991         *codecp = codec;
    992 
    993         ret = snd_hda_codec_device_new(bus, card, codec_addr, *codecp, true);
    994         if (ret)
    995                 put_device(hda_codec_dev(*codecp));
    996 
    997         return ret;
    998 }
    999 EXPORT_SYMBOL_GPL(snd_hda_codec_new);
    1000 
    1001 int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card,
    1002                         unsigned int codec_addr, struct hda_codec *codec,
    1003                         bool snddev_managed)
    1004 {
    1005         char component[31];
    1006         hda_nid_t fg;
    1007         int err;
    1008         static const struct snd_device_ops dev_ops = {
    1009                 .dev_register = snd_hda_codec_dev_register,
    1010                 .dev_free = snd_hda_codec_dev_free,
    1011         };
    1012 
    1013         dev_dbg(card->dev, "%s: entry\n", __func__);
    1014 
    1015         if (snd_BUG_ON(!bus))
    1016                 return -EINVAL;
    1017         if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS))
    1018                 return -EINVAL;
    1019 
    1020         codec->card = card;
    1021         codec->addr = codec_addr;
     1020        INIT_DELAYED_WORK(&codec->jackpoll_work, hda_jackpoll_work);
     1021        codec->depop_delay = -1;
     1022        codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
    10221023
    10231024#ifdef CONFIG_PM
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_realtek.c

    r754 r755  
    25062506        kctl = snd_hda_find_mixer_ctl(codec, oldname);
    25072507        if (kctl)
    2508                 strcpy(kctl->id.name, newname);
     2508                snd_ctl_rename(codec->card, kctl, newname);
    25092509}
    25102510
     
    1035910359        SND_PCI_QUIRK(0x103c, 0x88d0, "HP Pavilion 15-eh1xxx (mainboard 88D0)", ALC287_FIXUP_HP_GPIO_LED),
    1036010360        SND_PCI_QUIRK(0x103c, 0x8902, "HP OMEN 16", ALC285_FIXUP_HP_MUTE_LED),
     10361        SND_PCI_QUIRK(0x103c, 0x896d, "HP ZBook Firefly 16 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
    1036110362        SND_PCI_QUIRK(0x103c, 0x896e, "HP EliteBook x360 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
    1036210363        SND_PCI_QUIRK(0x103c, 0x8971, "HP EliteBook 830 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
     
    1037710378        SND_PCI_QUIRK(0x103c, 0x89ac, "HP EliteBook 640 G9", ALC236_FIXUP_HP_GPIO_LED),
    1037810379        SND_PCI_QUIRK(0x103c, 0x89ae, "HP EliteBook 650 G9", ALC236_FIXUP_HP_GPIO_LED),
     10380        SND_PCI_QUIRK(0x103c, 0x89c0, "HP ZBook Power 15.6 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
    1037910381        SND_PCI_QUIRK(0x103c, 0x89c3, "Zbook Studio G9", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
    1038010382        SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
     
    1043110433        SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
    1043210434        SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
     10435        SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402", ALC245_FIXUP_CS35L41_SPI_2),
    1043310436        SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
    1043410437        SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/rme9652/hdsp.c

    r739 r755  
    434434    struct snd_rawmidi_substream *input;
    435435    struct snd_rawmidi_substream *output;
    436     char                     istimer; /* timer in use */
     436    signed char              istimer; /* timer in use */
    437437    struct timer_list        timer;
    438438    spinlock_t               lock;
     
    481481        int                   running;
    482482        int                   system_sample_rate;
    483         const char           *channel_map;
     483        const signed char    *channel_map;
    484484        int                   dev;
    485485        int                   irq;
     
    503503*/
    504504
    505 static const char channel_map_df_ss[HDSP_MAX_CHANNELS] = {
     505static const signed char channel_map_df_ss[HDSP_MAX_CHANNELS] = {
    506506        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
    507507        18, 19, 20, 21, 22, 23, 24, 25
     
    518518};
    519519
    520 static const char channel_map_ds[HDSP_MAX_CHANNELS] = {
     520static const signed char channel_map_ds[HDSP_MAX_CHANNELS] = {
    521521        /* ADAT channels are remapped */
    522522        1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23,
     
    527527};
    528528
    529 static const char channel_map_H9632_ss[HDSP_MAX_CHANNELS] = {
     529static const signed char channel_map_H9632_ss[HDSP_MAX_CHANNELS] = {
    530530        /* ADAT channels */
    531531        0, 1, 2, 3, 4, 5, 6, 7,
     
    541541};
    542542
    543 static const char channel_map_H9632_ds[HDSP_MAX_CHANNELS] = {
     543static const signed char channel_map_H9632_ds[HDSP_MAX_CHANNELS] = {
    544544        /* ADAT */
    545545        1, 3, 5, 7,
     
    555555};
    556556
    557 static const char channel_map_H9632_qs[HDSP_MAX_CHANNELS] = {
     557static const signed char channel_map_H9632_qs[HDSP_MAX_CHANNELS] = {
    558558        /* ADAT is disabled in this mode */
    559559        /* SPDIF */
     
    39403940}
    39413941
    3942 static char *hdsp_channel_buffer_location(struct hdsp *hdsp,
     3942static signed char *hdsp_channel_buffer_location(struct hdsp *hdsp,
    39433943                                             int stream,
    39443944                                             int channel)
     
    39653965{
    39663966        struct hdsp *hdsp = snd_pcm_substream_chip(substream);
    3967         char *channel_buf;
     3967        signed char *channel_buf;
    39683968
    39693969        if (snd_BUG_ON(pos + count > HDSP_CHANNEL_BUFFER_BYTES))
     
    39833983{
    39843984        struct hdsp *hdsp = snd_pcm_substream_chip(substream);
    3985         char *channel_buf;
     3985        signed char *channel_buf;
    39863986
    39873987        channel_buf = hdsp_channel_buffer_location(hdsp, substream->pstr->stream, channel);
     
    39973997{
    39983998        struct hdsp *hdsp = snd_pcm_substream_chip(substream);
    3999         char *channel_buf;
     3999        signed char *channel_buf;
    40004000
    40014001        if (snd_BUG_ON(pos + count > HDSP_CHANNEL_BUFFER_BYTES))
     
    40154015{
    40164016        struct hdsp *hdsp = snd_pcm_substream_chip(substream);
    4017         char *channel_buf;
     4017        signed char *channel_buf;
    40184018
    40194019        channel_buf = hdsp_channel_buffer_location(hdsp, substream->pstr->stream, channel);
     
    40294029{
    40304030        struct hdsp *hdsp = snd_pcm_substream_chip(substream);
    4031         char *channel_buf;
     4031        signed char *channel_buf;
    40324032
    40334033        channel_buf = hdsp_channel_buffer_location (hdsp, substream->pstr->stream, channel);
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/rme9652/rme9652.c

    r737 r755  
    231231        int last_adat_sample_rate;      /* ... induced rate changes            */
    232232
    233         const char *channel_map;
     233        const signed char *channel_map;
    234234
    235235        struct snd_card *card;
     
    248248*/
    249249
    250 static const char channel_map_9652_ss[26] = {
     250static const signed char channel_map_9652_ss[26] = {
    251251        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
    252252        18, 19, 20, 21, 22, 23, 24, 25
    253253};
    254254
    255 static const char channel_map_9636_ss[26] = {
     255static const signed char channel_map_9636_ss[26] = {
    256256        0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
    257257        /* channels 16 and 17 are S/PDIF */
     
    261261};
    262262
    263 static const char channel_map_9652_ds[26] = {
     263static const signed char channel_map_9652_ds[26] = {
    264264        /* ADAT channels are remapped */
    265265        1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23,
     
    270270};
    271271
    272 static const char channel_map_9636_ds[26] = {
     272static const signed char channel_map_9636_ds[26] = {
    273273        /* ADAT channels are remapped */
    274274        1, 3, 5, 7, 9, 11, 13, 15,
     
    18201820}
    18211821
    1822 static char *rme9652_channel_buffer_location(struct snd_rme9652 *rme9652,
     1822static signed char *rme9652_channel_buffer_location(struct snd_rme9652 *rme9652,
    18231823                                             int stream,
    18241824                                             int channel)
     
    18481848{
    18491849        struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
    1850         char *channel_buf;
     1850        signed char *channel_buf;
    18511851
    18521852        if (snd_BUG_ON(pos + count > RME9652_CHANNEL_BUFFER_BYTES))
     
    18681868{
    18691869        struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
    1870         char *channel_buf;
     1870        signed char *channel_buf;
    18711871
    18721872        channel_buf = rme9652_channel_buffer_location(rme9652,
     
    18841884{
    18851885        struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
    1886         char *channel_buf;
     1886        signed char *channel_buf;
    18871887
    18881888        if (snd_BUG_ON(pos + count > RME9652_CHANNEL_BUFFER_BYTES))
     
    19041904{
    19051905        struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
    1906         char *channel_buf;
     1906        signed char *channel_buf;
    19071907
    19081908        channel_buf = rme9652_channel_buffer_location(rme9652,
     
    19201920{
    19211921        struct snd_rme9652 *rme9652 = snd_pcm_substream_chip(substream);
    1922         char *channel_buf;
     1922        signed char *channel_buf;
    19231923
    19241924        channel_buf = rme9652_channel_buffer_location (rme9652,
  • GPL/branches/uniaud32-exp/alsa-kernel/synth/emux/emux.c

    r711 r755  
    133133int snd_emux_free(struct snd_emux *emu)
    134134{
    135         unsigned long flags;
    136 
    137135        if (! emu)
    138136                return -EINVAL;
    139137
    140         spin_lock_irqsave(&emu->voice_lock, flags);
    141         if (emu->timer_active)
    142                 del_timer(&emu->tlist);
    143         spin_unlock_irqrestore(&emu->voice_lock, flags);
     138        del_timer_sync(&emu->tlist);
    144139
    145140        snd_emux_proc_free(emu);
Note: See TracChangeset for help on using the changeset viewer.