Ignore:
Timestamp:
Apr 21, 2025, 7:17:25 PM (6 months ago)
Author:
David Azarewicz
Message:

Merge from uniaud32-exp branch

Location:
GPL/trunk
Files:
49 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/include/sound/ac97/codec.h

    r772 r777  
    7474}
    7575
    76 static inline struct ac97_codec_driver *to_ac97_driver(struct device_driver *d)
    77 {
    78         return container_of(d, struct ac97_codec_driver, driver);
    79 }
     76#define to_ac97_driver(__drv) container_of_const(__drv, struct ac97_codec_driver, driver)
    8077
    8178#if IS_ENABLED(CONFIG_AC97_BUS_NEW)
  • GPL/trunk/alsa-kernel/include/sound/ac97_codec.h

    r772 r777  
    418418
    419419/* ad hoc AC97 device driver access */
    420 extern struct bus_type ac97_bus_type;
     420extern const struct bus_type ac97_bus_type;
    421421
    422422/* AC97 platform_data adding function */
  • GPL/trunk/alsa-kernel/include/sound/aci.h

    r772 r777  
    7373
    7474struct snd_miro_aci {
     75        struct snd_card *card;
    7576        unsigned long aci_port;
    7677        int aci_vendor;
  • GPL/trunk/alsa-kernel/include/sound/ak4531_codec.h

    r772 r777  
    6666void snd_ak4531_suspend(struct snd_ak4531 *ak4531);
    6767void snd_ak4531_resume(struct snd_ak4531 *ak4531);
     68#else
     69static inline void snd_ak4531_suspend(struct snd_ak4531 *ak4531) {}
     70static inline void snd_ak4531_resume(struct snd_ak4531 *ak4531) {}
    6871#endif
    6972
  • GPL/trunk/alsa-kernel/include/sound/asoundef.h

    r772 r777  
    111111#define IEC958_AES2_CON_CHANNEL         (15<<4) /* mask - channel number */
    112112#define IEC958_AES2_CON_CHANNEL_UNSPEC  (0<<4)  /* unspecified */
    113 #define IEC958_AES3_CON_FS              (15<<0) /* mask - sample frequency */
     113#define IEC958_AES3_CON_FS              ((1<<7) | (15<<0)) /* mask - sample frequency */
    114114#define IEC958_AES3_CON_FS_44100        (0<<0)  /* 44.1kHz */
    115115#define IEC958_AES3_CON_FS_NOTID        (1<<0)  /* non indicated */
     
    117117#define IEC958_AES3_CON_FS_32000        (3<<0)  /* 32kHz */
    118118#define IEC958_AES3_CON_FS_22050        (4<<0)  /* 22.05kHz */
     119#define IEC958_AES3_CON_FS_384000       (5<<0)  /* 384kHz */
    119120#define IEC958_AES3_CON_FS_24000        (6<<0)  /* 24kHz */
    120121#define IEC958_AES3_CON_FS_88200        (8<<0)  /* 88.2kHz */
     
    122123#define IEC958_AES3_CON_FS_96000        (10<<0) /* 96kHz */
    123124#define IEC958_AES3_CON_FS_176400       (12<<0) /* 176.4kHz */
     125#define IEC958_AES3_CON_FS_352400       (13<<0) /* 352.4kHz */
    124126#define IEC958_AES3_CON_FS_192000       (14<<0) /* 192kHz */
     127#define IEC958_AES3_CON_FS_128000       ((1<<7) | (11<<0)) /* 128kHz */
     128#define IEC958_AES3_CON_FS_705600       ((1<<7) | (13<<0)) /* 705.6kHz */
    125129#define IEC958_AES3_CON_CLOCK           (3<<4)  /* mask - clock accuracy */
    126130#define IEC958_AES3_CON_CLOCK_1000PPM   (0<<4)  /* 1000 ppm */
  • GPL/trunk/alsa-kernel/include/sound/control.h

    r772 r777  
    8282        void *private_data;
    8383        void (*private_free)(struct snd_kcontrol *kcontrol);
    84         struct snd_kcontrol_volatile vd[];      /* volatile data */
     84        struct snd_kcontrol_volatile vd[1] __counted_by(count); /* volatile data */
    8585};
    8686
     
    141141void snd_ctl_rename(struct snd_card *card, struct snd_kcontrol *kctl, const char *name);
    142142int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, int active);
    143 struct snd_kcontrol *snd_ctl_find_numid_locked(struct snd_card *card, unsigned int numid);
    144143struct snd_kcontrol *snd_ctl_find_numid(struct snd_card *card, unsigned int numid);
    145 struct snd_kcontrol *snd_ctl_find_id_locked(struct snd_card *card, const struct snd_ctl_elem_id *id);
    146144struct snd_kcontrol *snd_ctl_find_id(struct snd_card *card, const struct snd_ctl_elem_id *id);
    147145
  • GPL/trunk/alsa-kernel/include/sound/core.h

    r772 r777  
    103103        unsigned int last_numid;        /* last used numeric ID */
    104104        struct rw_semaphore controls_rwsem;     /* controls lock (list and values) */
    105         rwlock_t ctl_files_rwlock;      /* ctl_files list lock */
     105        rwlock_t controls_rwlock;       /* lock for lookup and ctl_files list */
    106106        int controls_count;             /* count of all controls */
    107107        size_t user_ctl_alloc_size;     // current memory allocation by user controls.
     
    349349/* --- */
    350350
    351 /* sound printk debug levels */
    352 enum {
    353         SND_PR_ALWAYS,
    354         SND_PR_DEBUG,
    355         SND_PR_VERBOSE,
    356 };
    357 
    358 #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
    359 #error "Not valid for OS/2"
    360 __printf(4, 5)
    361 void __snd_printk(unsigned int level, const char *file, int line, const char *format, ...);
    362 #else
    363 #ifndef TARGET_OS2
    364 #define __snd_printk(level, file, line, format, ...) \
    365  printk(format, ##__VA_ARGS__)
    366 #else
    367 #define __snd_printk printk
    368 #endif /* TARGET_OS2 */
    369 #endif /* defined(...) */
    370 
    371 /**
    372  * snd_printk - printk wrapper
    373  * @fmt: format string
    374  *
    375  * Works like printk() but prints the file and the line of the caller
    376  * when configured with CONFIG_SND_VERBOSE_PRINTK.
    377  */
    378 #ifndef TARGET_OS2
    379 #define snd_printk(fmt, ...) \
    380         __snd_printk(0, __FILE__, __LINE__, fmt, ##__VA_ARGS__)
    381 #else
    382 #define snd_printk __snd_printk
    383 #endif 
    384 
    385351#ifdef CONFIG_SND_DEBUG
    386 /**
    387  * snd_printd - debug printk
    388  * @fmt: format string
    389  *
    390  * Works like snd_printk() for debugging purposes.
    391  * Ignored when CONFIG_SND_DEBUG is not set.
    392  */
    393 #ifndef TARGET_OS2
    394 #define snd_printd(fmt, ...) \
    395  __snd_printk(1, __FILE__, __LINE__, fmt, ##__VA_ARGS__)
    396 #define _snd_printd(level, fmt, ...) \
    397         __snd_printk(level, __FILE__, __LINE__, fmt, ##__VA_ARGS__)
    398 #else /* TARGET_OS2 */
    399 #define snd_printd printk
    400 #endif /* TARGET_OS2 */
    401 
    402352/**
    403353 * snd_BUG - give a BUG warning message and stack trace
     
    411361#define snd_BUG()
    412362#endif
    413 
    414 /**
    415  * snd_printd_ratelimit - Suppress high rates of output when
    416  *                        CONFIG_SND_DEBUG is enabled.
    417  */
    418 #define snd_printd_ratelimit() printk_ratelimit()
    419363
    420364/**
     
    434378
    435379#ifndef TARGET_OS2
    436 __printf(1, 2)
    437 static inline void snd_printd(const char *format, ...) {}
    438 __printf(2, 3)
    439 static inline void _snd_printd(int level, const char *format, ...) {}
    440 
    441380#define snd_BUG()                       do { } while (0)
    442381
     
    446385})
    447386#else
    448 #define snd_printd snd_printk
    449387#define snd_BUG()                       do { } while (0)
    450388static inline int __snd_bug_on(int cond)
     
    455393#endif
    456394
    457 static inline bool snd_printd_ratelimit(void) { return false; }
    458 
    459395#endif /* CONFIG_SND_DEBUG */
    460 
    461 #ifdef CONFIG_SND_DEBUG_VERBOSE
    462 /**
    463  * snd_printdd - debug printk
    464  * @format: format string
    465  *
    466  * Works like snd_printk() for debugging purposes.
    467  * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set.
    468  */
    469 #ifndef TARGET_OS2
    470 #define snd_printdd(format, ...) \
    471  __snd_printk(2, __FILE__, __LINE__, format, ##__VA_ARGS__)
    472 #else
    473 #define snd_printdd snd_printk
    474 #endif /* TARGET_OS2 */
    475 #else /* CONFIG_SND_DEBUG_VERBIOSE */
    476 #ifndef TARGET_OS2
    477 __printf(1, 2)
    478 static inline void snd_printdd(const char *format, ...) {}
    479 #else
    480 #define snd_printdd snd_printk
    481 #endif /* TARGET_OS2 */
    482 #endif /* CONFIG_SND_DEBUG_VERBIOSE */
    483 
    484396
    485397#define SNDRV_OSS_VERSION         ((3<<16)|(8<<8)|(1<<4)|(0))   /* 3.8.1a */
  • GPL/trunk/alsa-kernel/include/sound/cs4271.h

    r772 r777  
    1010
    1111struct cs4271_platform_data {
    12         int gpio_nreset;        /* GPIO driving Reset pin, if any */
    1312        bool amutec_eq_bmutec;  /* flag to enable AMUTEC=BMUTEC */
    1413
  • GPL/trunk/alsa-kernel/include/sound/dmaengine_pcm.h

    r772 r777  
    120120 * @process: Callback used to apply processing on samples transferred from/to
    121121 *   user space.
     122 * @name: Component name. If null, dev_name will be used.
    122123 * @compat_filter_fn: Will be used as the filter function when requesting a
    123124 *  channel for platforms which do not use devicetree. The filter parameter
     
    145146                       int channel, unsigned long hwoff,
    146147                       unsigned long bytes);
     148        const char *name;
    147149        dma_filter_fn compat_filter_fn;
    148150        struct device *dma_dev;
  • GPL/trunk/alsa-kernel/include/sound/emu10k1.h

    r772 r777  
    711711// and hold the interleaved frames.
    712712// The cache holds 64 frames, so the upper half is not used in 8-bit mode.
    713 // All registers mentioned below count in frames.
    714 // The cache is a ring buffer; CCR_READADDRESS operates modulo 64.
    715 // The cache is filled from (CCCA_CURRADDR - CCR_CACHEINVALIDSIZE)
    716 // into (CCR_READADDRESS - CCR_CACHEINVALIDSIZE).
     713// All registers mentioned below count in frames. Shortcuts:
     714//   CA = CCCA_CURRADDR, CRA = CCR_READADDRESS,
     715//   CLA = CCR_CACHELOOPADDRHI:CLP_CACHELOOPADDR,
     716//   CIS = CCR_CACHEINVALIDSIZE, LIS = CCR_LOOPINVALSIZE,
     717//   CLF = CCR_CACHELOOPFLAG, LF = CCR_LOOPFLAG
     718// The cache is a ring buffer; CRA operates modulo 64.
     719// The cache is filled from (CA - CIS) into (CRA - CIS).
    717720// The engine has a fetch threshold of 32 bytes, so it tries to keep
    718 // CCR_CACHEINVALIDSIZE below 8 (16-bit stereo), 16 (16-bit mono,
    719 // 8-bit stereo), or 32 (8-bit mono). The actual transfers are pretty
    720 // unpredictable, especially if several voices are running.
    721 // Frames are consumed at CCR_READADDRESS, which is incremented afterwards,
    722 // along with CCCA_CURRADDR and CCR_CACHEINVALIDSIZE. This implies that the
    723 // actual playback position always lags CCCA_CURRADDR by exactly 64 frames.
     721// CIS below 8 (16-bit stereo), 16 (16-bit mono, 8-bit stereo), or
     722// 32 (8-bit mono). The actual transfers are pretty unpredictable,
     723// especially if several voices are running.
     724// Frames are consumed at CRA, which is incremented afterwards,
     725// along with CA and CIS. This implies that the actual playback
     726// position always lags CA by exactly 64 frames.
     727// When CA reaches DSL_LOOPENDADDR, LF is set for one frame's time.
     728// LF's rising edge causes the current values of CA and CIS to be
     729// copied into CLA and LIS, resp., and CLF to be set.
     730// If CLF is set, the first LIS of the CIS frames are instead
     731// filled from (CLA - LIS), and CLF is subsequently reset.
    724732#define CD0                     0x20            /* Cache data registers 0 .. 0x1f                       */
    725733
     
    18491857        unsigned int optical_out; /* 0:SPDIF, 1:ADAT */
    18501858        struct work_struct work;
     1859        struct mutex lock;
    18511860};
    18521861
     
    19972006int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data);
    19982007int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
     2008static inline void snd_emu1010_fpga_lock(struct snd_emu10k1 *emu) { mutex_lock(&emu->emu1010.lock); };
     2009static inline void snd_emu1010_fpga_unlock(struct snd_emu10k1 *emu) { mutex_unlock(&emu->emu1010.lock); };
     2010void snd_emu1010_fpga_write_lock(struct snd_emu10k1 *emu, u32 reg, u32 value);
    19992011void snd_emu1010_fpga_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
    20002012void snd_emu1010_fpga_read(struct snd_emu10k1 *emu, u32 reg, u32 *value);
     
    20032015int snd_emu1010_get_raw_rate(struct snd_emu10k1 *emu, u8 src);
    20042016void snd_emu1010_update_clock(struct snd_emu10k1 *emu);
     2017void snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu, int dock, const struct firmware *fw_entry);
    20052018unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc);
    20062019void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb);
     
    20452058struct snd_util_memblk *snd_emu10k1_synth_alloc(struct snd_emu10k1 *emu, unsigned int size);
    20462059int snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *blk);
    2047 int snd_emu10k1_synth_bzero(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, int size);
    2048 int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, const char __user *data, int size);
     2060int snd_emu10k1_synth_memset(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, int size, u8 value);
     2061int snd_emu10k1_synth_copy_from_user(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, const char __user *data, int size, u32 xor);
    20492062int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk);
    20502063
  • GPL/trunk/alsa-kernel/include/sound/emux_synth.h

    r772 r777  
    104104        struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS];
    105105        int used;       /* use counter */
    106         char *name;     /* name of the device (internal) */
     106        const char *name;       /* name of the device (internal) */
    107107        struct snd_rawmidi **vmidi;
    108108        struct timer_list tlist;        /* for pending note-offs */
  • GPL/trunk/alsa-kernel/include/sound/es1688.h

    r772 r777  
    1818
    1919struct snd_es1688 {
     20        struct snd_card *card;
    2021        unsigned long port;             /* port of ESS chip */
    2122        struct resource *res_port;
  • GPL/trunk/alsa-kernel/include/sound/hda_codec.h

    r772 r777  
    110110        void (*set_power_state)(struct hda_codec *codec, hda_nid_t fg,
    111111                                unsigned int power_state);
    112 #ifdef CONFIG_PM
    113112        int (*suspend)(struct hda_codec *codec);
    114113        int (*resume)(struct hda_codec *codec);
    115114        int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid);
    116 #endif
    117115        void (*stream_pm)(struct hda_codec *codec, hda_nid_t nid, bool on);
    118116};
     
    142140        u32 rates;      /* supported rates */
    143141        u64 formats;    /* supported formats (SNDRV_PCM_FMTBIT_) */
     142        u32 subformats; /* for S32_LE format, SNDRV_PCM_SUBFMTBIT_* */
    144143        unsigned int maxbps;    /* supported max. bit per sample */
    145144        const struct snd_pcm_chmap_elem *chmap; /* chmap to override */
     
    259258        unsigned int ctl_dev_id:1; /* old control element id build behaviour */
    260259
    261 #ifdef CONFIG_PM
    262260        unsigned long power_on_acct;
    263261        unsigned long power_off_acct;
    264262        unsigned long power_jiffies;
    265 #endif
    266263
    267264        /* filter the requested power state per nid */
     
    454451        __snd_hda_codec_cleanup_stream(codec, nid, 0)
    455452
    456 #define snd_hda_query_supported_pcm(codec, nid, ratesp, fmtsp, bpsp) \
    457         snd_hdac_query_supported_pcm(&(codec)->core, nid, ratesp, fmtsp, bpsp)
     453#define snd_hda_query_supported_pcm(codec, nid, ratesp, fmtsp, subfmtp, bpsp) \
     454        snd_hdac_query_supported_pcm(&(codec)->core, nid, ratesp, fmtsp, subfmtp, bpsp)
    458455#define snd_hda_is_supported_format(codec, nid, fmt) \
    459456        snd_hdac_is_supported_format(&(codec)->core, nid, fmt)
     
    486483int hda_call_check_power_status(struct hda_codec *codec, hda_nid_t nid)
    487484{
    488 #ifdef CONFIG_PM
    489485        if (codec->patch_ops.check_power_status)
    490486                return codec->patch_ops.check_power_status(codec, nid);
    491 #endif
    492487        return 0;
    493488}
     
    500495#define snd_hda_power_down(codec)       snd_hdac_power_down(&(codec)->core)
    501496#define snd_hda_power_down_pm(codec)    snd_hdac_power_down_pm(&(codec)->core)
    502 #ifdef CONFIG_PM
    503497void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay);
    504498void snd_hda_set_power_save(struct hda_bus *bus, int delay);
    505499void snd_hda_update_power_acct(struct hda_codec *codec);
    506 #else
    507 static inline void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay) {}
    508 static inline void snd_hda_set_power_save(struct hda_bus *bus, int delay) {}
    509 #endif
    510500
    511501static inline bool hda_codec_need_resume(struct hda_codec *codec)
  • GPL/trunk/alsa-kernel/include/sound/hda_register.h

    r772 r777  
    9292#define AZX_REG_SD_BDLPU                0x1c
    9393
     94#define AZX_SD_FIFOSIZE_MASK            GENMASK(15, 0)
     95
    9496/* GTS registers */
    9597#define AZX_REG_LLCH                    0x14
     
    130132#define AZX_REG_VS_SDXEFIFOS_XINTERVAL  0x20
    131133
     134#define AZX_REG_VS_LTRP_GB_MASK         GENMASK(6, 0)
     135
    132136/* PCI space */
    133137#define AZX_PCIREG_TCSEL                0x44
  • GPL/trunk/alsa-kernel/include/sound/hdaudio.h

    r772 r777  
    1919#include <sound/memalloc.h>
    2020#include <sound/hda_verbs.h>
    21 #include <drm/i915_component.h>
     21#ifndef TARGET_OS2
     22#include <drm/intel/i915_component.h>
     23#endif
    2224
    2325/* codec node id */
     
    141143int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid,
    142144                           hda_nid_t *start_id);
    143 unsigned int snd_hdac_calc_stream_format(unsigned int rate,
    144                                          unsigned int channels,
    145                                          snd_pcm_format_t format,
    146                                          unsigned int maxbps,
    147                                          unsigned short spdif_ctls);
     145unsigned int snd_hdac_stream_format_bits(snd_pcm_format_t format, snd_pcm_subformat_t subformat,
     146                                         unsigned int maxbits);
     147unsigned int snd_hdac_stream_format(unsigned int channels, unsigned int bits, unsigned int rate);
     148unsigned int snd_hdac_spdif_stream_format(unsigned int channels, unsigned int bits,
     149                                          unsigned int rate, unsigned short spdif_ctls);
    148150int snd_hdac_query_supported_pcm(struct hdac_device *codec, hda_nid_t nid,
    149                                 u32 *ratesp, u64 *formatsp, unsigned int *bpsp);
     151                                 u32 *ratesp, u64 *formatsp, u32 *subformatsp,
     152                                 unsigned int *bpsp);
    150153bool snd_hdac_is_supported_format(struct hdac_device *codec, hda_nid_t nid,
    151154                                  unsigned int format);
     
    362365        bool not_use_interrupts:1;      /* prohibiting the RIRB IRQ */
    363366        bool access_sdnctl_in_dword:1;  /* accessing the sdnctl register by dword */
     367        bool use_pio_for_commands:1;    /* Use PIO instead of CORB for commands */
    364368
    365369        int poll_count;
     
    588592                                        int dir, int stream_tag);
    589593
    590 int snd_hdac_stream_setup(struct hdac_stream *azx_dev);
     594int snd_hdac_stream_setup(struct hdac_stream *azx_dev, bool code_loading);
    591595void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev);
    592596int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev);
     
    603607                          unsigned int streams);
    604608void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev,
    605                                       unsigned int streams);
     609                                      unsigned int streams, bool start);
    606610int snd_hdac_get_stream_stripe_ctl(struct hdac_bus *bus,
    607611                                struct snd_pcm_substream *substream);
     
    638642#define snd_hdac_stream_readb_poll(dev, reg, val, cond, delay_us, timeout_us) \
    639643        read_poll_timeout_atomic(snd_hdac_reg_readb, val, cond, delay_us, timeout_us, \
     644                                 false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg)
     645#define snd_hdac_stream_readw_poll(dev, reg, val, cond, delay_us, timeout_us) \
     646        read_poll_timeout_atomic(snd_hdac_reg_readw, val, cond, delay_us, timeout_us, \
    640647                                 false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg)
    641648#define snd_hdac_stream_readl_poll(dev, reg, val, cond, delay_us, timeout_us) \
     
    743750                        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_DG2_1) }, \
    744751                        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_DG2_2) }, \
     752                        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_BMG) }, \
    745753                        { } \
    746754                }, pci) || HDA_CONTROLLER_IS_HSW(pci))
  • GPL/trunk/alsa-kernel/include/sound/hdaudio_ext.h

    r772 r777  
    33#define __SOUND_HDAUDIO_EXT_H
    44
    5 #include <linux/io-64-nonatomic-lo-hi.h>
    6 #include <linux/iopoll.h>
    75#include <sound/hdaudio.h>
    86
     
    5755        u32 pphcldpu;
    5856
     57        u32 pplcllpl;
     58        u32 pplcllpu;
     59
    5960        bool decoupled:1;
    6061        bool link_locked:1;
    6162        bool link_prepared;
     63
     64        int (*host_setup)(struct hdac_stream *, bool);
    6265
    6366        struct snd_pcm_substream *link_substream;
     
    8790void snd_hdac_ext_stream_reset(struct hdac_ext_stream *hext_stream);
    8891int snd_hdac_ext_stream_setup(struct hdac_ext_stream *hext_stream, int fmt);
     92int snd_hdac_ext_host_stream_setup(struct hdac_ext_stream *hext_stream, bool code_loading);
    8993
    9094struct hdac_ext_link {
     
    114118void snd_hdac_ext_bus_link_power(struct hdac_device *codec, bool enable);
    115119
    116 #define snd_hdac_adsp_writeb(chip, reg, value) \
    117         snd_hdac_reg_writeb(chip, (chip)->dsp_ba + (reg), value)
    118 #define snd_hdac_adsp_readb(chip, reg) \
    119         snd_hdac_reg_readb(chip, (chip)->dsp_ba + (reg))
    120 #define snd_hdac_adsp_writew(chip, reg, value) \
    121         snd_hdac_reg_writew(chip, (chip)->dsp_ba + (reg), value)
    122 #define snd_hdac_adsp_readw(chip, reg) \
    123         snd_hdac_reg_readw(chip, (chip)->dsp_ba + (reg))
    124 #define snd_hdac_adsp_writel(chip, reg, value) \
    125         snd_hdac_reg_writel(chip, (chip)->dsp_ba + (reg), value)
    126 #define snd_hdac_adsp_readl(chip, reg) \
    127         snd_hdac_reg_readl(chip, (chip)->dsp_ba + (reg))
    128 #define snd_hdac_adsp_writeq(chip, reg, value) \
    129         snd_hdac_reg_writeq(chip, (chip)->dsp_ba + (reg), value)
    130 #define snd_hdac_adsp_readq(chip, reg) \
    131         snd_hdac_reg_readq(chip, (chip)->dsp_ba + (reg))
    132 
    133 #define snd_hdac_adsp_updateb(chip, reg, mask, val) \
    134         snd_hdac_adsp_writeb(chip, reg, \
    135                         (snd_hdac_adsp_readb(chip, reg) & ~(mask)) | (val))
    136 #define snd_hdac_adsp_updatew(chip, reg, mask, val) \
    137         snd_hdac_adsp_writew(chip, reg, \
    138                         (snd_hdac_adsp_readw(chip, reg) & ~(mask)) | (val))
    139 #define snd_hdac_adsp_updatel(chip, reg, mask, val) \
    140         snd_hdac_adsp_writel(chip, reg, \
    141                         (snd_hdac_adsp_readl(chip, reg) & ~(mask)) | (val))
    142 #define snd_hdac_adsp_updateq(chip, reg, mask, val) \
    143         snd_hdac_adsp_writeq(chip, reg, \
    144                         (snd_hdac_adsp_readq(chip, reg) & ~(mask)) | (val))
    145 
    146 #define snd_hdac_adsp_readb_poll(chip, reg, val, cond, delay_us, timeout_us) \
    147         readb_poll_timeout((chip)->dsp_ba + (reg), val, cond, \
    148                            delay_us, timeout_us)
    149 #define snd_hdac_adsp_readw_poll(chip, reg, val, cond, delay_us, timeout_us) \
    150         readw_poll_timeout((chip)->dsp_ba + (reg), val, cond, \
    151                            delay_us, timeout_us)
    152 #define snd_hdac_adsp_readl_poll(chip, reg, val, cond, delay_us, timeout_us) \
    153         readl_poll_timeout((chip)->dsp_ba + (reg), val, cond, \
    154                            delay_us, timeout_us)
    155 #define snd_hdac_adsp_readq_poll(chip, reg, val, cond, delay_us, timeout_us) \
    156         readq_poll_timeout((chip)->dsp_ba + (reg), val, cond, \
    157                            delay_us, timeout_us)
    158 
    159120struct hdac_ext_device;
    160121
  • GPL/trunk/alsa-kernel/include/sound/hdmi-codec.h

    r772 r777  
    1313#include <linux/of_graph.h>
    1414#include <linux/hdmi.h>
    15 #include <drm/drm_edid.h>
    1615#include <sound/asoundef.h>
    1716#include <sound/soc.h>
  • GPL/trunk/alsa-kernel/include/sound/intel-nhlt.h

    r772 r777  
    144144                             u8 num_ch, u32 rate, u8 dir, u8 dev_type);
    145145
     146int intel_nhlt_ssp_device_type(struct device *dev, struct nhlt_acpi_table *nhlt,
     147                               u8 virtual_bus_id);
     148
    146149#else
    147150
     
    185188}
    186189
     190static inline int intel_nhlt_ssp_device_type(struct device *dev,
     191                                             struct nhlt_acpi_table *nhlt,
     192                                             u8 virtual_bus_id)
     193{
     194        return -EINVAL;
     195}
     196
    187197#endif
    188198
  • GPL/trunk/alsa-kernel/include/sound/max9768.h

    r772 r777  
    1010/**
    1111 * struct max9768_pdata - optional platform specific MAX9768 configuration
    12  * @shdn_gpio:  GPIO to SHDN pin. If not valid, pin must be hardwired HIGH
    13  * @mute_gpio:  GPIO to MUTE pin. If not valid, control for mute won't be added
    1412 * @flags: configuration flags, e.g. set classic PWM mode (check datasheet
    1513 *         regarding "filterless modulation" which is default).
    1614 */
    1715struct max9768_pdata {
    18         int shdn_gpio;
    19         int mute_gpio;
    2016        unsigned flags;
    2117#define MAX9768_FLAG_CLASSIC_PWM        (1 << 0)
  • GPL/trunk/alsa-kernel/include/sound/memalloc.h

    r772 r777  
    4343#define SNDRV_DMA_TYPE_NONCOHERENT      9       /* non-coherent buffer */
    4444#ifdef CONFIG_SND_DMA_SGBUF
    45 #define SNDRV_DMA_TYPE_DEV_SG           SNDRV_DMA_TYPE_NONCONTIG
     45#define SNDRV_DMA_TYPE_DEV_SG           3       /* S/G pages */
    4646#define SNDRV_DMA_TYPE_DEV_WC_SG        6       /* SG write-combined */
    4747#else
    4848#define SNDRV_DMA_TYPE_DEV_SG   SNDRV_DMA_TYPE_DEV /* no SG-buf support */
    4949#define SNDRV_DMA_TYPE_DEV_WC_SG        SNDRV_DMA_TYPE_DEV_WC
    50 #endif
    51 /* fallback types, don't use those directly */
    52 #ifdef CONFIG_SND_DMA_SGBUF
    53 #define SNDRV_DMA_TYPE_DEV_SG_FALLBACK          10
    54 #define SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK       11
    5550#endif
    5651
  • GPL/trunk/alsa-kernel/include/sound/opl3.h

    r679 r777  
    234234        unsigned char wave_select;
    235235#ifndef TARGET_OS2
    236 } __attribute__((packed));
     236} __packed;
    237237#else
    238238};
  • GPL/trunk/alsa-kernel/include/sound/pcm.h

    r772 r777  
    3333        unsigned int info;              /* SNDRV_PCM_INFO_* */
    3434        u64 formats;                    /* SNDRV_PCM_FMTBIT_* */
     35        u32 subformats;                 /* for S32_LE, SNDRV_PCM_SUBFMTBIT_* */
    3536        unsigned int rates;             /* SNDRV_PCM_RATE_* */
    3637        unsigned int rate_min;          /* min rate */
     
    9798/* 3 is absent slot. */
    9899#define SNDRV_PCM_IOCTL1_FIFO_SIZE      4
     100#define SNDRV_PCM_IOCTL1_SYNC_ID        5
    99101
    100102#define SNDRV_PCM_TRIGGER_STOP          0
     
    124126#define SNDRV_PCM_RATE_352800           (1U<<13)        /* 352800Hz */
    125127#define SNDRV_PCM_RATE_384000           (1U<<14)        /* 384000Hz */
     128#define SNDRV_PCM_RATE_705600           (1U<<15)        /* 705600Hz */
     129#define SNDRV_PCM_RATE_768000           (1U<<16)        /* 768000Hz */
     130/* extended rates since 6.12 */
     131#define SNDRV_PCM_RATE_12000            (1U<<17)        /* 12000Hz */
     132#define SNDRV_PCM_RATE_24000            (1U<<18)        /* 24000Hz */
     133#define SNDRV_PCM_RATE_128000           (1U<<19)        /* 128000Hz */
    126134
    127135#define SNDRV_PCM_RATE_CONTINUOUS       (1U<<30)        /* continuous range */
    128 #define SNDRV_PCM_RATE_KNOT             (1U<<31)        /* supports more non-continuos rates */
     136#define SNDRV_PCM_RATE_KNOT             (1U<<31)        /* supports more non-continuous rates */
    129137
    130138#define SNDRV_PCM_RATE_8000_44100       (SNDRV_PCM_RATE_8000|SNDRV_PCM_RATE_11025|\
     
    139147                                         SNDRV_PCM_RATE_352800|\
    140148                                         SNDRV_PCM_RATE_384000)
     149#define SNDRV_PCM_RATE_8000_768000      (SNDRV_PCM_RATE_8000_384000|\
     150                                         SNDRV_PCM_RATE_705600|\
     151                                         SNDRV_PCM_RATE_768000)
    141152#define _SNDRV_PCM_FMTBIT(fmt)          (1ULL << (__force int)SNDRV_PCM_FORMAT_##fmt)
    142153#define SNDRV_PCM_FMTBIT_S8             _SNDRV_PCM_FMTBIT(S8)
     
    222233#endif
    223234
     235#define _SNDRV_PCM_SUBFMTBIT(fmt)       BIT((__force int)SNDRV_PCM_SUBFORMAT_##fmt)
     236#define SNDRV_PCM_SUBFMTBIT_STD         _SNDRV_PCM_SUBFMTBIT(STD)
     237#define SNDRV_PCM_SUBFMTBIT_MSBITS_MAX  _SNDRV_PCM_SUBFMTBIT(MSBITS_MAX)
     238#define SNDRV_PCM_SUBFMTBIT_MSBITS_20   _SNDRV_PCM_SUBFMTBIT(MSBITS_20)
     239#define SNDRV_PCM_SUBFMTBIT_MSBITS_24   _SNDRV_PCM_SUBFMTBIT(MSBITS_24)
     240
    224241struct snd_pcm_file {
    225242        struct snd_pcm_substream *substream;
     
    394411        snd_pcm_uframes_t silence_filled; /* already filled part of silence area */
    395412
    396         union snd_pcm_sync_id sync;     /* hardware synchronization ID */
     413        bool std_sync_id;               /* hardware synchronization - standard per card ID */
    397414
    398415        /* -- mmap -- */
     
    490507        unsigned int hw_opened: 1;
    491508        unsigned int managed_buffer_alloc:1;
     509#ifdef CONFIG_SND_PCM_XRUN_DEBUG
     510        unsigned int xrun_counter; /* number of times xrun happens */
     511#endif /* CONFIG_SND_PCM_XRUN_DEBUG */
    492512};
    493513
     
    663683                flags = _snd_pcm_stream_lock_irqsave_nested(substream); \
    664684        } while (0)
     685
     686#ifndef TARGET_OS2
     687/* definitions for guard(); use like guard(pcm_stream_lock) */
     688DEFINE_LOCK_GUARD_1(pcm_stream_lock, struct snd_pcm_substream,
     689                    snd_pcm_stream_lock(_T->lock),
     690                    snd_pcm_stream_unlock(_T->lock))
     691DEFINE_LOCK_GUARD_1(pcm_stream_lock_irq, struct snd_pcm_substream,
     692                    snd_pcm_stream_lock_irq(_T->lock),
     693                    snd_pcm_stream_unlock_irq(_T->lock))
     694DEFINE_LOCK_GUARD_1(pcm_stream_lock_irqsave, struct snd_pcm_substream,
     695                    snd_pcm_stream_lock_irqsave(_T->lock, _T->flags),
     696                    snd_pcm_stream_unlock_irqrestore(_T->lock, _T->flags),
     697                    unsigned long flags)
     698#endif
    665699
    666700/**
     
    11561190void snd_pcm_set_ops(struct snd_pcm * pcm, int direction,
    11571191                     const struct snd_pcm_ops *ops);
    1158 void snd_pcm_set_sync(struct snd_pcm_substream *substream);
     1192void snd_pcm_set_sync_per_card(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params,
     1193                               const unsigned char *id, unsigned int len);
     1194/**
     1195 * snd_pcm_set_sync - set the PCM sync id
     1196 * @substream: the pcm substream
     1197 *
     1198 * Use the default PCM sync identifier for the specific card.
     1199 */
     1200static inline void snd_pcm_set_sync(struct snd_pcm_substream *substream)
     1201{
     1202        substream->runtime->std_sync_id = true;
     1203}
    11591204int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
    11601205                      unsigned int cmd, void *arg);                     
     
    13421387{
    13431388        return snd_pcm_set_managed_buffer_all(pcm, type, data, size, 0);
    1344 }
    1345 
    1346 int _snd_pcm_lib_alloc_vmalloc_buffer(struct snd_pcm_substream *substream,
    1347                                       size_t size, gfp_t gfp_flags);
    1348 int snd_pcm_lib_free_vmalloc_buffer(struct snd_pcm_substream *substream);
    1349 struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream,
    1350                                           unsigned long offset);
    1351 /**
    1352  * snd_pcm_lib_alloc_vmalloc_buffer - allocate virtual DMA buffer
    1353  * @substream: the substream to allocate the buffer to
    1354  * @size: the requested buffer size, in bytes
    1355  *
    1356  * Allocates the PCM substream buffer using vmalloc(), i.e., the memory is
    1357  * contiguous in kernel virtual space, but not in physical memory.  Use this
    1358  * if the buffer is accessed by kernel code but not by device DMA.
    1359  *
    1360  * Return: 1 if the buffer was changed, 0 if not changed, or a negative error
    1361  * code.
    1362  */
    1363 static inline int snd_pcm_lib_alloc_vmalloc_buffer
    1364                         (struct snd_pcm_substream *substream, size_t size)
    1365 {
    1366         return _snd_pcm_lib_alloc_vmalloc_buffer(substream, size,
    1367                                                  GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
    1368 }
    1369 
    1370 /**
    1371  * snd_pcm_lib_alloc_vmalloc_32_buffer - allocate 32-bit-addressable buffer
    1372  * @substream: the substream to allocate the buffer to
    1373  * @size: the requested buffer size, in bytes
    1374  *
    1375  * This function works like snd_pcm_lib_alloc_vmalloc_buffer(), but uses
    1376  * vmalloc_32(), i.e., the pages are allocated from 32-bit-addressable memory.
    1377  *
    1378  * Return: 1 if the buffer was changed, 0 if not changed, or a negative error
    1379  * code.
    1380  */
    1381 static inline int snd_pcm_lib_alloc_vmalloc_32_buffer
    1382                         (struct snd_pcm_substream *substream, size_t size)
    1383 {
    1384         return _snd_pcm_lib_alloc_vmalloc_buffer(substream, size,
    1385                                                  GFP_KERNEL | GFP_DMA32 | __GFP_ZERO);
    13861389}
    13871390
  • GPL/trunk/alsa-kernel/include/sound/pcm_params.h

    r772 r777  
    363363}
    364364
     365int snd_pcm_hw_params_bits(const struct snd_pcm_hw_params *p);
     366
    365367static inline void
    366368params_set_format(struct snd_pcm_hw_params *p, snd_pcm_format_t fmt)
  • GPL/trunk/alsa-kernel/include/sound/sb.h

    r772 r777  
    291291void snd_sbmixer_suspend(struct snd_sb *chip);
    292292void snd_sbmixer_resume(struct snd_sb *chip);
     293#else
     294static inline void snd_sbmixer_suspend(struct snd_sb *chip) {}
     295static inline void snd_sbmixer_resume(struct snd_sb *chip) {}
    293296#endif
    294297
  • GPL/trunk/alsa-kernel/include/sound/seq_kernel.h

    r772 r777  
    8989int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo);
    9090
    91 /* port callback routines */
    92 void snd_port_init_callback(struct snd_seq_port_callback *p);
    93 struct snd_seq_port_callback *snd_port_alloc_callback(void);
    94 
    9591/* port attach/detach */
    9692int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp,
  • GPL/trunk/alsa-kernel/include/sound/simple_card.h

    r772 r777  
    1313#include <sound/simple_card_utils.h>
    1414
    15 struct asoc_simple_card_info {
     15struct simple_util_info {
    1616        const char *name;
    1717        const char *card;
     
    2020
    2121        unsigned int daifmt;
    22         struct asoc_simple_dai cpu_dai;
    23         struct asoc_simple_dai codec_dai;
     22        struct simple_util_dai cpu_dai;
     23        struct simple_util_dai codec_dai;
    2424};
    2525
  • GPL/trunk/alsa-kernel/include/sound/simple_card_utils.h

    r772 r777  
    1212#include <sound/soc.h>
    1313
    14 #define asoc_simple_init_hp(card, sjack, prefix) \
    15         asoc_simple_init_jack(card, sjack, 1, prefix, NULL)
    16 #define asoc_simple_init_mic(card, sjack, prefix) \
    17         asoc_simple_init_jack(card, sjack, 0, prefix, NULL)
    18 
    19 struct asoc_simple_tdm_width_map {
     14#define simple_util_init_hp(card, sjack, prefix)                \
     15        simple_util_init_jack(card, sjack, 1, prefix, NULL)
     16#define simple_util_init_mic(card, sjack, prefix)               \
     17        simple_util_init_jack(card, sjack, 0, prefix, NULL)
     18
     19struct simple_util_tdm_width_map {
    2020        u8 sample_bits;
    2121        u8 slot_count;
     
    2323};
    2424
    25 struct asoc_simple_dai {
     25struct simple_util_dai {
    2626        const char *name;
    2727        unsigned int sysclk;
     
    3333        struct clk *clk;
    3434        bool clk_fixed;
    35         struct asoc_simple_tdm_width_map *tdm_width_map;
     35        struct simple_util_tdm_width_map *tdm_width_map;
    3636        int n_tdm_widths;
    3737};
    3838
    39 struct asoc_simple_data {
     39struct simple_util_data {
    4040        u32 convert_rate;
    4141        u32 convert_channels;
     
    4343};
    4444
    45 struct asoc_simple_jack {
     45struct simple_util_jack {
    4646        struct snd_soc_jack jack;
    4747        struct snd_soc_jack_pin pin;
     
    5555};
    5656
    57 struct asoc_simple_priv {
     57struct simple_util_priv {
    5858        struct snd_soc_card snd_card;
    5959        struct simple_dai_props {
    60                 struct asoc_simple_dai *cpu_dai;
    61                 struct asoc_simple_dai *codec_dai;
    62                 struct asoc_simple_data adata;
     60                struct simple_util_dai *cpu_dai;
     61                struct simple_util_dai *codec_dai;
     62                struct simple_util_data adata;
    6363                struct snd_soc_codec_conf *codec_conf;
    6464                struct prop_nums num;
    6565                unsigned int mclk_fs;
    6666        } *dai_props;
    67         struct asoc_simple_jack hp_jack;
    68         struct asoc_simple_jack mic_jack;
     67        struct simple_util_jack hp_jack;
     68        struct simple_util_jack mic_jack;
    6969        struct snd_soc_jack *aux_jacks;
    7070        struct snd_soc_dai_link *dai_link;
    71         struct asoc_simple_dai *dais;
     71        struct simple_util_dai *dais;
    7272        struct snd_soc_dai_link_component *dlcs;
    7373        struct snd_soc_codec_conf *codec_conf;
     
    131131};
    132132
    133 int asoc_simple_parse_daifmt(struct device *dev,
     133int simple_util_parse_daifmt(struct device *dev,
    134134                             struct device_node *node,
    135135                             struct device_node *codec,
    136136                             char *prefix,
    137137                             unsigned int *retfmt);
    138 int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np,
    139                                     struct asoc_simple_dai *dai);
     138int simple_util_parse_tdm_width_map(struct device *dev, struct device_node *np,
     139                                    struct simple_util_dai *dai);
    140140
    141141__printf(3, 4)
    142 int asoc_simple_set_dailink_name(struct device *dev,
     142int simple_util_set_dailink_name(struct device *dev,
    143143                                 struct snd_soc_dai_link *dai_link,
    144144                                 const char *fmt, ...);
    145 int asoc_simple_parse_card_name(struct snd_soc_card *card,
     145int simple_util_parse_card_name(struct snd_soc_card *card,
    146146                                char *prefix);
    147147
    148 int asoc_simple_parse_clk(struct device *dev,
     148int simple_util_parse_clk(struct device *dev,
    149149                          struct device_node *node,
    150                           struct asoc_simple_dai *simple_dai,
     150                          struct simple_util_dai *simple_dai,
    151151                          struct snd_soc_dai_link_component *dlc);
    152 int asoc_simple_startup(struct snd_pcm_substream *substream);
    153 void asoc_simple_shutdown(struct snd_pcm_substream *substream);
    154 int asoc_simple_hw_params(struct snd_pcm_substream *substream,
     152int simple_util_startup(struct snd_pcm_substream *substream);
     153void simple_util_shutdown(struct snd_pcm_substream *substream);
     154int simple_util_hw_params(struct snd_pcm_substream *substream,
    155155                          struct snd_pcm_hw_params *params);
    156 int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd);
    157 int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
     156int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd);
     157int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
    158158                                   struct snd_pcm_hw_params *params);
    159159
    160 #define asoc_simple_parse_tdm(np, dai)                  \
     160#define simple_util_parse_tdm(np, dai)                          \
    161161        snd_soc_of_parse_tdm_slot(np,   &(dai)->tx_slot_mask,   \
    162162                                        &(dai)->rx_slot_mask,   \
     
    164164                                        &(dai)->slot_width);
    165165
    166 void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platforms,
     166void simple_util_canonicalize_platform(struct snd_soc_dai_link_component *platforms,
    167167                                       struct snd_soc_dai_link_component *cpus);
    168 void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link_component *cpus,
     168void simple_util_canonicalize_cpu(struct snd_soc_dai_link_component *cpus,
    169169                                  int is_single_links);
    170170
    171 void asoc_simple_clean_reference(struct snd_soc_card *card);
    172 
    173 void asoc_simple_parse_convert(struct device_node *np, char *prefix,
    174                                struct asoc_simple_data *data);
    175 bool asoc_simple_is_convert_required(const struct asoc_simple_data *data);
    176 
    177 int asoc_simple_parse_routing(struct snd_soc_card *card,
     171void simple_util_clean_reference(struct snd_soc_card *card);
     172
     173void simple_util_parse_convert(struct device_node *np, char *prefix,
     174                               struct simple_util_data *data);
     175bool simple_util_is_convert_required(const struct simple_util_data *data);
     176
     177int simple_util_get_sample_fmt(struct simple_util_data *data);
     178
     179int simple_util_parse_routing(struct snd_soc_card *card,
    178180                                      char *prefix);
    179 int asoc_simple_parse_widgets(struct snd_soc_card *card,
     181int simple_util_parse_widgets(struct snd_soc_card *card,
    180182                                      char *prefix);
    181 int asoc_simple_parse_pin_switches(struct snd_soc_card *card,
     183int simple_util_parse_pin_switches(struct snd_soc_card *card,
    182184                                   char *prefix);
    183185
    184 int asoc_simple_init_jack(struct snd_soc_card *card,
    185                                struct asoc_simple_jack *sjack,
     186int simple_util_init_jack(struct snd_soc_card *card,
     187                               struct simple_util_jack *sjack,
    186188                               int is_hp, char *prefix, char *pin);
    187 int asoc_simple_init_aux_jacks(struct asoc_simple_priv *priv,
     189int simple_util_init_aux_jacks(struct simple_util_priv *priv,
    188190                                char *prefix);
    189 int asoc_simple_init_priv(struct asoc_simple_priv *priv,
     191int simple_util_init_priv(struct simple_util_priv *priv,
    190192                               struct link_info *li);
    191 int asoc_simple_remove(struct platform_device *pdev);
    192 
    193 int asoc_graph_card_probe(struct snd_soc_card *card);
    194 int asoc_graph_is_ports0(struct device_node *port);
    195 int asoc_graph_parse_dai(struct device *dev, struct device_node *ep,
     193void simple_util_remove(struct platform_device *pdev);
     194
     195int graph_util_card_probe(struct snd_soc_card *card);
     196int graph_util_is_ports0(struct device_node *port);
     197int graph_util_parse_dai(struct device *dev, struct device_node *ep,
    196198                         struct snd_soc_dai_link_component *dlc, int *is_single_link);
    197199
     200void graph_util_parse_link_direction(struct device_node *np,
     201                                    bool *is_playback_only, bool *is_capture_only);
     202void graph_util_parse_trigger_order(struct simple_util_priv *priv,
     203                                    struct device_node *np,
     204                                    enum snd_soc_trigger_order *trigger_start,
     205                                    enum snd_soc_trigger_order *trigger_stop);
     206
    198207#ifdef DEBUG
    199 static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv,
     208static inline void simple_util_debug_dai(struct simple_util_priv *priv,
    200209                                         char *name,
    201                                          struct asoc_simple_dai *dai)
     210                                         struct simple_util_dai *dai)
    202211{
    203212        struct device *dev = simple_priv_to_dev(priv);
     
    229238}
    230239
    231 static inline void asoc_simple_debug_info(struct asoc_simple_priv *priv)
     240static inline void simple_util_debug_info(struct simple_util_priv *priv)
    232241{
    233242        struct snd_soc_card *card = simple_priv_to_card(priv);
     
    242251                struct simple_dai_props *props = simple_priv_to_props(priv, i);
    243252                struct snd_soc_dai_link *link = simple_priv_to_link(priv, i);
    244                 struct asoc_simple_dai *dai;
     253                struct simple_util_dai *dai;
    245254                struct snd_soc_codec_conf *cnf;
    246255                int j;
     
    250259                dev_dbg(dev, "cpu num = %d\n", link->num_cpus);
    251260                for_each_prop_dai_cpu(props, j, dai)
    252                         asoc_simple_debug_dai(priv, "cpu", dai);
     261                        simple_util_debug_dai(priv, "cpu", dai);
    253262                dev_dbg(dev, "codec num = %d\n", link->num_codecs);
    254263                for_each_prop_dai_codec(props, j, dai)
    255                         asoc_simple_debug_dai(priv, "codec", dai);
     264                        simple_util_debug_dai(priv, "codec", dai);
    256265
    257266                if (link->name)
     
    271280}
    272281#else
    273 #define  asoc_simple_debug_info(priv)
     282#define  simple_util_debug_info(priv)
    274283#endif /* DEBUG */
    275284
  • GPL/trunk/alsa-kernel/include/sound/snd_wavefront.h

    r772 r777  
    138138extern int snd_wavefront_fx_release (struct snd_hwdep *, struct file *);
    139139
    140 /* prefix in all snd_printk() delivered messages */
    141 
    142 #define LOGNAME "WaveFront: "
    143 
    144140#endif  /* __SOUND_SND_WAVEFRONT_H__ */
  • GPL/trunk/alsa-kernel/include/sound/soc-acpi-intel-match.h

    r772 r777  
    11/* SPDX-License-Identifier: GPL-2.0
    22 *
    3  * Copyright (C) 2017, Intel Corporation. All rights reserved.
     3 * Copyright (C) 2017, Intel Corporation
    44 */
    55
     
    3434extern struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_machines[];
    3535extern struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_machines[];
     36extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_machines[];
    3637
    3738extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[];
     
    4546extern struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[];
    4647extern struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_sdw_machines[];
     48extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[];
    4749
    4850/*
  • GPL/trunk/alsa-kernel/include/sound/soc-acpi.h

    r772 r777  
    11/* SPDX-License-Identifier: GPL-2.0-only
    22 *
    3  * Copyright (C) 2013-15, Intel Corporation. All rights reserved.
     3 * Copyright (C) 2013-15, Intel Corporation
    44 */
    55
     
    6363 * @codec_mask: used for HDAudio support
    6464 * @dmic_num: number of SoC- or chipset-attached PDM digital microphones
    65  * @common_hdmi_codec_drv: use commom HDAudio HDMI codec driver
    6665 * @link_mask: SoundWire links enabled on the board
    6766 * @links: array of SoundWire link _ADR descriptors, null terminated
     
    7170 * @subsystem_vendor: optional PCI SSID vendor value
    7271 * @subsystem_device: optional PCI SSID device value
     72 * @subsystem_rev: optional PCI SSID revision value
    7373 * @subsystem_id_set: true if a value has been written to
    7474 *                    subsystem_vendor and subsystem_device.
     75 * @bt_link_mask: BT offload link enabled on the board
    7576 */
    7677struct snd_soc_acpi_mach_params {
     
    7980        u32 codec_mask;
    8081        u32 dmic_num;
    81         bool common_hdmi_codec_drv;
    8282        u32 link_mask;
    8383        const struct snd_soc_acpi_link_adr *links;
     
    8787        unsigned short subsystem_vendor;
    8888        unsigned short subsystem_device;
     89        unsigned short subsystem_rev;
    8990        bool subsystem_id_set;
     91        u32 bt_link_mask;
    9092};
    9193
     
    151153 */
    152154#define SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER BIT(2)
     155
     156/*
     157 * when set the speaker amplifier name suffix (i.e. "-max98360a") will be
     158 * appended to topology file name
     159 */
     160#define SND_SOC_ACPI_TPLG_INTEL_AMP_NAME BIT(3)
     161
     162/*
     163 * when set the headphone codec name suffix (i.e. "-rt5682") will be appended to
     164 * topology file name
     165 */
     166#define SND_SOC_ACPI_TPLG_INTEL_CODEC_NAME BIT(4)
    153167
    154168/**
  • GPL/trunk/alsa-kernel/include/sound/soc-component.h

    r772 r777  
    463463
    464464/* component controls */
     465struct snd_kcontrol *snd_soc_component_get_kcontrol(struct snd_soc_component *component,
     466                                                    const char * const ctl);
    465467int snd_soc_component_notify_control(struct snd_soc_component *component,
    466468                                     const char * const ctl);
  • GPL/trunk/alsa-kernel/include/sound/soc-dai.h

    r772 r777  
    181181
    182182/* Digital Audio interface formatting */
    183 int snd_soc_dai_get_fmt_max_priority(struct snd_soc_pcm_runtime *rtd);
    184 u64 snd_soc_dai_get_fmt(struct snd_soc_dai *dai, int priority);
     183int snd_soc_dai_get_fmt_max_priority(const struct snd_soc_pcm_runtime *rtd);
     184u64 snd_soc_dai_get_fmt(const struct snd_soc_dai *dai, int priority);
    185185int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt);
    186186
     
    189189
    190190int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai,
    191         unsigned int tx_num, unsigned int *tx_slot,
    192         unsigned int rx_num, unsigned int *rx_slot);
     191        unsigned int tx_num, const unsigned int *tx_slot,
     192        unsigned int rx_num, const unsigned int *rx_slot);
    193193
    194194int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
     
    199199
    200200
    201 int snd_soc_dai_get_channel_map(struct snd_soc_dai *dai,
     201int snd_soc_dai_get_channel_map(const struct snd_soc_dai *dai,
    202202                unsigned int *tx_num, unsigned int *tx_slot,
    203203                unsigned int *rx_num, unsigned int *rx_slot);
    204204
    205 int snd_soc_dai_is_dummy(struct snd_soc_dai *dai);
     205int snd_soc_dai_is_dummy(const struct snd_soc_dai *dai);
    206206
    207207int snd_soc_dai_hw_params(struct snd_soc_dai *dai,
     
    219219int snd_soc_dai_compress_new(struct snd_soc_dai *dai,
    220220                             struct snd_soc_pcm_runtime *rtd, int num);
    221 bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int stream);
    222 void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link);
     221bool snd_soc_dai_stream_valid(const struct snd_soc_dai *dai, int stream);
    223222void snd_soc_dai_action(struct snd_soc_dai *dai,
    224223                        int stream, int action);
     
    233232        snd_soc_dai_action(dai, stream, -1);
    234233}
    235 int snd_soc_dai_active(struct snd_soc_dai *dai);
     234int snd_soc_dai_active(const struct snd_soc_dai *dai);
    236235
    237236int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order);
     
    241240int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd,
    242241                            int rollback);
    243 int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream,
    244                                     int cmd);
    245242void snd_soc_pcm_dai_delay(struct snd_pcm_substream *substream,
    246243                           snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay);
     
    272269                                   struct snd_compr_metadata *metadata);
    273270
    274 const char *snd_soc_dai_name_get(struct snd_soc_dai *dai);
     271const char *snd_soc_dai_name_get(const struct snd_soc_dai *dai);
    275272
    276273struct snd_soc_dai_ops {
     
    306303                int slots, int slot_width);
    307304        int (*set_channel_map)(struct snd_soc_dai *dai,
    308                 unsigned int tx_num, unsigned int *tx_slot,
    309                 unsigned int rx_num, unsigned int *rx_slot);
    310         int (*get_channel_map)(struct snd_soc_dai *dai,
     305                unsigned int tx_num, const unsigned int *tx_slot,
     306                unsigned int rx_num, const unsigned int *rx_slot);
     307        int (*get_channel_map)(const struct snd_soc_dai *dai,
    311308                        unsigned int *tx_num, unsigned int *tx_slot,
    312309                        unsigned int *rx_num, unsigned int *rx_slot);
     
    346343        int (*trigger)(struct snd_pcm_substream *, int,
    347344                struct snd_soc_dai *);
    348         int (*bespoke_trigger)(struct snd_pcm_substream *, int,
    349                 struct snd_soc_dai *);
     345
    350346        /*
    351347         * For hardware based FIFO caused delay reporting.
     
    362358         *      snd_soc_dai_get_fmt()
    363359         */
    364         u64 *auto_selectable_formats;
     360        const u64 *auto_selectable_formats;
    365361        int num_auto_selectable_formats;
    366362
     
    414410        unsigned int base;
    415411        struct snd_soc_dobj dobj;
    416         struct of_phandle_args *dai_args;
     412        const struct of_phandle_args *dai_args;
    417413
    418414        /* ops */
     
    474470};
    475471
    476 static inline struct snd_soc_pcm_stream *
     472static inline const struct snd_soc_pcm_stream *
    477473snd_soc_dai_get_pcm_stream(const struct snd_soc_dai *dai, int stream)
    478474{
     
    519515}
    520516
    521 static inline unsigned int snd_soc_dai_tdm_mask_get(struct snd_soc_dai *dai, int stream)
     517static inline unsigned int snd_soc_dai_tdm_mask_get(const struct snd_soc_dai *dai,
     518                                                    int stream)
    522519{
    523520        return dai->stream[stream].tdm_mask;
     
    530527}
    531528
    532 static inline unsigned int snd_soc_dai_stream_active(struct snd_soc_dai *dai, int stream)
     529static inline unsigned int snd_soc_dai_stream_active(const struct snd_soc_dai *dai,
     530                                                     int stream)
    533531{
    534532        /* see snd_soc_dai_action() for setup */
  • GPL/trunk/alsa-kernel/include/sound/soc-dapm.h

    r772 r777  
    458458        struct snd_ctl_elem_value *uncontrol);
    459459int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
    460         const struct snd_soc_dapm_widget *widget, int num);
     460        const struct snd_soc_dapm_widget *widget, unsigned int num);
    461461struct snd_soc_dapm_widget *snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
    462462                const struct snd_soc_dapm_widget *widget);
     
    719719struct snd_soc_dapm_widget_list {
    720720        int num_widgets;
    721         struct snd_soc_dapm_widget *widgets[];
     721        struct snd_soc_dapm_widget *widgets[] __counted_by(num_widgets);
    722722};
    723723
  • GPL/trunk/alsa-kernel/include/sound/soc-dpcm.h

    r772 r777  
    5959        SND_SOC_DPCM_TRIGGER_PRE                = 0,
    6060        SND_SOC_DPCM_TRIGGER_POST,
    61         SND_SOC_DPCM_TRIGGER_BESPOKE,
    6261};
    6362
     
    115114        list_for_each_entry_continue_reverse(_dpcm, &(fe)->dpcm[stream].be_clients, list_be)
    116115
    117 /* can this BE stop and free */
    118 int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe,
    119                 struct snd_soc_pcm_runtime *be, int stream);
    120 
    121 /* can this BE perform a hw_params() */
    122 int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe,
    123                 struct snd_soc_pcm_runtime *be, int stream);
    124 
    125 /* can this BE perform prepare */
    126 int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe,
    127                                  struct snd_soc_pcm_runtime *be, int stream);
    128 
    129 /* is the current PCM operation for this FE ? */
    130 int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream);
    131 
    132 /* is the current PCM operation for this BE ? */
    133 int snd_soc_dpcm_be_can_update(struct snd_soc_pcm_runtime *fe,
    134                 struct snd_soc_pcm_runtime *be, int stream);
    135116
    136117/* get the substream for this BE */
  • GPL/trunk/alsa-kernel/include/sound/soc-topology.h

    r772 r777  
    179179/* Dynamic Object loading and removal for component drivers */
    180180int snd_soc_tplg_component_load(struct snd_soc_component *comp,
    181         struct snd_soc_tplg_ops *ops, const struct firmware *fw);
     181        const struct snd_soc_tplg_ops *ops, const struct firmware *fw);
    182182int snd_soc_tplg_component_remove(struct snd_soc_component *comp);
    183183
  • GPL/trunk/alsa-kernel/include/sound/soc.h

    r772 r777  
    1111#define __LINUX_SND_SOC_H
    1212
     13#include <linux/args.h>
     14#include <linux/array_size.h>
     15#include <linux/device.h>
     16#include <linux/errno.h>
     17#include <linux/interrupt.h>
     18#include <linux/lockdep.h>
     19#include <linux/log2.h>
     20#include <linux/mutex.h>
     21#include <linux/notifier.h>
    1322#include <linux/of.h>
    14 #include <linux/platform_device.h>
    1523#include <linux/types.h>
    16 #include <linux/notifier.h>
    1724#include <linux/workqueue.h>
    18 #include <linux/interrupt.h>
    19 #include <linux/kernel.h>
    20 #include <linux/regmap.h>
    21 #include <linux/log2.h>
     25
     26#include <sound/ac97_codec.h>
     27#include <sound/compress_driver.h>
     28#include <sound/control.h>
    2229#include <sound/core.h>
    2330#include <sound/pcm.h>
    24 #include <sound/compress_driver.h>
    25 #include <sound/control.h>
    26 #include <sound/ac97_codec.h>
     31
     32struct module;
     33struct platform_device;
     34
     35/* For the current users of sound/soc.h to avoid build issues */
     36#include <linux/platform_device.h>
     37#include <linux/regmap.h>
    2738
    2839/*
     
    149160                .shift = shift_left, .rshift = shift_right, \
    150161                .max = xmax, .min = xmin} }
     162#define SOC_DOUBLE_RANGE_TLV(xname, xreg, xshift_left, xshift_right, xmin, xmax, \
     163                             xinvert, tlv_array) \
     164{       .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
     165        .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
     166                  SNDRV_CTL_ELEM_ACCESS_READWRITE,\
     167        .tlv.p = (tlv_array), \
     168        .info = snd_soc_info_volsw, \
     169        .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \
     170        .private_value = (unsigned long)&(struct soc_mixer_control) \
     171                {.reg = xreg, .rreg = xreg, \
     172                 .shift = xshift_left, .rshift = xshift_right, \
     173                 .min = xmin, .max = xmax, .invert = xinvert} }
    151174#define SOC_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array) \
    152175{       .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
     
    400423        const struct soc_enum name = SOC_ENUM_SINGLE_VIRT(ARRAY_SIZE(xtexts), xtexts)
    401424
    402 struct device_node;
    403425struct snd_jack;
    404426struct snd_soc_card;
     
    415437struct snd_soc_jack_zone;
    416438struct snd_soc_jack_pin;
     439
    417440#include <sound/soc-dapm.h>
    418441#include <sound/soc-dpcm.h>
     
    512535/* Utility functions to get clock rates from various things */
    513536int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
    514 int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params);
     537int snd_soc_params_to_frame_size(const struct snd_pcm_hw_params *params);
    515538int snd_soc_calc_bclk(int fs, int sample_size, int channels, int tdm_slots);
    516 int snd_soc_params_to_bclk(struct snd_pcm_hw_params *parms);
    517 int snd_soc_tdm_params_to_bclk(struct snd_pcm_hw_params *params,
     539int snd_soc_params_to_bclk(const struct snd_pcm_hw_params *parms);
     540int snd_soc_tdm_params_to_bclk(const struct snd_pcm_hw_params *params,
    518541                               int tdm_width, int tdm_slots, int slot_multiple);
    519542
     
    620643        const char *stream_name;
    621644        u64 formats;                    /* SNDRV_PCM_FMTBIT_* */
     645        u32 subformats;                 /* for S32_LE format, SNDRV_PCM_SUBFMTBIT_* */
    622646        unsigned int rates;             /* SNDRV_PCM_RATE_* */
    623647        unsigned int rate_min;          /* min rate */
     
    652676        struct device_node *of_node;
    653677        const char *dai_name;
    654         struct of_phandle_args *dai_args;
    655 };
    656 
    657 struct snd_soc_dai_link_codec_ch_map {
    658         unsigned int connected_cpu_id;
     678        const struct of_phandle_args *dai_args;
     679};
     680
     681/*
     682 * [dai_link->ch_maps Image sample]
     683 *
     684 *-------------------------
     685 * CPU0 <---> Codec0
     686 *
     687 * ch-map[0].cpu = 0    ch-map[0].codec = 0
     688 *
     689 *-------------------------
     690 * CPU0 <---> Codec0
     691 * CPU1 <---> Codec1
     692 * CPU2 <---> Codec2
     693 *
     694 * ch-map[0].cpu = 0    ch-map[0].codec = 0
     695 * ch-map[1].cpu = 1    ch-map[1].codec = 1
     696 * ch-map[2].cpu = 2    ch-map[2].codec = 2
     697 *
     698 *-------------------------
     699 * CPU0 <---> Codec0
     700 * CPU1 <-+-> Codec1
     701 * CPU2 <-/
     702 *
     703 * ch-map[0].cpu = 0    ch-map[0].codec = 0
     704 * ch-map[1].cpu = 1    ch-map[1].codec = 1
     705 * ch-map[2].cpu = 2    ch-map[2].codec = 1
     706 *
     707 *-------------------------
     708 * CPU0 <---> Codec0
     709 * CPU1 <-+-> Codec1
     710 *        \-> Codec2
     711 *
     712 * ch-map[0].cpu = 0    ch-map[0].codec = 0
     713 * ch-map[1].cpu = 1    ch-map[1].codec = 1
     714 * ch-map[2].cpu = 1    ch-map[2].codec = 2
     715 *
     716 */
     717struct snd_soc_dai_link_ch_map {
     718        unsigned int cpu;
     719        unsigned int codec;
    659720        unsigned int ch_mask;
    660721};
     
    688749        unsigned int num_codecs;
    689750
    690         struct snd_soc_dai_link_codec_ch_map *codec_ch_maps;
     751        /* num_ch_maps = max(num_cpu, num_codecs) */
     752        struct snd_soc_dai_link_ch_map *ch_maps;
     753
    691754        /*
    692755         * You MAY specify the link's platform/PCM/DMA driver, either by
     
    753816        unsigned int dynamic:1;
    754817
     818        /* REMOVE ME */
    755819        /* DPCM capture and Playback support */
    756820        unsigned int dpcm_capture:1;
     
    775839};
    776840
    777 /* REMOVE ME */
    778 #define asoc_link_to_cpu        snd_soc_link_to_cpu
    779 #define asoc_link_to_codec      snd_soc_link_to_codec
    780 #define asoc_link_to_platform   snd_soc_link_to_platform
     841static inline int snd_soc_link_num_ch_map(const struct snd_soc_dai_link *link)
     842{
     843        return max(link->num_cpus, link->num_codecs);
     844}
    781845
    782846static inline struct snd_soc_dai_link_component*
     
    811875             ((i) < link->num_cpus) &&                                  \
    812876                     ((cpu) = snd_soc_link_to_cpu(link, i));            \
     877             (i)++)
     878
     879#define for_each_link_ch_maps(link, i, ch_map)                  \
     880        for ((i) = 0;                                           \
     881             ((i) < snd_soc_link_num_ch_map(link) &&            \
     882                      ((ch_map) = link->ch_maps + i));          \
    813883             (i)++)
    814884
     
    876946        .num_platforms  = ARRAY_SIZE(platform)
    877947
    878 #define SND_SOC_DAILINK_REGx(_1, _2, _3, func, ...) func
    879948#define SND_SOC_DAILINK_REG(...) \
    880         SND_SOC_DAILINK_REGx(__VA_ARGS__,               \
    881                         SND_SOC_DAILINK_REG3,   \
    882                         SND_SOC_DAILINK_REG2,   \
    883                         SND_SOC_DAILINK_REG1)(__VA_ARGS__)
     949        CONCATENATE(SND_SOC_DAILINK_REG, COUNT_ARGS(__VA_ARGS__))(__VA_ARGS__)
    884950
    885951#define SND_SOC_DAILINK_DEF(name, def...)               \
     
    898964#define COMP_AUX(_name)                 { .name = _name }
    899965#define COMP_CODEC_CONF(_name)          { .name = _name }
    900 #define COMP_DUMMY()                    { .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", }
    901 
    902 /* REMOVE ME */
    903 #define asoc_dummy_dlc          snd_soc_dummy_dlc
     966#define COMP_DUMMY()                    /* see snd_soc_fill_dummy_dai() */
    904967
    905968extern struct snd_soc_dai_link_component null_dailink_component[0];
     
    11451208        unsigned int pop_wait:1;
    11461209        unsigned int fe_compr:1; /* for Dynamic PCM */
    1147 
    1148         bool initialized;
    1149 
     1210        unsigned int initialized:1;
     1211
     1212        /* CPU/Codec/Platform */
    11501213        int num_components;
    1151         struct snd_soc_component *components[]; /* CPU/Codec/Platform */
    1152 };
    1153 
    1154 /* REMOVE ME */
    1155 #define asoc_rtd_to_cpu         snd_soc_rtd_to_cpu
    1156 #define asoc_rtd_to_codec       snd_soc_rtd_to_codec
    1157 #define asoc_substream_to_rtd   snd_soc_substream_to_rtd
     1214        struct snd_soc_component *components[] __counted_by(num_components);
     1215};
    11581216
    11591217/* see soc_new_pcm_runtime()  */
    11601218#define snd_soc_rtd_to_cpu(rtd, n)   (rtd)->dais[n]
    11611219#define snd_soc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->dai_link->num_cpus]
    1162 #define snd_soc_substream_to_rtd(substream) \
    1163         (struct snd_soc_pcm_runtime *)snd_pcm_substream_chip(substream)
     1220
     1221static inline struct snd_soc_pcm_runtime *
     1222snd_soc_substream_to_rtd(const struct snd_pcm_substream *substream)
     1223{
     1224        return snd_pcm_substream_chip(substream);
     1225}
    11641226
    11651227#define for_each_rtd_components(rtd, i, component)                      \
     
    11801242                     ((dai) = (rtd)->dais[i]);                          \
    11811243             (i)++)
     1244#define for_each_rtd_dais_reverse(rtd, i, dai)                                  \
     1245        for ((i) = (rtd)->dai_link->num_cpus + (rtd)->dai_link->num_codecs - 1; \
     1246             (i) >= 0 && ((dai) = (rtd)->dais[i]);                              \
     1247             (i)--)
     1248#define for_each_rtd_ch_maps(rtd, i, ch_maps) for_each_link_ch_maps(rtd->dai_link, i, ch_maps)
    11821249
    11831250void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
     
    12381305};
    12391306
    1240 static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
     1307static inline bool snd_soc_volsw_is_stereo(const struct soc_mixer_control *mc)
    12411308{
    12421309        if (mc->reg == mc->rreg && mc->shift == mc->rshift)
     
    12501317}
    12511318
    1252 static inline unsigned int snd_soc_enum_val_to_item(struct soc_enum *e,
     1319static inline unsigned int snd_soc_enum_val_to_item(const struct soc_enum *e,
    12531320        unsigned int val)
    12541321{
     
    12651332}
    12661333
    1267 static inline unsigned int snd_soc_enum_item_to_val(struct soc_enum *e,
     1334static inline unsigned int snd_soc_enum_item_to_val(const struct soc_enum *e,
    12681335        unsigned int item)
    12691336{
     
    13401407                snd_soc_daifmt_parse_clock_provider_as_bitmap(np, prefix))
    13411408
    1342 int snd_soc_get_stream_cpu(struct snd_soc_dai_link *dai_link, int stream);
     1409int snd_soc_get_stream_cpu(const struct snd_soc_dai_link *dai_link, int stream);
    13431410int snd_soc_get_dlc(const struct of_phandle_args *args,
    13441411                    struct snd_soc_dai_link_component *dlc);
     
    13701437                                     struct snd_soc_dai_link_component *cpus);
    13711438struct of_phandle_args *snd_soc_copy_dai_args(struct device *dev,
    1372                                               struct of_phandle_args *args);
    1373 struct snd_soc_dai *snd_soc_get_dai_via_args(struct of_phandle_args *dai_args);
     1439                                              const struct of_phandle_args *args);
     1440struct snd_soc_dai *snd_soc_get_dai_via_args(const struct of_phandle_args *dai_args);
    13741441struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component,
    13751442                                         struct snd_soc_dai_driver *dai_drv,
  • GPL/trunk/alsa-kernel/include/sound/sof.h

    r772 r777  
    44 * redistributing this file, you may do so under either license.
    55 *
    6  * Copyright(c) 2018 Intel Corporation. All rights reserved.
     6 * Copyright(c) 2018 Intel Corporation
    77 *
    88 * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
     
    5858};
    5959
    60 #define SOF_IPC         SOF_IPC_TYPE_3
    61 #define SOF_INTEL_IPC4  SOF_IPC_TYPE_4
     60struct sof_loadable_file_profile {
     61        enum sof_ipc_type ipc_type;
     62
     63        const char *fw_path;
     64        const char *fw_path_postfix;
     65        const char *fw_name;
     66        const char *fw_lib_path;
     67        const char *fw_lib_path_postfix;
     68        const char *tplg_path;
     69        const char *tplg_name;
     70};
    6271
    6372/*
     
    8998        /* descriptor */
    9099        const struct sof_dev_desc *desc;
     100
     101        /* platform's preferred IPC type and path overrides */
     102        struct sof_loadable_file_profile ipc_file_profile_base;
    91103
    92104        /* firmware and topology filenames */
     
    155167        const char *default_fw_filename[SOF_IPC_TYPE_COUNT];
    156168
    157         struct snd_sof_dsp_ops *ops;
     169        const struct snd_sof_dsp_ops *ops;
    158170        int (*ops_init)(struct snd_sof_dev *sdev);
    159171        void (*ops_free)(struct snd_sof_dev *sdev);
     
    162174int sof_dai_get_mclk(struct snd_soc_pcm_runtime *rtd);
    163175int sof_dai_get_bclk(struct snd_soc_pcm_runtime *rtd);
     176int sof_dai_get_tdm_slots(struct snd_soc_pcm_runtime *rtd);
    164177
    165178#endif
  • GPL/trunk/alsa-kernel/include/sound/soundfont.h

    r772 r777  
    8787
    8888/* Prototypes for soundfont.c */
    89 int snd_soundfont_load(struct snd_sf_list *sflist, const void __user *data,
    90                        long count, int client);
    91 int snd_soundfont_load_guspatch(struct snd_sf_list *sflist, const char __user *data,
     89int snd_soundfont_load(struct snd_card *card,
     90                       struct snd_sf_list *sflist, const void __user *data,
    9291                                long count, int client);
     92int snd_soundfont_load_guspatch(struct snd_card *card,
     93                                struct snd_sf_list *sflist, const char __user *data,
     94                                long count);
    9395int snd_soundfont_close_check(struct snd_sf_list *sflist, int client);
    9496
  • GPL/trunk/alsa-kernel/include/sound/version.h

    r772 r777  
    11/* include/version.h */
    2 #define CONFIG_SND_VERSION "6.6.85"
     2#define CONFIG_SND_VERSION "6.12.21"
    33#define CONFIG_SND_DATE ""
  • GPL/trunk/alsa-kernel/include/sound/vx_core.h

    r772 r777  
    156156        unsigned int pcm_running;
    157157
    158         struct device *dev;
    159158        struct snd_hwdep *hwdep;
    160159
  • GPL/trunk/alsa-kernel/include/sound/wavefront.h

    r772 r777  
    99 */
    1010
    11 #if (!defined(__GNUC__) && !defined(__GNUG__))
    12 
    13      You will not be able to compile this file correctly without gcc, because
    14      it is necessary to pack the "wavefront_alias" structure to a size
    15      of 22 bytes, corresponding to 16-bit alignment (as would have been
    16      the case on the original platform, MS-DOS). If this is not done,
    17      then WavePatch-format files cannot be read/written correctly.
    18      The method used to do this here ("__attribute__((packed)") is
    19      completely compiler dependent.
    20      
    21      All other wavefront_* types end up aligned to 32 bit values and
    22      still have the same (correct) size.
    23 
    24 #else
    25 
    26      /* However, note that as of G++ 2.7.3.2, g++ was unable to
    27         correctly parse *type* __attribute__ tags. It will do the
    28         right thing if we use the "packed" attribute on each struct
    29         member, which has the same semantics anyway.
    30      */
    31 
    32 #endif /* __GNUC__ */
    33 
    34 /***************************** WARNING ********************************
    35   PLEASE DO NOT MODIFY THIS FILE IN ANY WAY THAT AFFECTS ITS ABILITY TO
    36   BE USED WITH EITHER C *OR* C++.
    37  **********************************************************************/
    38 
    3911#ifndef NUM_MIDIKEYS
    4012#define NUM_MIDIKEYS 128
     
    4416#define NUM_MIDICHANNELS 16
    4517#endif  /* NUM_MIDICHANNELS */
    46 
    47 /* These are very useful/important. the original wavefront interface
    48    was developed on a 16 bit system, where sizeof(int) = 2
    49    bytes. Defining things like this makes the code much more portable, and
    50    easier to understand without having to toggle back and forth
    51    between a 16-bit view of the world and a 32-bit one.
    52  */   
    53 
    54 #ifndef __KERNEL__
    55 /* keep them for compatibility */
    56 typedef short s16;
    57 typedef unsigned short u16;
    58 typedef int s32;
    59 typedef unsigned int u32;
    60 typedef char s8;
    61 typedef unsigned char u8;
    62 typedef s16 INT16;
    63 typedef u16 UINT16;
    64 typedef s32 INT32;
    65 typedef u32 UINT32;
    66 typedef s8 CHAR8;
    67 typedef u8 UCHAR8;
    68 #endif
    6918
    7019/* Pseudo-commands not part of the WaveFront command set.
     
    469418
    470419    u8 sixteen_bit_padding;
    471 } __attribute__((packed)) wavefront_alias;
     420} __packed wavefront_alias;
    472421
    473422typedef struct wf_drum {
  • GPL/trunk/alsa-kernel/include/sound/wm0010.h

    r772 r777  
    1212
    1313struct wm0010_pdata {
    14         int gpio_reset;
    15 
    16         /* Set if there is an inverter between the GPIO controlling
    17          * the reset signal and the device.
    18          */
    19         int reset_active_high;
    2014        int irq_flags;
    2115};
  • GPL/trunk/alsa-kernel/include/sound/wm2200.h

    r772 r777  
    4343
    4444struct wm2200_pdata {
    45         int reset;      /** GPIO controlling /RESET, if any */
    46         int ldo_ena;    /** GPIO controlling LODENA, if any */
    4745        int irq_flags;
    4846
  • GPL/trunk/alsa-kernel/include/sound/wm5100.h

    r772 r777  
    3737
    3838struct wm5100_pdata {
    39         int reset;      /** GPIO controlling /RESET, if any */
    40         int ldo_ena;    /** GPIO controlling LODENA, if any */
    41         int hp_pol;     /** GPIO controlling headset polarity, if any */
    4239        int irq_flags;
    43         int gpio_base;
    4440
    4541        struct wm5100_jack_mode jack_modes[2];
  • GPL/trunk/alsa-kernel/include/sound/wm8996.h

    r772 r777  
    3434        int irq_flags;  /** Set IRQ trigger flags; default active low */
    3535
    36         int ldo_ena;  /** GPIO for LDO1; -1 for none */
    37 
    3836        int micdet_def;  /** Default MICDET_SRC/HP1FB_SRC/MICD_BIAS */
    3937
     
    4341        u32 spkmute_seq;  /** Value for register 0x802 */
    4442
    45         int gpio_base;
    4643        u32 gpio_default[5];
    4744
  • GPL/trunk/alsa-kernel/include/uapi/sound/asequencer.h

    r772 r777  
    1111
    1212/** version of the sequencer */
    13 #define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 3)
     13#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 4)
    1414
    1515/**
     
    209209        unsigned int len;       /* length of data */
    210210        void *ptr;              /* pointer to data (note: maybe 64-bit) */
    211 } __attribute__((packed));
     211} __packed;
    212212#else
    213213#pragma pack(1)
     
    262262        unsigned short value;           /* optional data */
    263263        struct snd_seq_event *event;            /* quoted event */
    264 } __attribute__((packed));
     264} __packed;
    265265#else
    266266#pragma pack(1)
     
    481481#define SNDRV_SEQ_PORT_FLG_TIME_REAL    (1<<2)
    482482
     483#define SNDRV_SEQ_PORT_FLG_IS_MIDI1     (1<<3)  /* Keep MIDI 1.0 protocol */
     484
    483485/* port direction */
    484486#define SNDRV_SEQ_PORT_DIR_UNKNOWN      0
     
    543545struct snd_seq_queue_tempo {
    544546        int queue;                      /* sequencer queue */
    545         unsigned int tempo;             /* current tempo, us/tick */
     547        unsigned int tempo;             /* current tempo, us/tick (or different time-base below) */
    546548        int ppq;                        /* time resolution, ticks/quarter */
    547549        unsigned int skew_value;        /* queue skew */
    548550        unsigned int skew_base;         /* queue skew base */
    549         char reserved[24];              /* for the future */
     551        unsigned short tempo_base;      /* tempo base in nsec unit; either 10 or 1000 */
     552        char reserved[22];              /* for the future */
    550553};
    551554
  • GPL/trunk/alsa-kernel/include/uapi/sound/asoc.h

    r772 r777  
    8989/* ABI version */
    9090#define SND_SOC_TPLG_ABI_VERSION        0x5     /* current version */
    91 #define SND_SOC_TPLG_ABI_VERSION_MIN    0x4     /* oldest version supported */
     91#define SND_SOC_TPLG_ABI_VERSION_MIN    0x5     /* oldest version supported */
    9292
    9393/* Max size of TLV data */
     
    577577} __attribute__((packed));
    578578
    579 /*
    580  * Old version of ABI structs, supported for backward compatibility.
    581  */
    582 
    583 /* Manifest v4 */
    584 struct snd_soc_tplg_manifest_v4 {
    585         __le32 size;            /* in bytes of this structure */
    586         __le32 control_elems;   /* number of control elements */
    587         __le32 widget_elems;    /* number of widget elements */
    588         __le32 graph_elems;     /* number of graph elements */
    589         __le32 pcm_elems;       /* number of PCM elements */
    590         __le32 dai_link_elems;  /* number of DAI link elements */
    591         struct snd_soc_tplg_private priv;
    592 } __packed;
    593 
    594 /* Stream Capabilities v4 */
    595 struct snd_soc_tplg_stream_caps_v4 {
    596         __le32 size;            /* in bytes of this structure */
    597         char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
    598         __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */
    599         __le32 rates;           /* supported rates SNDRV_PCM_RATE_* */
    600         __le32 rate_min;        /* min rate */
    601         __le32 rate_max;        /* max rate */
    602         __le32 channels_min;    /* min channels */
    603         __le32 channels_max;    /* max channels */
    604         __le32 periods_min;     /* min number of periods */
    605         __le32 periods_max;     /* max number of periods */
    606         __le32 period_size_min; /* min period size bytes */
    607         __le32 period_size_max; /* max period size bytes */
    608         __le32 buffer_size_min; /* min buffer size bytes */
    609         __le32 buffer_size_max; /* max buffer size bytes */
    610 } __packed;
    611 
    612 /* PCM v4 */
    613 struct snd_soc_tplg_pcm_v4 {
    614         __le32 size;            /* in bytes of this structure */
    615         char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
    616         char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
    617         __le32 pcm_id;          /* unique ID - used to match with DAI link */
    618         __le32 dai_id;          /* unique ID - used to match */
    619         __le32 playback;        /* supports playback mode */
    620         __le32 capture;         /* supports capture mode */
    621         __le32 compress;        /* 1 = compressed; 0 = PCM */
    622         struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
    623         __le32 num_streams;     /* number of streams */
    624         struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */
    625 } __packed;
    626 
    627 /* Physical link config v4 */
    628 struct snd_soc_tplg_link_config_v4 {
    629         __le32 size;            /* in bytes of this structure */
    630         __le32 id;              /* unique ID - used to match */
    631         struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */
    632         __le32 num_streams;     /* number of streams */
    633 } __packed;
    634 
    635579#endif
  • GPL/trunk/alsa-kernel/include/uapi/sound/asound.h

    r772 r777  
    171171 *****************************************************************************/
    172172
    173 #define SNDRV_PCM_VERSION               SNDRV_PROTOCOL_VERSION(2, 0, 15)
     173#define SNDRV_PCM_VERSION               SNDRV_PROTOCOL_VERSION(2, 0, 18)
    174174
    175175typedef unsigned long snd_pcm_uframes_t;
     
    296296typedef int __bitwise snd_pcm_subformat_t;
    297297#define SNDRV_PCM_SUBFORMAT_STD         ((__force snd_pcm_subformat_t) 0)
    298 #define SNDRV_PCM_SUBFORMAT_LAST        SNDRV_PCM_SUBFORMAT_STD
     298#define SNDRV_PCM_SUBFORMAT_MSBITS_MAX  ((__force snd_pcm_subformat_t) 1)
     299#define SNDRV_PCM_SUBFORMAT_MSBITS_20   ((__force snd_pcm_subformat_t) 2)
     300#define SNDRV_PCM_SUBFORMAT_MSBITS_24   ((__force snd_pcm_subformat_t) 3)
     301#define SNDRV_PCM_SUBFORMAT_LAST        SNDRV_PCM_SUBFORMAT_MSBITS_24
    299302
    300303#define SNDRV_PCM_INFO_MMAP             0x00000001      /* hardware supports mmap */
     
    360363        unsigned short id16[8];
    361364        unsigned int id32[4];
    362 };
     365} /*__attribute__((deprecated))*/;
    363366
    364367struct snd_pcm_info {
     
    374377        unsigned int subdevices_count;
    375378        unsigned int subdevices_avail;
    376         union snd_pcm_sync_id sync;     /* hardware synchronization ID */
     379        unsigned char pad1[16];         /* was: hardware synchronization ID */
    377380        unsigned char reserved[64];     /* reserved for future... */
    378381};
     
    445448        unsigned int cmask;             /* R: changed masks */
    446449        unsigned int info;              /* R: Info flags for returned setup */
    447         unsigned int msbits;            /* R: used most significant bits */
     450        unsigned int msbits;            /* R: used most significant bits (in sample bit-width) */
    448451        unsigned int rate_num;          /* R: rate numerator */
    449452        unsigned int rate_den;          /* R: rate denominator */
    450453        snd_pcm_uframes_t fifo_size;    /* R: chip FIFO size in frames */
    451         unsigned char reserved[64];     /* reserved for future */
     454        unsigned char sync[16];         /* R: synchronization ID (perfect sync - one clock source) */
     455        unsigned char reserved[48];     /* reserved for future */
    452456};
    453457
     
    911915 */
    912916
    913 #define SNDRV_TIMER_VERSION             SNDRV_PROTOCOL_VERSION(2, 0, 7)
     917#define SNDRV_TIMER_VERSION             SNDRV_PROTOCOL_VERSION(2, 0, 8)
    914918
    915919enum {
     
    936940#define SNDRV_TIMER_GLOBAL_HPET         2
    937941#define SNDRV_TIMER_GLOBAL_HRTIMER      3
     942#define SNDRV_TIMER_GLOBAL_UDRIVEN      4
    938943
    939944/* info flags */
     
    10151020};
    10161021#endif
     1022
     1023/*
     1024 * This structure describes the userspace-driven timer. Such timers are purely virtual,
     1025 * and can only be triggered from software (for instance, by userspace application).
     1026 */
     1027struct snd_timer_uinfo {
     1028        /* To pretend being a normal timer, we need to know the resolution in ns. */
     1029        __u64 resolution;
     1030        int fd;
     1031        unsigned int id;
     1032        unsigned char reserved[16];
     1033};
    10171034
    10181035#define SNDRV_TIMER_IOCTL_PVERSION      _IOR('T', 0x00, int)
     
    10321049#define SNDRV_TIMER_IOCTL_PAUSE         _IO('T', 0xa3)
    10331050#define SNDRV_TIMER_IOCTL_TREAD64       _IOW('T', 0xa4, int)
     1051#define SNDRV_TIMER_IOCTL_CREATE        _IOWR('T', 0xa5, struct snd_timer_uinfo)
     1052#define SNDRV_TIMER_IOCTL_TRIGGER       _IO('T', 0xa6)
    10341053
    10351054#if __BITS_PER_LONG == 64
Note: See TracChangeset for help on using the changeset viewer.