Changeset 777 for GPL/trunk/alsa-kernel/include
- Timestamp:
- Apr 21, 2025, 7:17:25 PM (6 months ago)
- Location:
- GPL/trunk
- Files:
-
- 49 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-exp merged: 766-767,770-771,773-774
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/include/sound/ac97/codec.h
r772 r777 74 74 } 75 75 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) 80 77 81 78 #if IS_ENABLED(CONFIG_AC97_BUS_NEW) -
GPL/trunk/alsa-kernel/include/sound/ac97_codec.h
r772 r777 418 418 419 419 /* ad hoc AC97 device driver access */ 420 extern struct bus_type ac97_bus_type;420 extern const struct bus_type ac97_bus_type; 421 421 422 422 /* AC97 platform_data adding function */ -
GPL/trunk/alsa-kernel/include/sound/aci.h
r772 r777 73 73 74 74 struct snd_miro_aci { 75 struct snd_card *card; 75 76 unsigned long aci_port; 76 77 int aci_vendor; -
GPL/trunk/alsa-kernel/include/sound/ak4531_codec.h
r772 r777 66 66 void snd_ak4531_suspend(struct snd_ak4531 *ak4531); 67 67 void snd_ak4531_resume(struct snd_ak4531 *ak4531); 68 #else 69 static inline void snd_ak4531_suspend(struct snd_ak4531 *ak4531) {} 70 static inline void snd_ak4531_resume(struct snd_ak4531 *ak4531) {} 68 71 #endif 69 72 -
GPL/trunk/alsa-kernel/include/sound/asoundef.h
r772 r777 111 111 #define IEC958_AES2_CON_CHANNEL (15<<4) /* mask - channel number */ 112 112 #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 */ 114 114 #define IEC958_AES3_CON_FS_44100 (0<<0) /* 44.1kHz */ 115 115 #define IEC958_AES3_CON_FS_NOTID (1<<0) /* non indicated */ … … 117 117 #define IEC958_AES3_CON_FS_32000 (3<<0) /* 32kHz */ 118 118 #define IEC958_AES3_CON_FS_22050 (4<<0) /* 22.05kHz */ 119 #define IEC958_AES3_CON_FS_384000 (5<<0) /* 384kHz */ 119 120 #define IEC958_AES3_CON_FS_24000 (6<<0) /* 24kHz */ 120 121 #define IEC958_AES3_CON_FS_88200 (8<<0) /* 88.2kHz */ … … 122 123 #define IEC958_AES3_CON_FS_96000 (10<<0) /* 96kHz */ 123 124 #define IEC958_AES3_CON_FS_176400 (12<<0) /* 176.4kHz */ 125 #define IEC958_AES3_CON_FS_352400 (13<<0) /* 352.4kHz */ 124 126 #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 */ 125 129 #define IEC958_AES3_CON_CLOCK (3<<4) /* mask - clock accuracy */ 126 130 #define IEC958_AES3_CON_CLOCK_1000PPM (0<<4) /* 1000 ppm */ -
GPL/trunk/alsa-kernel/include/sound/control.h
r772 r777 82 82 void *private_data; 83 83 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 */ 85 85 }; 86 86 … … 141 141 void snd_ctl_rename(struct snd_card *card, struct snd_kcontrol *kctl, const char *name); 142 142 int 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);144 143 struct 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);146 144 struct snd_kcontrol *snd_ctl_find_id(struct snd_card *card, const struct snd_ctl_elem_id *id); 147 145 -
GPL/trunk/alsa-kernel/include/sound/core.h
r772 r777 103 103 unsigned int last_numid; /* last used numeric ID */ 104 104 struct rw_semaphore controls_rwsem; /* controls lock (list and values) */ 105 rwlock_t c tl_files_rwlock; /* ctl_files list lock*/105 rwlock_t controls_rwlock; /* lock for lookup and ctl_files list */ 106 106 int controls_count; /* count of all controls */ 107 107 size_t user_ctl_alloc_size; // current memory allocation by user controls. … … 349 349 /* --- */ 350 350 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 #else363 #ifndef TARGET_OS2364 #define __snd_printk(level, file, line, format, ...) \365 printk(format, ##__VA_ARGS__)366 #else367 #define __snd_printk printk368 #endif /* TARGET_OS2 */369 #endif /* defined(...) */370 371 /**372 * snd_printk - printk wrapper373 * @fmt: format string374 *375 * Works like printk() but prints the file and the line of the caller376 * when configured with CONFIG_SND_VERBOSE_PRINTK.377 */378 #ifndef TARGET_OS2379 #define snd_printk(fmt, ...) \380 __snd_printk(0, __FILE__, __LINE__, fmt, ##__VA_ARGS__)381 #else382 #define snd_printk __snd_printk383 #endif384 385 351 #ifdef CONFIG_SND_DEBUG 386 /**387 * snd_printd - debug printk388 * @fmt: format string389 *390 * Works like snd_printk() for debugging purposes.391 * Ignored when CONFIG_SND_DEBUG is not set.392 */393 #ifndef TARGET_OS2394 #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 printk400 #endif /* TARGET_OS2 */401 402 352 /** 403 353 * snd_BUG - give a BUG warning message and stack trace … … 411 361 #define snd_BUG() 412 362 #endif 413 414 /**415 * snd_printd_ratelimit - Suppress high rates of output when416 * CONFIG_SND_DEBUG is enabled.417 */418 #define snd_printd_ratelimit() printk_ratelimit()419 363 420 364 /** … … 434 378 435 379 #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 441 380 #define snd_BUG() do { } while (0) 442 381 … … 446 385 }) 447 386 #else 448 #define snd_printd snd_printk449 387 #define snd_BUG() do { } while (0) 450 388 static inline int __snd_bug_on(int cond) … … 455 393 #endif 456 394 457 static inline bool snd_printd_ratelimit(void) { return false; }458 459 395 #endif /* CONFIG_SND_DEBUG */ 460 461 #ifdef CONFIG_SND_DEBUG_VERBOSE462 /**463 * snd_printdd - debug printk464 * @format: format string465 *466 * Works like snd_printk() for debugging purposes.467 * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set.468 */469 #ifndef TARGET_OS2470 #define snd_printdd(format, ...) \471 __snd_printk(2, __FILE__, __LINE__, format, ##__VA_ARGS__)472 #else473 #define snd_printdd snd_printk474 #endif /* TARGET_OS2 */475 #else /* CONFIG_SND_DEBUG_VERBIOSE */476 #ifndef TARGET_OS2477 __printf(1, 2)478 static inline void snd_printdd(const char *format, ...) {}479 #else480 #define snd_printdd snd_printk481 #endif /* TARGET_OS2 */482 #endif /* CONFIG_SND_DEBUG_VERBIOSE */483 484 396 485 397 #define SNDRV_OSS_VERSION ((3<<16)|(8<<8)|(1<<4)|(0)) /* 3.8.1a */ -
GPL/trunk/alsa-kernel/include/sound/cs4271.h
r772 r777 10 10 11 11 struct cs4271_platform_data { 12 int gpio_nreset; /* GPIO driving Reset pin, if any */13 12 bool amutec_eq_bmutec; /* flag to enable AMUTEC=BMUTEC */ 14 13 -
GPL/trunk/alsa-kernel/include/sound/dmaengine_pcm.h
r772 r777 120 120 * @process: Callback used to apply processing on samples transferred from/to 121 121 * user space. 122 * @name: Component name. If null, dev_name will be used. 122 123 * @compat_filter_fn: Will be used as the filter function when requesting a 123 124 * channel for platforms which do not use devicetree. The filter parameter … … 145 146 int channel, unsigned long hwoff, 146 147 unsigned long bytes); 148 const char *name; 147 149 dma_filter_fn compat_filter_fn; 148 150 struct device *dma_dev; -
GPL/trunk/alsa-kernel/include/sound/emu10k1.h
r772 r777 711 711 // and hold the interleaved frames. 712 712 // 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). 717 720 // 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. 724 732 #define CD0 0x20 /* Cache data registers 0 .. 0x1f */ 725 733 … … 1849 1857 unsigned int optical_out; /* 0:SPDIF, 1:ADAT */ 1850 1858 struct work_struct work; 1859 struct mutex lock; 1851 1860 }; 1852 1861 … … 1997 2006 int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data); 1998 2007 int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu, u32 reg, u32 value); 2008 static inline void snd_emu1010_fpga_lock(struct snd_emu10k1 *emu) { mutex_lock(&emu->emu1010.lock); }; 2009 static inline void snd_emu1010_fpga_unlock(struct snd_emu10k1 *emu) { mutex_unlock(&emu->emu1010.lock); }; 2010 void snd_emu1010_fpga_write_lock(struct snd_emu10k1 *emu, u32 reg, u32 value); 1999 2011 void snd_emu1010_fpga_write(struct snd_emu10k1 *emu, u32 reg, u32 value); 2000 2012 void snd_emu1010_fpga_read(struct snd_emu10k1 *emu, u32 reg, u32 *value); … … 2003 2015 int snd_emu1010_get_raw_rate(struct snd_emu10k1 *emu, u8 src); 2004 2016 void snd_emu1010_update_clock(struct snd_emu10k1 *emu); 2017 void snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu, int dock, const struct firmware *fw_entry); 2005 2018 unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc); 2006 2019 void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb); … … 2045 2058 struct snd_util_memblk *snd_emu10k1_synth_alloc(struct snd_emu10k1 *emu, unsigned int size); 2046 2059 int 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 );2060 int snd_emu10k1_synth_memset(struct snd_emu10k1 *emu, struct snd_util_memblk *blk, int offset, int size, u8 value); 2061 int 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); 2049 2062 int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *blk); 2050 2063 -
GPL/trunk/alsa-kernel/include/sound/emux_synth.h
r772 r777 104 104 struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS]; 105 105 int used; /* use counter */ 106 c har *name; /* name of the device (internal) */106 const char *name; /* name of the device (internal) */ 107 107 struct snd_rawmidi **vmidi; 108 108 struct timer_list tlist; /* for pending note-offs */ -
GPL/trunk/alsa-kernel/include/sound/es1688.h
r772 r777 18 18 19 19 struct snd_es1688 { 20 struct snd_card *card; 20 21 unsigned long port; /* port of ESS chip */ 21 22 struct resource *res_port; -
GPL/trunk/alsa-kernel/include/sound/hda_codec.h
r772 r777 110 110 void (*set_power_state)(struct hda_codec *codec, hda_nid_t fg, 111 111 unsigned int power_state); 112 #ifdef CONFIG_PM113 112 int (*suspend)(struct hda_codec *codec); 114 113 int (*resume)(struct hda_codec *codec); 115 114 int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid); 116 #endif117 115 void (*stream_pm)(struct hda_codec *codec, hda_nid_t nid, bool on); 118 116 }; … … 142 140 u32 rates; /* supported rates */ 143 141 u64 formats; /* supported formats (SNDRV_PCM_FMTBIT_) */ 142 u32 subformats; /* for S32_LE format, SNDRV_PCM_SUBFMTBIT_* */ 144 143 unsigned int maxbps; /* supported max. bit per sample */ 145 144 const struct snd_pcm_chmap_elem *chmap; /* chmap to override */ … … 259 258 unsigned int ctl_dev_id:1; /* old control element id build behaviour */ 260 259 261 #ifdef CONFIG_PM262 260 unsigned long power_on_acct; 263 261 unsigned long power_off_acct; 264 262 unsigned long power_jiffies; 265 #endif266 263 267 264 /* filter the requested power state per nid */ … … 454 451 __snd_hda_codec_cleanup_stream(codec, nid, 0) 455 452 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) 458 455 #define snd_hda_is_supported_format(codec, nid, fmt) \ 459 456 snd_hdac_is_supported_format(&(codec)->core, nid, fmt) … … 486 483 int hda_call_check_power_status(struct hda_codec *codec, hda_nid_t nid) 487 484 { 488 #ifdef CONFIG_PM489 485 if (codec->patch_ops.check_power_status) 490 486 return codec->patch_ops.check_power_status(codec, nid); 491 #endif492 487 return 0; 493 488 } … … 500 495 #define snd_hda_power_down(codec) snd_hdac_power_down(&(codec)->core) 501 496 #define snd_hda_power_down_pm(codec) snd_hdac_power_down_pm(&(codec)->core) 502 #ifdef CONFIG_PM503 497 void snd_hda_codec_set_power_save(struct hda_codec *codec, int delay); 504 498 void snd_hda_set_power_save(struct hda_bus *bus, int delay); 505 499 void snd_hda_update_power_acct(struct hda_codec *codec); 506 #else507 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 #endif510 500 511 501 static inline bool hda_codec_need_resume(struct hda_codec *codec) -
GPL/trunk/alsa-kernel/include/sound/hda_register.h
r772 r777 92 92 #define AZX_REG_SD_BDLPU 0x1c 93 93 94 #define AZX_SD_FIFOSIZE_MASK GENMASK(15, 0) 95 94 96 /* GTS registers */ 95 97 #define AZX_REG_LLCH 0x14 … … 130 132 #define AZX_REG_VS_SDXEFIFOS_XINTERVAL 0x20 131 133 134 #define AZX_REG_VS_LTRP_GB_MASK GENMASK(6, 0) 135 132 136 /* PCI space */ 133 137 #define AZX_PCIREG_TCSEL 0x44 -
GPL/trunk/alsa-kernel/include/sound/hdaudio.h
r772 r777 19 19 #include <sound/memalloc.h> 20 20 #include <sound/hda_verbs.h> 21 #include <drm/i915_component.h> 21 #ifndef TARGET_OS2 22 #include <drm/intel/i915_component.h> 23 #endif 22 24 23 25 /* codec node id */ … … 141 143 int snd_hdac_get_sub_nodes(struct hdac_device *codec, hda_nid_t nid, 142 144 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);145 unsigned int snd_hdac_stream_format_bits(snd_pcm_format_t format, snd_pcm_subformat_t subformat, 146 unsigned int maxbits); 147 unsigned int snd_hdac_stream_format(unsigned int channels, unsigned int bits, unsigned int rate); 148 unsigned int snd_hdac_spdif_stream_format(unsigned int channels, unsigned int bits, 149 unsigned int rate, unsigned short spdif_ctls); 148 150 int 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); 150 153 bool snd_hdac_is_supported_format(struct hdac_device *codec, hda_nid_t nid, 151 154 unsigned int format); … … 362 365 bool not_use_interrupts:1; /* prohibiting the RIRB IRQ */ 363 366 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 */ 364 368 365 369 int poll_count; … … 588 592 int dir, int stream_tag); 589 593 590 int snd_hdac_stream_setup(struct hdac_stream *azx_dev );594 int snd_hdac_stream_setup(struct hdac_stream *azx_dev, bool code_loading); 591 595 void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev); 592 596 int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev); … … 603 607 unsigned int streams); 604 608 void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev, 605 unsigned int streams );609 unsigned int streams, bool start); 606 610 int snd_hdac_get_stream_stripe_ctl(struct hdac_bus *bus, 607 611 struct snd_pcm_substream *substream); … … 638 642 #define snd_hdac_stream_readb_poll(dev, reg, val, cond, delay_us, timeout_us) \ 639 643 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, \ 640 647 false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg) 641 648 #define snd_hdac_stream_readl_poll(dev, reg, val, cond, delay_us, timeout_us) \ … … 743 750 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HDA_DG2_1) }, \ 744 751 { 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) }, \ 745 753 { } \ 746 754 }, pci) || HDA_CONTROLLER_IS_HSW(pci)) -
GPL/trunk/alsa-kernel/include/sound/hdaudio_ext.h
r772 r777 3 3 #define __SOUND_HDAUDIO_EXT_H 4 4 5 #include <linux/io-64-nonatomic-lo-hi.h>6 #include <linux/iopoll.h>7 5 #include <sound/hdaudio.h> 8 6 … … 57 55 u32 pphcldpu; 58 56 57 u32 pplcllpl; 58 u32 pplcllpu; 59 59 60 bool decoupled:1; 60 61 bool link_locked:1; 61 62 bool link_prepared; 63 64 int (*host_setup)(struct hdac_stream *, bool); 62 65 63 66 struct snd_pcm_substream *link_substream; … … 87 90 void snd_hdac_ext_stream_reset(struct hdac_ext_stream *hext_stream); 88 91 int snd_hdac_ext_stream_setup(struct hdac_ext_stream *hext_stream, int fmt); 92 int snd_hdac_ext_host_stream_setup(struct hdac_ext_stream *hext_stream, bool code_loading); 89 93 90 94 struct hdac_ext_link { … … 114 118 void snd_hdac_ext_bus_link_power(struct hdac_device *codec, bool enable); 115 119 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 159 120 struct hdac_ext_device; 160 121 -
GPL/trunk/alsa-kernel/include/sound/hdmi-codec.h
r772 r777 13 13 #include <linux/of_graph.h> 14 14 #include <linux/hdmi.h> 15 #include <drm/drm_edid.h>16 15 #include <sound/asoundef.h> 17 16 #include <sound/soc.h> -
GPL/trunk/alsa-kernel/include/sound/intel-nhlt.h
r772 r777 144 144 u8 num_ch, u32 rate, u8 dir, u8 dev_type); 145 145 146 int intel_nhlt_ssp_device_type(struct device *dev, struct nhlt_acpi_table *nhlt, 147 u8 virtual_bus_id); 148 146 149 #else 147 150 … … 185 188 } 186 189 190 static 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 187 197 #endif 188 198 -
GPL/trunk/alsa-kernel/include/sound/max9768.h
r772 r777 10 10 /** 11 11 * struct max9768_pdata - optional platform specific MAX9768 configuration 12 * @shdn_gpio: GPIO to SHDN pin. If not valid, pin must be hardwired HIGH13 * @mute_gpio: GPIO to MUTE pin. If not valid, control for mute won't be added14 12 * @flags: configuration flags, e.g. set classic PWM mode (check datasheet 15 13 * regarding "filterless modulation" which is default). 16 14 */ 17 15 struct max9768_pdata { 18 int shdn_gpio;19 int mute_gpio;20 16 unsigned flags; 21 17 #define MAX9768_FLAG_CLASSIC_PWM (1 << 0) -
GPL/trunk/alsa-kernel/include/sound/memalloc.h
r772 r777 43 43 #define SNDRV_DMA_TYPE_NONCOHERENT 9 /* non-coherent buffer */ 44 44 #ifdef CONFIG_SND_DMA_SGBUF 45 #define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_NONCONTIG45 #define SNDRV_DMA_TYPE_DEV_SG 3 /* S/G pages */ 46 46 #define SNDRV_DMA_TYPE_DEV_WC_SG 6 /* SG write-combined */ 47 47 #else 48 48 #define SNDRV_DMA_TYPE_DEV_SG SNDRV_DMA_TYPE_DEV /* no SG-buf support */ 49 49 #define SNDRV_DMA_TYPE_DEV_WC_SG SNDRV_DMA_TYPE_DEV_WC 50 #endif51 /* fallback types, don't use those directly */52 #ifdef CONFIG_SND_DMA_SGBUF53 #define SNDRV_DMA_TYPE_DEV_SG_FALLBACK 1054 #define SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK 1155 50 #endif 56 51 -
GPL/trunk/alsa-kernel/include/sound/opl3.h
r679 r777 234 234 unsigned char wave_select; 235 235 #ifndef TARGET_OS2 236 } __ attribute__((packed));236 } __packed; 237 237 #else 238 238 }; -
GPL/trunk/alsa-kernel/include/sound/pcm.h
r772 r777 33 33 unsigned int info; /* SNDRV_PCM_INFO_* */ 34 34 u64 formats; /* SNDRV_PCM_FMTBIT_* */ 35 u32 subformats; /* for S32_LE, SNDRV_PCM_SUBFMTBIT_* */ 35 36 unsigned int rates; /* SNDRV_PCM_RATE_* */ 36 37 unsigned int rate_min; /* min rate */ … … 97 98 /* 3 is absent slot. */ 98 99 #define SNDRV_PCM_IOCTL1_FIFO_SIZE 4 100 #define SNDRV_PCM_IOCTL1_SYNC_ID 5 99 101 100 102 #define SNDRV_PCM_TRIGGER_STOP 0 … … 124 126 #define SNDRV_PCM_RATE_352800 (1U<<13) /* 352800Hz */ 125 127 #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 */ 126 134 127 135 #define SNDRV_PCM_RATE_CONTINUOUS (1U<<30) /* continuous range */ 128 #define SNDRV_PCM_RATE_KNOT (1U<<31) /* supports more non-continuo s rates */136 #define SNDRV_PCM_RATE_KNOT (1U<<31) /* supports more non-continuous rates */ 129 137 130 138 #define SNDRV_PCM_RATE_8000_44100 (SNDRV_PCM_RATE_8000|SNDRV_PCM_RATE_11025|\ … … 139 147 SNDRV_PCM_RATE_352800|\ 140 148 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) 141 152 #define _SNDRV_PCM_FMTBIT(fmt) (1ULL << (__force int)SNDRV_PCM_FORMAT_##fmt) 142 153 #define SNDRV_PCM_FMTBIT_S8 _SNDRV_PCM_FMTBIT(S8) … … 222 233 #endif 223 234 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 224 241 struct snd_pcm_file { 225 242 struct snd_pcm_substream *substream; … … 394 411 snd_pcm_uframes_t silence_filled; /* already filled part of silence area */ 395 412 396 union snd_pcm_sync_id sync; /* hardware synchronizationID */413 bool std_sync_id; /* hardware synchronization - standard per card ID */ 397 414 398 415 /* -- mmap -- */ … … 490 507 unsigned int hw_opened: 1; 491 508 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 */ 492 512 }; 493 513 … … 663 683 flags = _snd_pcm_stream_lock_irqsave_nested(substream); \ 664 684 } while (0) 685 686 #ifndef TARGET_OS2 687 /* definitions for guard(); use like guard(pcm_stream_lock) */ 688 DEFINE_LOCK_GUARD_1(pcm_stream_lock, struct snd_pcm_substream, 689 snd_pcm_stream_lock(_T->lock), 690 snd_pcm_stream_unlock(_T->lock)) 691 DEFINE_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)) 694 DEFINE_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 665 699 666 700 /** … … 1156 1190 void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, 1157 1191 const struct snd_pcm_ops *ops); 1158 void snd_pcm_set_sync(struct snd_pcm_substream *substream); 1192 void 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 */ 1200 static inline void snd_pcm_set_sync(struct snd_pcm_substream *substream) 1201 { 1202 substream->runtime->std_sync_id = true; 1203 } 1159 1204 int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, 1160 1205 unsigned int cmd, void *arg); … … 1342 1387 { 1343 1388 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 buffer1353 * @substream: the substream to allocate the buffer to1354 * @size: the requested buffer size, in bytes1355 *1356 * Allocates the PCM substream buffer using vmalloc(), i.e., the memory is1357 * contiguous in kernel virtual space, but not in physical memory. Use this1358 * 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 error1361 * code.1362 */1363 static inline int snd_pcm_lib_alloc_vmalloc_buffer1364 (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 buffer1372 * @substream: the substream to allocate the buffer to1373 * @size: the requested buffer size, in bytes1374 *1375 * This function works like snd_pcm_lib_alloc_vmalloc_buffer(), but uses1376 * 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 error1379 * code.1380 */1381 static inline int snd_pcm_lib_alloc_vmalloc_32_buffer1382 (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);1386 1389 } 1387 1390 -
GPL/trunk/alsa-kernel/include/sound/pcm_params.h
r772 r777 363 363 } 364 364 365 int snd_pcm_hw_params_bits(const struct snd_pcm_hw_params *p); 366 365 367 static inline void 366 368 params_set_format(struct snd_pcm_hw_params *p, snd_pcm_format_t fmt) -
GPL/trunk/alsa-kernel/include/sound/sb.h
r772 r777 291 291 void snd_sbmixer_suspend(struct snd_sb *chip); 292 292 void snd_sbmixer_resume(struct snd_sb *chip); 293 #else 294 static inline void snd_sbmixer_suspend(struct snd_sb *chip) {} 295 static inline void snd_sbmixer_resume(struct snd_sb *chip) {} 293 296 #endif 294 297 -
GPL/trunk/alsa-kernel/include/sound/seq_kernel.h
r772 r777 89 89 int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo); 90 90 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 95 91 /* port attach/detach */ 96 92 int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp, -
GPL/trunk/alsa-kernel/include/sound/simple_card.h
r772 r777 13 13 #include <sound/simple_card_utils.h> 14 14 15 struct asoc_simple_card_info {15 struct simple_util_info { 16 16 const char *name; 17 17 const char *card; … … 20 20 21 21 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; 24 24 }; 25 25 -
GPL/trunk/alsa-kernel/include/sound/simple_card_utils.h
r772 r777 12 12 #include <sound/soc.h> 13 13 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 19 struct simple_util_tdm_width_map { 20 20 u8 sample_bits; 21 21 u8 slot_count; … … 23 23 }; 24 24 25 struct asoc_simple_dai {25 struct simple_util_dai { 26 26 const char *name; 27 27 unsigned int sysclk; … … 33 33 struct clk *clk; 34 34 bool clk_fixed; 35 struct asoc_simple_tdm_width_map *tdm_width_map;35 struct simple_util_tdm_width_map *tdm_width_map; 36 36 int n_tdm_widths; 37 37 }; 38 38 39 struct asoc_simple_data {39 struct simple_util_data { 40 40 u32 convert_rate; 41 41 u32 convert_channels; … … 43 43 }; 44 44 45 struct asoc_simple_jack {45 struct simple_util_jack { 46 46 struct snd_soc_jack jack; 47 47 struct snd_soc_jack_pin pin; … … 55 55 }; 56 56 57 struct asoc_simple_priv {57 struct simple_util_priv { 58 58 struct snd_soc_card snd_card; 59 59 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; 63 63 struct snd_soc_codec_conf *codec_conf; 64 64 struct prop_nums num; 65 65 unsigned int mclk_fs; 66 66 } *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; 69 69 struct snd_soc_jack *aux_jacks; 70 70 struct snd_soc_dai_link *dai_link; 71 struct asoc_simple_dai *dais;71 struct simple_util_dai *dais; 72 72 struct snd_soc_dai_link_component *dlcs; 73 73 struct snd_soc_codec_conf *codec_conf; … … 131 131 }; 132 132 133 int asoc_simple_parse_daifmt(struct device *dev,133 int simple_util_parse_daifmt(struct device *dev, 134 134 struct device_node *node, 135 135 struct device_node *codec, 136 136 char *prefix, 137 137 unsigned int *retfmt); 138 int asoc_simple_parse_tdm_width_map(struct device *dev, struct device_node *np,139 struct asoc_simple_dai *dai);138 int simple_util_parse_tdm_width_map(struct device *dev, struct device_node *np, 139 struct simple_util_dai *dai); 140 140 141 141 __printf(3, 4) 142 int asoc_simple_set_dailink_name(struct device *dev,142 int simple_util_set_dailink_name(struct device *dev, 143 143 struct snd_soc_dai_link *dai_link, 144 144 const char *fmt, ...); 145 int asoc_simple_parse_card_name(struct snd_soc_card *card,145 int simple_util_parse_card_name(struct snd_soc_card *card, 146 146 char *prefix); 147 147 148 int asoc_simple_parse_clk(struct device *dev,148 int simple_util_parse_clk(struct device *dev, 149 149 struct device_node *node, 150 struct asoc_simple_dai *simple_dai,150 struct simple_util_dai *simple_dai, 151 151 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,152 int simple_util_startup(struct snd_pcm_substream *substream); 153 void simple_util_shutdown(struct snd_pcm_substream *substream); 154 int simple_util_hw_params(struct snd_pcm_substream *substream, 155 155 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,156 int simple_util_dai_init(struct snd_soc_pcm_runtime *rtd); 157 int simple_util_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, 158 158 struct snd_pcm_hw_params *params); 159 159 160 #define asoc_simple_parse_tdm(np, dai)\160 #define simple_util_parse_tdm(np, dai) \ 161 161 snd_soc_of_parse_tdm_slot(np, &(dai)->tx_slot_mask, \ 162 162 &(dai)->rx_slot_mask, \ … … 164 164 &(dai)->slot_width); 165 165 166 void asoc_simple_canonicalize_platform(struct snd_soc_dai_link_component *platforms,166 void simple_util_canonicalize_platform(struct snd_soc_dai_link_component *platforms, 167 167 struct snd_soc_dai_link_component *cpus); 168 void asoc_simple_canonicalize_cpu(struct snd_soc_dai_link_component *cpus,168 void simple_util_canonicalize_cpu(struct snd_soc_dai_link_component *cpus, 169 169 int is_single_links); 170 170 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, 171 void simple_util_clean_reference(struct snd_soc_card *card); 172 173 void simple_util_parse_convert(struct device_node *np, char *prefix, 174 struct simple_util_data *data); 175 bool simple_util_is_convert_required(const struct simple_util_data *data); 176 177 int simple_util_get_sample_fmt(struct simple_util_data *data); 178 179 int simple_util_parse_routing(struct snd_soc_card *card, 178 180 char *prefix); 179 int asoc_simple_parse_widgets(struct snd_soc_card *card,181 int simple_util_parse_widgets(struct snd_soc_card *card, 180 182 char *prefix); 181 int asoc_simple_parse_pin_switches(struct snd_soc_card *card,183 int simple_util_parse_pin_switches(struct snd_soc_card *card, 182 184 char *prefix); 183 185 184 int asoc_simple_init_jack(struct snd_soc_card *card,185 struct asoc_simple_jack *sjack,186 int simple_util_init_jack(struct snd_soc_card *card, 187 struct simple_util_jack *sjack, 186 188 int is_hp, char *prefix, char *pin); 187 int asoc_simple_init_aux_jacks(struct asoc_simple_priv *priv,189 int simple_util_init_aux_jacks(struct simple_util_priv *priv, 188 190 char *prefix); 189 int asoc_simple_init_priv(struct asoc_simple_priv *priv,191 int simple_util_init_priv(struct simple_util_priv *priv, 190 192 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,193 void simple_util_remove(struct platform_device *pdev); 194 195 int graph_util_card_probe(struct snd_soc_card *card); 196 int graph_util_is_ports0(struct device_node *port); 197 int graph_util_parse_dai(struct device *dev, struct device_node *ep, 196 198 struct snd_soc_dai_link_component *dlc, int *is_single_link); 197 199 200 void graph_util_parse_link_direction(struct device_node *np, 201 bool *is_playback_only, bool *is_capture_only); 202 void 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 198 207 #ifdef DEBUG 199 static inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv,208 static inline void simple_util_debug_dai(struct simple_util_priv *priv, 200 209 char *name, 201 struct asoc_simple_dai *dai)210 struct simple_util_dai *dai) 202 211 { 203 212 struct device *dev = simple_priv_to_dev(priv); … … 229 238 } 230 239 231 static inline void asoc_simple_debug_info(struct asoc_simple_priv *priv)240 static inline void simple_util_debug_info(struct simple_util_priv *priv) 232 241 { 233 242 struct snd_soc_card *card = simple_priv_to_card(priv); … … 242 251 struct simple_dai_props *props = simple_priv_to_props(priv, i); 243 252 struct snd_soc_dai_link *link = simple_priv_to_link(priv, i); 244 struct asoc_simple_dai *dai;253 struct simple_util_dai *dai; 245 254 struct snd_soc_codec_conf *cnf; 246 255 int j; … … 250 259 dev_dbg(dev, "cpu num = %d\n", link->num_cpus); 251 260 for_each_prop_dai_cpu(props, j, dai) 252 asoc_simple_debug_dai(priv, "cpu", dai);261 simple_util_debug_dai(priv, "cpu", dai); 253 262 dev_dbg(dev, "codec num = %d\n", link->num_codecs); 254 263 for_each_prop_dai_codec(props, j, dai) 255 asoc_simple_debug_dai(priv, "codec", dai);264 simple_util_debug_dai(priv, "codec", dai); 256 265 257 266 if (link->name) … … 271 280 } 272 281 #else 273 #define asoc_simple_debug_info(priv)282 #define simple_util_debug_info(priv) 274 283 #endif /* DEBUG */ 275 284 -
GPL/trunk/alsa-kernel/include/sound/snd_wavefront.h
r772 r777 138 138 extern int snd_wavefront_fx_release (struct snd_hwdep *, struct file *); 139 139 140 /* prefix in all snd_printk() delivered messages */141 142 #define LOGNAME "WaveFront: "143 144 140 #endif /* __SOUND_SND_WAVEFRONT_H__ */ -
GPL/trunk/alsa-kernel/include/sound/soc-acpi-intel-match.h
r772 r777 1 1 /* SPDX-License-Identifier: GPL-2.0 2 2 * 3 * Copyright (C) 2017, Intel Corporation . All rights reserved.3 * Copyright (C) 2017, Intel Corporation 4 4 */ 5 5 … … 34 34 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_machines[]; 35 35 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_machines[]; 36 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_machines[]; 36 37 37 38 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[]; … … 45 46 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[]; 46 47 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_sdw_machines[]; 48 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[]; 47 49 48 50 /* -
GPL/trunk/alsa-kernel/include/sound/soc-acpi.h
r772 r777 1 1 /* SPDX-License-Identifier: GPL-2.0-only 2 2 * 3 * Copyright (C) 2013-15, Intel Corporation . All rights reserved.3 * Copyright (C) 2013-15, Intel Corporation 4 4 */ 5 5 … … 63 63 * @codec_mask: used for HDAudio support 64 64 * @dmic_num: number of SoC- or chipset-attached PDM digital microphones 65 * @common_hdmi_codec_drv: use commom HDAudio HDMI codec driver66 65 * @link_mask: SoundWire links enabled on the board 67 66 * @links: array of SoundWire link _ADR descriptors, null terminated … … 71 70 * @subsystem_vendor: optional PCI SSID vendor value 72 71 * @subsystem_device: optional PCI SSID device value 72 * @subsystem_rev: optional PCI SSID revision value 73 73 * @subsystem_id_set: true if a value has been written to 74 74 * subsystem_vendor and subsystem_device. 75 * @bt_link_mask: BT offload link enabled on the board 75 76 */ 76 77 struct snd_soc_acpi_mach_params { … … 79 80 u32 codec_mask; 80 81 u32 dmic_num; 81 bool common_hdmi_codec_drv;82 82 u32 link_mask; 83 83 const struct snd_soc_acpi_link_adr *links; … … 87 87 unsigned short subsystem_vendor; 88 88 unsigned short subsystem_device; 89 unsigned short subsystem_rev; 89 90 bool subsystem_id_set; 91 u32 bt_link_mask; 90 92 }; 91 93 … … 151 153 */ 152 154 #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) 153 167 154 168 /** -
GPL/trunk/alsa-kernel/include/sound/soc-component.h
r772 r777 463 463 464 464 /* component controls */ 465 struct snd_kcontrol *snd_soc_component_get_kcontrol(struct snd_soc_component *component, 466 const char * const ctl); 465 467 int snd_soc_component_notify_control(struct snd_soc_component *component, 466 468 const char * const ctl); -
GPL/trunk/alsa-kernel/include/sound/soc-dai.h
r772 r777 181 181 182 182 /* 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);183 int snd_soc_dai_get_fmt_max_priority(const struct snd_soc_pcm_runtime *rtd); 184 u64 snd_soc_dai_get_fmt(const struct snd_soc_dai *dai, int priority); 185 185 int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt); 186 186 … … 189 189 190 190 int 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); 193 193 194 194 int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); … … 199 199 200 200 201 int snd_soc_dai_get_channel_map( struct snd_soc_dai *dai,201 int snd_soc_dai_get_channel_map(const struct snd_soc_dai *dai, 202 202 unsigned int *tx_num, unsigned int *tx_slot, 203 203 unsigned int *rx_num, unsigned int *rx_slot); 204 204 205 int snd_soc_dai_is_dummy( struct snd_soc_dai *dai);205 int snd_soc_dai_is_dummy(const struct snd_soc_dai *dai); 206 206 207 207 int snd_soc_dai_hw_params(struct snd_soc_dai *dai, … … 219 219 int snd_soc_dai_compress_new(struct snd_soc_dai *dai, 220 220 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); 221 bool snd_soc_dai_stream_valid(const struct snd_soc_dai *dai, int stream); 223 222 void snd_soc_dai_action(struct snd_soc_dai *dai, 224 223 int stream, int action); … … 233 232 snd_soc_dai_action(dai, stream, -1); 234 233 } 235 int snd_soc_dai_active( struct snd_soc_dai *dai);234 int snd_soc_dai_active(const struct snd_soc_dai *dai); 236 235 237 236 int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order); … … 241 240 int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd, 242 241 int rollback); 243 int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream,244 int cmd);245 242 void snd_soc_pcm_dai_delay(struct snd_pcm_substream *substream, 246 243 snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay); … … 272 269 struct snd_compr_metadata *metadata); 273 270 274 const char *snd_soc_dai_name_get( struct snd_soc_dai *dai);271 const char *snd_soc_dai_name_get(const struct snd_soc_dai *dai); 275 272 276 273 struct snd_soc_dai_ops { … … 306 303 int slots, int slot_width); 307 304 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, 311 308 unsigned int *tx_num, unsigned int *tx_slot, 312 309 unsigned int *rx_num, unsigned int *rx_slot); … … 346 343 int (*trigger)(struct snd_pcm_substream *, int, 347 344 struct snd_soc_dai *); 348 int (*bespoke_trigger)(struct snd_pcm_substream *, int, 349 struct snd_soc_dai *); 345 350 346 /* 351 347 * For hardware based FIFO caused delay reporting. … … 362 358 * snd_soc_dai_get_fmt() 363 359 */ 364 u64 *auto_selectable_formats;360 const u64 *auto_selectable_formats; 365 361 int num_auto_selectable_formats; 366 362 … … 414 410 unsigned int base; 415 411 struct snd_soc_dobj dobj; 416 struct of_phandle_args *dai_args;412 const struct of_phandle_args *dai_args; 417 413 418 414 /* ops */ … … 474 470 }; 475 471 476 static inline struct snd_soc_pcm_stream *472 static inline const struct snd_soc_pcm_stream * 477 473 snd_soc_dai_get_pcm_stream(const struct snd_soc_dai *dai, int stream) 478 474 { … … 519 515 } 520 516 521 static inline unsigned int snd_soc_dai_tdm_mask_get(struct snd_soc_dai *dai, int stream) 517 static inline unsigned int snd_soc_dai_tdm_mask_get(const struct snd_soc_dai *dai, 518 int stream) 522 519 { 523 520 return dai->stream[stream].tdm_mask; … … 530 527 } 531 528 532 static inline unsigned int snd_soc_dai_stream_active(struct snd_soc_dai *dai, int stream) 529 static inline unsigned int snd_soc_dai_stream_active(const struct snd_soc_dai *dai, 530 int stream) 533 531 { 534 532 /* see snd_soc_dai_action() for setup */ -
GPL/trunk/alsa-kernel/include/sound/soc-dapm.h
r772 r777 458 458 struct snd_ctl_elem_value *uncontrol); 459 459 int 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); 461 461 struct snd_soc_dapm_widget *snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, 462 462 const struct snd_soc_dapm_widget *widget); … … 719 719 struct snd_soc_dapm_widget_list { 720 720 int num_widgets; 721 struct snd_soc_dapm_widget *widgets[] ;721 struct snd_soc_dapm_widget *widgets[] __counted_by(num_widgets); 722 722 }; 723 723 -
GPL/trunk/alsa-kernel/include/sound/soc-dpcm.h
r772 r777 59 59 SND_SOC_DPCM_TRIGGER_PRE = 0, 60 60 SND_SOC_DPCM_TRIGGER_POST, 61 SND_SOC_DPCM_TRIGGER_BESPOKE,62 61 }; 63 62 … … 115 114 list_for_each_entry_continue_reverse(_dpcm, &(fe)->dpcm[stream].be_clients, list_be) 116 115 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);135 116 136 117 /* get the substream for this BE */ -
GPL/trunk/alsa-kernel/include/sound/soc-topology.h
r772 r777 179 179 /* Dynamic Object loading and removal for component drivers */ 180 180 int 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); 182 182 int snd_soc_tplg_component_remove(struct snd_soc_component *comp); 183 183 -
GPL/trunk/alsa-kernel/include/sound/soc.h
r772 r777 11 11 #define __LINUX_SND_SOC_H 12 12 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> 13 22 #include <linux/of.h> 14 #include <linux/platform_device.h>15 23 #include <linux/types.h> 16 #include <linux/notifier.h>17 24 #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> 22 29 #include <sound/core.h> 23 30 #include <sound/pcm.h> 24 #include <sound/compress_driver.h> 25 #include <sound/control.h> 26 #include <sound/ac97_codec.h> 31 32 struct module; 33 struct 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> 27 38 28 39 /* … … 149 160 .shift = shift_left, .rshift = shift_right, \ 150 161 .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} } 151 174 #define SOC_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array) \ 152 175 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ … … 400 423 const struct soc_enum name = SOC_ENUM_SINGLE_VIRT(ARRAY_SIZE(xtexts), xtexts) 401 424 402 struct device_node;403 425 struct snd_jack; 404 426 struct snd_soc_card; … … 415 437 struct snd_soc_jack_zone; 416 438 struct snd_soc_jack_pin; 439 417 440 #include <sound/soc-dapm.h> 418 441 #include <sound/soc-dpcm.h> … … 512 535 /* Utility functions to get clock rates from various things */ 513 536 int 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);537 int snd_soc_params_to_frame_size(const struct snd_pcm_hw_params *params); 515 538 int 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,539 int snd_soc_params_to_bclk(const struct snd_pcm_hw_params *parms); 540 int snd_soc_tdm_params_to_bclk(const struct snd_pcm_hw_params *params, 518 541 int tdm_width, int tdm_slots, int slot_multiple); 519 542 … … 620 643 const char *stream_name; 621 644 u64 formats; /* SNDRV_PCM_FMTBIT_* */ 645 u32 subformats; /* for S32_LE format, SNDRV_PCM_SUBFMTBIT_* */ 622 646 unsigned int rates; /* SNDRV_PCM_RATE_* */ 623 647 unsigned int rate_min; /* min rate */ … … 652 676 struct device_node *of_node; 653 677 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 */ 717 struct snd_soc_dai_link_ch_map { 718 unsigned int cpu; 719 unsigned int codec; 659 720 unsigned int ch_mask; 660 721 }; … … 688 749 unsigned int num_codecs; 689 750 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 691 754 /* 692 755 * You MAY specify the link's platform/PCM/DMA driver, either by … … 753 816 unsigned int dynamic:1; 754 817 818 /* REMOVE ME */ 755 819 /* DPCM capture and Playback support */ 756 820 unsigned int dpcm_capture:1; … … 775 839 }; 776 840 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 841 static 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 } 781 845 782 846 static inline struct snd_soc_dai_link_component* … … 811 875 ((i) < link->num_cpus) && \ 812 876 ((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)); \ 813 883 (i)++) 814 884 … … 876 946 .num_platforms = ARRAY_SIZE(platform) 877 947 878 #define SND_SOC_DAILINK_REGx(_1, _2, _3, func, ...) func879 948 #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__) 884 950 885 951 #define SND_SOC_DAILINK_DEF(name, def...) \ … … 898 964 #define COMP_AUX(_name) { .name = _name } 899 965 #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() */ 904 967 905 968 extern struct snd_soc_dai_link_component null_dailink_component[0]; … … 1145 1208 unsigned int pop_wait:1; 1146 1209 unsigned int fe_compr:1; /* for Dynamic PCM */ 1147 1148 bool initialized; 1149 1210 unsigned int initialized:1; 1211 1212 /* CPU/Codec/Platform */ 1150 1213 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 }; 1158 1216 1159 1217 /* see soc_new_pcm_runtime() */ 1160 1218 #define snd_soc_rtd_to_cpu(rtd, n) (rtd)->dais[n] 1161 1219 #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 1221 static inline struct snd_soc_pcm_runtime * 1222 snd_soc_substream_to_rtd(const struct snd_pcm_substream *substream) 1223 { 1224 return snd_pcm_substream_chip(substream); 1225 } 1164 1226 1165 1227 #define for_each_rtd_components(rtd, i, component) \ … … 1180 1242 ((dai) = (rtd)->dais[i]); \ 1181 1243 (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) 1182 1249 1183 1250 void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd); … … 1238 1305 }; 1239 1306 1240 static inline bool snd_soc_volsw_is_stereo( struct soc_mixer_control *mc)1307 static inline bool snd_soc_volsw_is_stereo(const struct soc_mixer_control *mc) 1241 1308 { 1242 1309 if (mc->reg == mc->rreg && mc->shift == mc->rshift) … … 1250 1317 } 1251 1318 1252 static inline unsigned int snd_soc_enum_val_to_item( struct soc_enum *e,1319 static inline unsigned int snd_soc_enum_val_to_item(const struct soc_enum *e, 1253 1320 unsigned int val) 1254 1321 { … … 1265 1332 } 1266 1333 1267 static inline unsigned int snd_soc_enum_item_to_val( struct soc_enum *e,1334 static inline unsigned int snd_soc_enum_item_to_val(const struct soc_enum *e, 1268 1335 unsigned int item) 1269 1336 { … … 1340 1407 snd_soc_daifmt_parse_clock_provider_as_bitmap(np, prefix)) 1341 1408 1342 int snd_soc_get_stream_cpu( struct snd_soc_dai_link *dai_link, int stream);1409 int snd_soc_get_stream_cpu(const struct snd_soc_dai_link *dai_link, int stream); 1343 1410 int snd_soc_get_dlc(const struct of_phandle_args *args, 1344 1411 struct snd_soc_dai_link_component *dlc); … … 1370 1437 struct snd_soc_dai_link_component *cpus); 1371 1438 struct 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); 1440 struct snd_soc_dai *snd_soc_get_dai_via_args(const struct of_phandle_args *dai_args); 1374 1441 struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component, 1375 1442 struct snd_soc_dai_driver *dai_drv, -
GPL/trunk/alsa-kernel/include/sound/sof.h
r772 r777 4 4 * redistributing this file, you may do so under either license. 5 5 * 6 * Copyright(c) 2018 Intel Corporation . All rights reserved.6 * Copyright(c) 2018 Intel Corporation 7 7 * 8 8 * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com> … … 58 58 }; 59 59 60 #define SOF_IPC SOF_IPC_TYPE_3 61 #define SOF_INTEL_IPC4 SOF_IPC_TYPE_4 60 struct 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 }; 62 71 63 72 /* … … 89 98 /* descriptor */ 90 99 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; 91 103 92 104 /* firmware and topology filenames */ … … 155 167 const char *default_fw_filename[SOF_IPC_TYPE_COUNT]; 156 168 157 struct snd_sof_dsp_ops *ops;169 const struct snd_sof_dsp_ops *ops; 158 170 int (*ops_init)(struct snd_sof_dev *sdev); 159 171 void (*ops_free)(struct snd_sof_dev *sdev); … … 162 174 int sof_dai_get_mclk(struct snd_soc_pcm_runtime *rtd); 163 175 int sof_dai_get_bclk(struct snd_soc_pcm_runtime *rtd); 176 int sof_dai_get_tdm_slots(struct snd_soc_pcm_runtime *rtd); 164 177 165 178 #endif -
GPL/trunk/alsa-kernel/include/sound/soundfont.h
r772 r777 87 87 88 88 /* 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, 89 int snd_soundfont_load(struct snd_card *card, 90 struct snd_sf_list *sflist, const void __user *data, 92 91 long count, int client); 92 int snd_soundfont_load_guspatch(struct snd_card *card, 93 struct snd_sf_list *sflist, const char __user *data, 94 long count); 93 95 int snd_soundfont_close_check(struct snd_sf_list *sflist, int client); 94 96 -
GPL/trunk/alsa-kernel/include/sound/version.h
r772 r777 1 1 /* include/version.h */ 2 #define CONFIG_SND_VERSION "6. 6.85"2 #define CONFIG_SND_VERSION "6.12.21" 3 3 #define CONFIG_SND_DATE "" -
GPL/trunk/alsa-kernel/include/sound/vx_core.h
r772 r777 156 156 unsigned int pcm_running; 157 157 158 struct device *dev;159 158 struct snd_hwdep *hwdep; 160 159 -
GPL/trunk/alsa-kernel/include/sound/wavefront.h
r772 r777 9 9 */ 10 10 11 #if (!defined(__GNUC__) && !defined(__GNUG__))12 13 You will not be able to compile this file correctly without gcc, because14 it is necessary to pack the "wavefront_alias" structure to a size15 of 22 bytes, corresponding to 16-bit alignment (as would have been16 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)") is19 completely compiler dependent.20 21 All other wavefront_* types end up aligned to 32 bit values and22 still have the same (correct) size.23 24 #else25 26 /* However, note that as of G++ 2.7.3.2, g++ was unable to27 correctly parse *type* __attribute__ tags. It will do the28 right thing if we use the "packed" attribute on each struct29 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 TO36 BE USED WITH EITHER C *OR* C++.37 **********************************************************************/38 39 11 #ifndef NUM_MIDIKEYS 40 12 #define NUM_MIDIKEYS 128 … … 44 16 #define NUM_MIDICHANNELS 16 45 17 #endif /* NUM_MIDICHANNELS */ 46 47 /* These are very useful/important. the original wavefront interface48 was developed on a 16 bit system, where sizeof(int) = 249 bytes. Defining things like this makes the code much more portable, and50 easier to understand without having to toggle back and forth51 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 #endif69 18 70 19 /* Pseudo-commands not part of the WaveFront command set. … … 469 418 470 419 u8 sixteen_bit_padding; 471 } __ attribute__((packed))wavefront_alias;420 } __packed wavefront_alias; 472 421 473 422 typedef struct wf_drum { -
GPL/trunk/alsa-kernel/include/sound/wm0010.h
r772 r777 12 12 13 13 struct wm0010_pdata { 14 int gpio_reset;15 16 /* Set if there is an inverter between the GPIO controlling17 * the reset signal and the device.18 */19 int reset_active_high;20 14 int irq_flags; 21 15 }; -
GPL/trunk/alsa-kernel/include/sound/wm2200.h
r772 r777 43 43 44 44 struct wm2200_pdata { 45 int reset; /** GPIO controlling /RESET, if any */46 int ldo_ena; /** GPIO controlling LODENA, if any */47 45 int irq_flags; 48 46 -
GPL/trunk/alsa-kernel/include/sound/wm5100.h
r772 r777 37 37 38 38 struct 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 */42 39 int irq_flags; 43 int gpio_base;44 40 45 41 struct wm5100_jack_mode jack_modes[2]; -
GPL/trunk/alsa-kernel/include/sound/wm8996.h
r772 r777 34 34 int irq_flags; /** Set IRQ trigger flags; default active low */ 35 35 36 int ldo_ena; /** GPIO for LDO1; -1 for none */37 38 36 int micdet_def; /** Default MICDET_SRC/HP1FB_SRC/MICD_BIAS */ 39 37 … … 43 41 u32 spkmute_seq; /** Value for register 0x802 */ 44 42 45 int gpio_base;46 43 u32 gpio_default[5]; 47 44 -
GPL/trunk/alsa-kernel/include/uapi/sound/asequencer.h
r772 r777 11 11 12 12 /** 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) 14 14 15 15 /** … … 209 209 unsigned int len; /* length of data */ 210 210 void *ptr; /* pointer to data (note: maybe 64-bit) */ 211 } __ attribute__((packed));211 } __packed; 212 212 #else 213 213 #pragma pack(1) … … 262 262 unsigned short value; /* optional data */ 263 263 struct snd_seq_event *event; /* quoted event */ 264 } __ attribute__((packed));264 } __packed; 265 265 #else 266 266 #pragma pack(1) … … 481 481 #define SNDRV_SEQ_PORT_FLG_TIME_REAL (1<<2) 482 482 483 #define SNDRV_SEQ_PORT_FLG_IS_MIDI1 (1<<3) /* Keep MIDI 1.0 protocol */ 484 483 485 /* port direction */ 484 486 #define SNDRV_SEQ_PORT_DIR_UNKNOWN 0 … … 543 545 struct snd_seq_queue_tempo { 544 546 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) */ 546 548 int ppq; /* time resolution, ticks/quarter */ 547 549 unsigned int skew_value; /* queue skew */ 548 550 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 */ 550 553 }; 551 554 -
GPL/trunk/alsa-kernel/include/uapi/sound/asoc.h
r772 r777 89 89 /* ABI version */ 90 90 #define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */ 91 #define SND_SOC_TPLG_ABI_VERSION_MIN 0x 4/* oldest version supported */91 #define SND_SOC_TPLG_ABI_VERSION_MIN 0x5 /* oldest version supported */ 92 92 93 93 /* Max size of TLV data */ … … 577 577 } __attribute__((packed)); 578 578 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 635 579 #endif -
GPL/trunk/alsa-kernel/include/uapi/sound/asound.h
r772 r777 171 171 *****************************************************************************/ 172 172 173 #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 1 5)173 #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 18) 174 174 175 175 typedef unsigned long snd_pcm_uframes_t; … … 296 296 typedef int __bitwise snd_pcm_subformat_t; 297 297 #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 299 302 300 303 #define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ … … 360 363 unsigned short id16[8]; 361 364 unsigned int id32[4]; 362 } ;365 } /*__attribute__((deprecated))*/; 363 366 364 367 struct snd_pcm_info { … … 374 377 unsigned int subdevices_count; 375 378 unsigned int subdevices_avail; 376 un ion snd_pcm_sync_id sync; /*hardware synchronization ID */379 unsigned char pad1[16]; /* was: hardware synchronization ID */ 377 380 unsigned char reserved[64]; /* reserved for future... */ 378 381 }; … … 445 448 unsigned int cmask; /* R: changed masks */ 446 449 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) */ 448 451 unsigned int rate_num; /* R: rate numerator */ 449 452 unsigned int rate_den; /* R: rate denominator */ 450 453 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 */ 452 456 }; 453 457 … … 911 915 */ 912 916 913 #define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7)917 #define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8) 914 918 915 919 enum { … … 936 940 #define SNDRV_TIMER_GLOBAL_HPET 2 937 941 #define SNDRV_TIMER_GLOBAL_HRTIMER 3 942 #define SNDRV_TIMER_GLOBAL_UDRIVEN 4 938 943 939 944 /* info flags */ … … 1015 1020 }; 1016 1021 #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 */ 1027 struct 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 }; 1017 1034 1018 1035 #define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int) … … 1032 1049 #define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3) 1033 1050 #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) 1034 1053 1035 1054 #if __BITS_PER_LONG == 64
Note:
See TracChangeset
for help on using the changeset viewer.