Changeset 774 for GPL/branches


Ignore:
Timestamp:
Apr 21, 2025, 1:39:12 AM (4 months ago)
Author:
Paul Smedley
Message:

Fix a bunch of warnings, add a couple of realtek fixups

Location:
GPL/branches/uniaud32-exp
Files:
22 edited

Legend:

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

    r767 r774  
    9191        (IS_ENABLED(CONFIG_SND_UMP) && ((rmidi)->info_flags & SNDRV_RAWMIDI_INFO_UMP))
    9292#else
    93 #define rawmidi_is_ump(rmidi) \
    94         (0 && ((rmidi)->info_flags & SNDRV_RAWMIDI_INFO_UMP))
     93#define rawmidi_is_ump(rmidi) (0)
    9594#endif
    9695
     
    203202        runtime->appl_ptr = runtime->hw_ptr = 0;
    204203        substream->runtime = runtime;
     204#ifndef TARGET_OS2
    205205        if (rawmidi_is_ump(substream->rmidi))
    206206                runtime->align = 3;
     207#endif
    207208        return 0;
    208209}
     
    11341135#ifndef TARGET_OS2
    11351136        struct snd_rawmidi_framing_tstamp frame = { .tv_sec = tstamp->tv_sec, .tv_nsec = tstamp->tv_nsec };
     1137        int dest_frames = 0;
    11361138#else
    11371139        struct snd_rawmidi_framing_tstamp frame;
     
    11391141        frame.tv_nsec = tstamp->tv_nsec;
    11401142#endif
    1141         int dest_frames = 0;
    11421143        int orig_count = src_count;
    11431144        int frame_size = sizeof(struct snd_rawmidi_framing_tstamp);
     
    19441945        if (err < 0)
    19451946                return err;
     1947#ifndef TARGET_OS2
    19461948        if (rawmidi_is_ump(rmidi))
    19471949                dev_set_name(rmidi->dev, "umpC%iD%i", card->number, device);
    19481950        else
     1951#endif
    19491952                dev_set_name(rmidi->dev, "midiC%iD%i", card->number, device);
    19501953
  • GPL/branches/uniaud32-exp/alsa-kernel/core/timer.c

    r771 r774  
    427427{
    428428        struct snd_timer *timer = timeri->timer;
     429#ifndef TARGET_OS2
    429430        struct snd_timer_instance *slave, *tmp;
    430 
     431#endif
    431432        if (timer) {
    432433                spin_lock_irq(&timer->lock);
  • GPL/branches/uniaud32-exp/alsa-kernel/hda/hda_bus_type.c

    r766 r774  
    4747}
    4848
    49 static int hda_bus_match(struct device *dev, const struct device_driver *drv)
     49static int hda_bus_match(struct device *dev, struct device_driver *drv)
    5050{
    5151        struct hdac_device *hdev = dev_to_hdac_dev(dev);
     
    7777}
    7878
    79 const struct bus_type snd_hda_bus_type = {
     79/*const */struct bus_type snd_hda_bus_type = {
    8080        .name = "hdaudio",
    8181        .match = hda_bus_match,
  • GPL/branches/uniaud32-exp/alsa-kernel/hda/hdac_component.c

    r762 r774  
    66#include <linux/pci.h>
    77#include <linux/component.h>
     8#include <linux/ctype.h>
    89#include <sound/core.h>
    910#include <sound/hdaudio.h>
     
    194195                return ret;
    195196
     197#ifndef TARGET_OS2
    196198        if (WARN_ON(!(acomp->dev && acomp->ops))) {
    197199                ret = -EINVAL;
    198200                goto out_unbind;
    199201        }
    200 
     202#endif
    201203        /* pin the module to avoid dynamic unbinding, but only if given */
    202204        if (!try_module_get(acomp->ops->owner)) {
  • GPL/branches/uniaud32-exp/alsa-kernel/hda/hdac_stream.c

    r767 r774  
    112112
    113113        if (bus->spbcap) {
    114                 azx_dev->spib_addr = bus->spbcap + AZX_SPB_BASE +
     114                azx_dev->spib_addr = (void*) bus->spbcap + AZX_SPB_BASE +
    115115                                        AZX_SPB_INTERVAL * idx +
    116116                                        AZX_SPB_SPIB;
    117117
    118                 azx_dev->fifo_addr = bus->spbcap + AZX_SPB_BASE +
     118                azx_dev->fifo_addr = (void*) bus->spbcap + AZX_SPB_BASE +
    119119                                        AZX_SPB_INTERVAL * idx +
    120120                                        AZX_SPB_MAXFIFO;
     
    122122
    123123        if (bus->drsmcap)
    124                 azx_dev->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE +
     124                azx_dev->dpibr_addr = (void*) bus->drsmcap + AZX_DRSM_BASE +
    125125                                        AZX_DRSM_INTERVAL * idx;
    126126}
     
    289289        struct snd_pcm_runtime *runtime;
    290290        unsigned int val;
     291#ifndef TARGET_OS2
    291292        u16 reg;
    292293        int ret;
     294#endif
    293295
    294296        if (azx_dev->substream)
  • GPL/branches/uniaud32-exp/alsa-kernel/include/sound/hdaudio.h

    r767 r774  
    3636 * exported bus type
    3737 */
    38 extern const struct bus_type snd_hda_bus_type;
     38extern struct bus_type snd_hda_bus_type;
    3939
    4040/*
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/emu10k1/io.c

    r766 r774  
    291291void snd_emu1010_fpga_write(struct snd_emu10k1 *emu, u32 reg, u32 value)
    292292{
     293#ifndef TARGET_OS2
    293294        if (snd_BUG_ON(!mutex_is_locked(&emu->emu1010.lock)))
    294295                return;
     296#endif
    295297        snd_emu1010_fpga_write_locked(emu, reg, value);
    296298}
     
    311313        u32 mask = emu->card_capabilities->ca0108_chip ? 0x1f : 0x7f;
    312314
     315#ifndef TARGET_OS2
    313316        if (snd_BUG_ON(!mutex_is_locked(&emu->emu1010.lock)))
    314317                return;
     318#endif
    315319        if (snd_BUG_ON(reg > 0x3f))
    316320                return;
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/hda_intel.c

    r766 r774  
    459459}
    460460
     461#ifdef NOT_USED
    461462/*
    462463 * In BXT-P A0, HD-Audio DMA requests is later than expected,
     
    474475        azx_writel(chip, VS_EM4L, val);
    475476}
     477#endif
    476478
    477479/*
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_ca0132.c

    r766 r774  
    36333633static bool dspload_wait_loaded(struct hda_codec *codec)
    36343634{
     3635#ifndef TARGET_OS2
    36353636        unsigned long timeout = jiffies + msecs_to_jiffies(2000);
    36363637
     
    36423643                msleep(20);
    36433644        } while (time_before(jiffies, timeout));
    3644 
     3645#endif
    36453646        codec_err(codec, "ca0132 failed to download DSP\n");
    36463647        return false;
     
    66716672#else
    66726673        struct snd_kcontrol_new knew = {
    6673                 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 
    6674                 .index = 0,  \
    6675                 .subdevice = HDA_SUBDEV_AMP_FLAG, 
     6674                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
     6675                .index = 0,
     6676                .subdevice = HDA_SUBDEV_AMP_FLAG,
    66766677                .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
    66776678                            SNDRV_CTL_ELEM_ACCESS_TLV_READ |
    6678                             SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, 
    6679                 .info = snd_hda_mixer_amp_volume_info, \
     6679                            SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK,
     6680                .info = snd_hda_mixer_amp_volume_info,
    66806681                .get = snd_hda_mixer_amp_volume_get,
    6681                 .put = snd_hda_mixer_amp_volume_put, 
     6682                .put = snd_hda_mixer_amp_volume_put,
    66826683                .tlv = { .c = snd_hda_mixer_amp_tlv },         
    66836684
     
    67546755        {
    67556756                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
    6756                 .index = 0, 
    6757                 .subdevice = HDA_SUBDEV_AMP_FLAG, 
    6758                 .info = snd_hda_mixer_amp_switch_info, 
    6759                 .get = snd_hda_mixer_amp_switch_get, 
    6760                 .put = snd_hda_mixer_amp_switch_put, 
     6757                .index = 0,
     6758                .subdevice = HDA_SUBDEV_AMP_FLAG,
     6759                .info = snd_hda_mixer_amp_switch_info,
     6760                .get = snd_hda_mixer_amp_switch_get,
     6761                .put = snd_hda_mixer_amp_switch_put,
    67616762        };
    67626763        knew.name = ca0132_voicefx.name;
    67636764        knew.private_value = HDA_COMPOSE_AMP_VAL(VOICEFX, 1, 0, HDA_INPUT);
    6764 
    67656765#endif
    67666766        knew.info = ca0132_voicefx_info;
     
    67816781        {
    67826782                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
    6783                 .index = 0, 
    6784                 .subdevice = HDA_SUBDEV_AMP_FLAG, 
    6785                 .info = snd_hda_mixer_amp_switch_info, 
    6786                 .get = snd_hda_mixer_amp_switch_get, 
    6787                 .put = snd_hda_mixer_amp_switch_put, 
     6783                .index = 0,
     6784                .subdevice = HDA_SUBDEV_AMP_FLAG,
     6785                .info = snd_hda_mixer_amp_switch_info,
     6786                .get = snd_hda_mixer_amp_switch_get,
     6787                .put = snd_hda_mixer_amp_switch_put,
    67886788        };
    67896789        knew.name = ca0132_alt_eq_enum.name;
     
    91689168        /* put any chip cleanup stuffs here. */
    91699169
     9170#ifndef TARGET_OS2
    91709171        if (dspload_is_loaded(codec))
    91719172                dsp_reset(codec);
     9173#endif
    91729174}
    91739175
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_conexant.c

    r766 r774  
    10711071                .chain_id = CXT_FIXUP_HEADSET_MIC,
    10721072        },
     1073#endif
    10731074        [CXT_PINCFG_SWS_JS201D] = {
    10741075                .type = HDA_FIXUP_PINS,
    10751076                .v.pins = cxt_pincfg_sws_js201d,
    10761077        },
     1078#ifdef NOT_USED
    10771079        [CXT_PINCFG_TOP_SPEAKER] = {
    10781080                .type = HDA_FIXUP_PINS,
     
    10821084                },
    10831085        },
     1086#endif
    10841087        [CXT_FIXUP_HP_A_U] = {
    10851088                .type = HDA_FIXUP_FUNC,
    10861089                .v.func = cxt_fixup_hp_a_u,
    10871090        },
    1088 #endif
    10891091};
    10901092
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_hdmi.c

    r766 r774  
    20832083        mutex_lock(&codec->spdif_mutex);
    20842084        spdif = snd_hda_spdif_out_of_nid(codec, cvt_nid);
     2085#ifndef TARGET_OS2
    20852086        /* Add sanity check to pass klockwork check.
    20862087         * This should never happen.
     
    20902091                return true;
    20912092        }
     2093#endif
    20922094        non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO);
    20932095        mutex_unlock(&codec->spdif_mutex);
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_realtek.c

    r770 r774  
    58425842static void alc_hp_mute_disable(struct hda_codec *codec, unsigned int delay)
    58435843{
    5844         if (delay <= 0)
     5844        if (delay == 0)
    58455845                delay = 75;
    58465846        snd_hda_codec_write(codec, 0x21, 0,
     
    58545854static void alc_hp_enable_unmute(struct hda_codec *codec, unsigned int delay)
    58555855{
    5856         if (delay <= 0)
     5856        if (delay == 0)
    58575857                delay = 75;
    58585858        snd_hda_codec_write(codec, 0x21, 0,
     
    77997799static void find_cirrus_companion_amps(struct hda_codec *cdc)
    78007800{
     7801#ifndef TARGET_OS2
    78017802        struct device *dev = hda_codec_dev(cdc);
    78027803        struct acpi_device *adev;
     
    78127813        int i, count = 0, count_devindex = 0;
    78137814
    7814 #ifndef TARGET_OS2
    78157815        for (i = 0; i < ARRAY_SIZE(acpi_ids); ++i) {
    78167816                adev = acpi_dev_get_first_match_dev(acpi_ids[i].hid, NULL, -1);
     
    87668766                        {0}
    87678767};
     8768
     8769static const struct hda_pintbl ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC_PINS[] = {
     8770                        { 0x19, 0x03a11050 },
     8771                        { 0x1b, 0x03a11c30 },
     8772                        {0}
     8773};
     8774
     8775static const struct hda_pintbl ALC294_FIXUP_LENOVO_MIC_LOCATION_PINS[] = {
     8776                        /* Change the mic location from front to right, otherwise there are
     8777                           two front mics with the same name, pulseaudio can't handle them.
     8778                           This is just a temporary workaround, after applying this fixup,
     8779                           there will be one "Front Mic" and one "Mic" in this machine.
     8780                         */
     8781                        { 0x1a, 0x04a19040 },
     8782                        {0}
     8783};
    87688784#endif
    87698785
     
    98999915                .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE
    99009916        },
     9917#endif
    99019918        [ALC294_FIXUP_LENOVO_MIC_LOCATION] = {
    99029919                .type = HDA_FIXUP_PINS,
     9920#ifndef TARGET_OS2
    99039921                .v.pins = (const struct hda_pintbl[]) {
    99049922                        /* Change the mic location from front to right, otherwise there are
     
    99109928                        {0}
    99119929                },
    9912         },
     9930#else
     9931                .v.pins = ALC294_FIXUP_LENOVO_MIC_LOCATION_PINS,
     9932#endif
     9933        },
     9934#ifdef NOT_USED
    99139935        [ALC225_FIXUP_DELL_WYSE_MIC_NO_PRESENCE] = {
    99149936                .type = HDA_FIXUP_PINS,
     
    1117311195                .v.func = alc285_fixup_asus_ga403u,
    1117411196        },
    11175 #ifdef NOT_USED
    1117611197        [ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC] = {
    1117711198                .type = HDA_FIXUP_PINS,
     11199#ifndef TARGET_OS2
    1117811200                .v.pins = (const struct hda_pintbl[]) {
    1117911201                        { 0x19, 0x03a11050 },
     
    1118111203                        { }
    1118211204                },
     11205#else
     11206                .v.pins = ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC_PINS,
     11207#endif
    1118311208                .chained = true,
    1118411209                .chain_id = ALC285_FIXUP_ASUS_GA403U_I2C_SPEAKER2_TO_DAC1
    1118511210        },
    11186 #endif
    1118711211        [ALC285_FIXUP_ASUS_GU605_SPI_SPEAKER2_TO_DAC1] = {
    1118811212                .type = HDA_FIXUP_FUNC,
  • GPL/branches/uniaud32-exp/include/linux/ctype.h

    r615 r774  
    11#ifndef _LINUX_CTYPE_H
    22#define _LINUX_CTYPE_H
    3 
     3_WCRTLINK extern int isdigit(int c);
    44#include <ctype.h>
    55_WCRTLINK extern int    tolower(int);
     6
    67#endif /* _LINUX_CTYPE_H */
  • GPL/branches/uniaud32-exp/include/linux/device.h

    r767 r774  
    5858  struct device   * parent;
    5959  struct device_private *p;
    60   const struct bus_type * bus;    /* type of bus device is on */
     60  struct bus_type * bus;    /* type of bus device is on */
    6161  struct kobject kobj;
    6262  const char            *init_name; /* initial name of the device */
     
    120120        const char              *dev_name;
    121121        int (*match)(struct device *dev, struct device_driver *drv);
    122         int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
     122        int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);
    123123        int (*probe)(struct device *dev);
    124124        int (*remove)(struct device *dev);
  • GPL/branches/uniaud32-exp/include/linux/export.h

    r767 r774  
    66#define EXPORT_SYMBOL(a)
    77#define EXPORT_SYMBOL_GPL(a)
    8 #define EXPORT_SYMBOL_NS_GPL(a)
     8#define EXPORT_SYMBOL_NS(a, b)
     9#define EXPORT_SYMBOL_NS_GPL(a, b)
    910
    1011#endif /* _LINUX_EXPORT_H */
  • GPL/branches/uniaud32-exp/include/linux/kernel.h

    r767 r774  
    113113
    114114char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
     115int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
    115116extern int hex_to_bin(char ch);
    116117#define __ALIGN_MASK(x, mask)   __ALIGN_KERNEL_MASK((x), (mask))
  • GPL/branches/uniaud32-exp/include/linux/string.h

    r764 r774  
    3333ssize_t strscpy(char *dest, const char *src, size_t count);
    3434extern bool sysfs_streq(const char *s1, const char *s2);
    35 
    3635#endif
    3736
  • GPL/branches/uniaud32-exp/include/linux/sysfs.h

    r615 r774  
    22#define _LINUX_SYSFS_H
    33#include <linux/types.h>
     4
     5int sysfs_emit(char *buf, const char *fmt, ...);
     6int sysfs_emit_at(char *buf, int at, const char *fmt, ...);
    47
    58struct attribute {
  • GPL/branches/uniaud32-exp/include/linux/workqueue.h

    r725 r774  
    5757#define __WORK_INITIALIZER(n, f) {                      \
    5858        .data = 0,                              \
    59         .func = (f),                            \
     59        .func = (void(*)(void *))(f),           \
    6060        }
    6161
  • GPL/branches/uniaud32-exp/lib32/bitmap.c

    r764 r774  
    704704                        int nmaskbits)
    705705{
    706         if (!access_ok(VERIFY_READ, ubuf, ulen))
     706        if (!access_ok(ubuf, ulen))
    707707                return -EFAULT;
    708708        return __bitmap_parselist((const char *)ubuf,
  • GPL/branches/uniaud32-exp/lib32/devres.c

    r753 r774  
    794794                        goto err_inval;
    795795
    796                 rc = pci_request_region(pdev, i, name);
     796                rc = pci_request_region(pdev, i, (char*)name);
    797797                if (rc)
    798798                        goto err_inval;
  • GPL/branches/uniaud32-exp/lib32/sound.c

    r675 r774  
    10181018                                periodsize      = maxperiodsize;
    10191019                                periodbytes = samples_to_bytes(periodsize);
    1020                                 dprintf((" Peroid size error IOCTL HW Parms"));
     1020                                dprintf((" Period size error IOCTL HW Parms"));
    10211021                                fTryAgain = TRUE;
    10221022                                goto tryagain;
Note: See TracChangeset for help on using the changeset viewer.