Merge tag 'sound-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "It's been relatively calm in this cycle from the feature POV, but
  there were lots of cleanup works in the wide-range of code for
  converting with the auto-cleanup macros like guard().

  The mostly user-visible changes are the support of a couple of new
  compress-offload API extensions, and the support of new ASoC codec /
  platform drivers as well as USB-audio quirks.

  Here we go with some highlights:

  Core:
   - Compress-offload API extension for 64bit timestamp support
   - Compress-offload API extension for OPUS codec support
   - Workaround for PCM locking issue with PREEMPT_RT and softirq
   - KCSAN warning fix for ALSA sequencer core

  ASoC:
   - Continued cleanup works for ASoC core APIs
   - Lots of cleanups and conversions of DT bindings
   - Substantial maintainance work on the Intel AVS drivers
   - Support for Qualcomm Glymur and PM4125, Realtek RT1321, Shanghai
     FourSemi FS2104/5S, Texas Instruments PCM1754 and TAS2783A
   - Remove support for TI WL1273 for old Nokia systems

  USB-audio:
   - Support for Tascam US-144mkII, Presonus S1824c support
   - More flexible quirk option handling
   - Fix for USB MIDI timer bug triggered by fuzzer

  Others:
   - A large series of cleanups with guard() & co macros over (non-ASoC)
     sound drivers (PCI, ISA, HD-audio, USB-audio, drivers, etc)
   - TAS5825 HD-audio side-codec support"

* tag 'sound-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (454 commits)
  ALSA: usb-audio: don't hardcode gain for output channel of Presonus Studio
  ALSA: usb-audio: add the initial mix for Presonus Studio 1824c
  ALSA: doc: improved docs about quirk_flags in snd-usb-audio
  ALSA: usb-audio: make param quirk_flags change-able in runtime
  ALSA: usb-audio: improve module param quirk_flags
  ALSA: usb-audio: add two-way convert between name and bit for QUIRK_FLAG_*
  ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free
  ALSA: usb-audio: add mono main switch to Presonus S1824c
  ALSA: compress: document 'chan_map' member in snd_dec_opus
  ASoC: cs35l56: Add support for CS35L56 B2 silicon
  ASoC: cs35l56: Set fw_regs table after getting REVID
  ALSA: hda/realtek: Add quirk for HP Spectre 14t-ea100
  ASoc: tas2783A: Fix an error code in probe()
  ASoC: tlv320aic3x: Fix class-D initialization for tlv320aic3007
  ASoC: qcom: sc8280xp: use sa8775p/ subdir for QCS9100 / QCS9075
  ASoC: stm32: sai: manage context in set_sysclk callback
  ASoC: renesas: msiof: ignore 1st FSERR
  ASoC: renesas: msiof: Add note for The possibility of R/L opposite Capture
  ASoC: renesas: msiof: setup both (Playback/Capture) in the same time
  ASoC: renesas: msiof: tidyup DMAC stop timing
  ...
This commit is contained in:
Linus Torvalds
2025-10-02 11:37:19 -07:00
602 changed files with 24380 additions and 16189 deletions
+33 -2
View File
@@ -13,8 +13,7 @@
#include <sound/asound.h>
#include <sound/compress_params.h>
#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 3, 0)
#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 4, 1)
/**
* struct snd_compressed_buffer - compressed buffer
* @fragment_size: size of buffer fragment in bytes
@@ -56,6 +55,25 @@ struct snd_compr_tstamp {
__u32 sampling_rate;
} __attribute__((packed, aligned(4)));
/**
* struct snd_compr_tstamp64 - timestamp descriptor with fields in 64 bit
* @byte_offset: Byte offset in ring buffer to DSP
* @copied_total: Total number of bytes copied from/to ring buffer to/by DSP
* @pcm_frames: Frames decoded or encoded by DSP. This field will evolve by
* large steps and should only be used to monitor encoding/decoding
* progress. It shall not be used for timing estimates.
* @pcm_io_frames: Frames rendered or received by DSP into a mixer or an audio
* output/input. This field should be used for A/V sync or time estimates.
* @sampling_rate: sampling rate of audio
*/
struct snd_compr_tstamp64 {
__u32 byte_offset;
__u64 copied_total;
__u64 pcm_frames;
__u64 pcm_io_frames;
__u32 sampling_rate;
} __attribute__((packed, aligned(4)));
/**
* struct snd_compr_avail - avail descriptor
* @avail: Number of bytes available in ring buffer for writing/reading
@@ -66,6 +84,16 @@ struct snd_compr_avail {
struct snd_compr_tstamp tstamp;
} __attribute__((packed, aligned(4)));
/**
* struct snd_compr_avail64 - avail descriptor with tstamp in 64 bit format
* @avail: Number of bytes available in ring buffer for writing/reading
* @tstamp: timestamp information
*/
struct snd_compr_avail64 {
__u64 avail;
struct snd_compr_tstamp64 tstamp;
} __attribute__((packed, aligned(4)));
enum snd_compr_direction {
SND_COMPRESS_PLAYBACK = 0,
SND_COMPRESS_CAPTURE,
@@ -189,6 +217,7 @@ struct snd_compr_task_status {
* Note: only codec params can be changed runtime and stream params cant be
* SNDRV_COMPRESS_GET_PARAMS: Query codec params
* SNDRV_COMPRESS_TSTAMP: get the current timestamp value
* SNDRV_COMPRESS_TSTAMP64: get the current timestamp value in 64 bit format
* SNDRV_COMPRESS_AVAIL: get the current buffer avail value.
* This also queries the tstamp properties
* SNDRV_COMPRESS_PAUSE: Pause the running stream
@@ -211,6 +240,8 @@ struct snd_compr_task_status {
struct snd_compr_metadata)
#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
#define SNDRV_COMPRESS_TSTAMP64 _IOR('C', 0x22, struct snd_compr_tstamp64)
#define SNDRV_COMPRESS_AVAIL64 _IOR('C', 0x23, struct snd_compr_avail64)
#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
#define SNDRV_COMPRESS_START _IO('C', 0x32)
+40 -1
View File
@@ -43,7 +43,8 @@
#define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
#define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
#define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
#define SND_AUDIOCODEC_OPUS_RAW ((__u32) 0x00000011)
#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_OPUS_RAW
/*
* Profile and modes are listed with bit masks. This allows for a
@@ -324,6 +325,43 @@ struct snd_dec_ape {
__u32 seek_table_present;
} __attribute__((packed, aligned(4)));
/**
* struct snd_dec_opus - Opus decoder parameters (raw opus packets)
* @version: Usually should be '1' but can be split into major (4 upper bits)
* and minor (4 lower bits) sub-fields.
* @num_channels: Number of output channels.
* @pre_skip: Number of samples to discard at 48 kHz.
* @sample_rate: Sample rate of original input.
* @output_gain: Gain to apply when decoding (in Q7.8 format).
* @mapping_family: Order and meaning of output channels. Only values 0 and 1
* are expected; values 2..255 are not recommended for playback.
*
* @chan_map: Optional channel mapping table. Describes mapping of opus streams
* to decoded channels. Fields:
* @chan_map.stream_count: Number of streams encoded in each Ogg packet.
* @chan_map.coupled_count: Number of streams whose decoders are used
* for two channels.
* @chan_map.channel_map: Which decoded channel to be used for each one.
* Supports only mapping families 0 and 1,
* max number of channels is 8.
*
* These options were extracted from RFC7845 Section 5.
*/
struct snd_dec_opus {
__u8 version;
__u8 num_channels;
__u16 pre_skip;
__u32 sample_rate;
__u16 output_gain;
__u8 mapping_family;
struct snd_dec_opus_ch_map {
__u8 stream_count;
__u8 coupled_count;
__u8 channel_map[8];
} chan_map;
} __attribute__((packed, aligned(4)));
union snd_codec_options {
struct snd_enc_wma wma;
struct snd_enc_vorbis vorbis;
@@ -334,6 +372,7 @@ union snd_codec_options {
struct snd_dec_wma wma_d;
struct snd_dec_alac alac_d;
struct snd_dec_ape ape_d;
struct snd_dec_opus opus_d;
struct {
__u32 out_sample_rate;
} src_d;
+15
View File
@@ -133,6 +133,21 @@ enum avs_tplg_token {
AVS_TKN_PATH_FE_FMT_ID_U32 = 1902,
AVS_TKN_PATH_BE_FMT_ID_U32 = 1903,
/* struct avs_tplg_path_template (conditional) */
AVS_TKN_CONDPATH_TMPL_ID_U32 = 1801,
AVS_TKN_CONDPATH_TMPL_SOURCE_TPLG_NAME_STRING = 2002,
AVS_TKN_CONDPATH_TMPL_SOURCE_PATH_TMPL_ID_U32 = 2003,
AVS_TKN_CONDPATH_TMPL_SINK_TPLG_NAME_STRING = 2004,
AVS_TKN_CONDPATH_TMPL_SINK_PATH_TMPL_ID_U32 = 2005,
AVS_TKN_CONDPATH_TMPL_COND_TYPE_U32 = 2006,
AVS_TKN_CONDPATH_TMPL_OVERRIDABLE_BOOL = 2007,
AVS_TKN_CONDPATH_TMPL_PRIORITY_U8 = 2008,
/* struct avs_tplg_path (conditional) */
AVS_TKN_CONDPATH_ID_U32 = 1901,
AVS_TKN_CONDPATH_SOURCE_PATH_ID_U32 = 2102,
AVS_TKN_CONDPATH_SINK_PATH_ID_U32 = 2103,
/* struct avs_tplg_pin_format */
AVS_TKN_PIN_FMT_INDEX_U32 = 2201,
AVS_TKN_PIN_FMT_IOBS_U32 = 2202,
+18 -2
View File
@@ -3,6 +3,8 @@
#ifndef __SND_AR_TOKENS_H__
#define __SND_AR_TOKENS_H__
#include <linux/types.h>
#define APM_SUB_GRAPH_PERF_MODE_LOW_POWER 0x1
#define APM_SUB_GRAPH_PERF_MODE_LOW_LATENCY 0x2
@@ -118,6 +120,12 @@ enum ar_event_types {
* LPAIF_WSA = 2,
* LPAIF_VA = 3,
* LPAIF_AXI = 4
* Possible values for MI2S
* I2S_INTF_TYPE_PRIMARY = 0,
* I2S_INTF_TYPE_SECONDARY = 1,
* I2S_INTF_TYPE_TERTIARY = 2,
* I2S_INTF_TYPE_QUATERNARY = 3,
* I2S_INTF_TYPE_QUINARY = 4,
*
* %AR_TKN_U32_MODULE_FMT_INTERLEAVE: PCM Interleaving
* PCM_INTERLEAVED = 1,
@@ -184,8 +192,8 @@ enum ar_event_types {
#define AR_TKN_U32_MODULE_INSTANCE_ID 201
#define AR_TKN_U32_MODULE_MAX_IP_PORTS 202
#define AR_TKN_U32_MODULE_MAX_OP_PORTS 203
#define AR_TKN_U32_MODULE_IN_PORTS 204
#define AR_TKN_U32_MODULE_OUT_PORTS 205
#define AR_TKN_U32_MODULE_IN_PORTS 204 /* deprecated */
#define AR_TKN_U32_MODULE_OUT_PORTS 205 /* deprecated */
#define AR_TKN_U32_MODULE_SRC_OP_PORT_ID 206
#define AR_TKN_U32_MODULE_DST_IN_PORT_ID 207
#define AR_TKN_U32_MODULE_SRC_INSTANCE_ID 208
@@ -232,4 +240,12 @@ enum ar_event_types {
#define AR_TKN_U32_MODULE_LOG_TAP_POINT_ID 260
#define AR_TKN_U32_MODULE_LOG_MODE 261
#define SND_SOC_AR_TPLG_MODULE_CFG_TYPE 0x01001006
struct audioreach_module_priv_data {
__le32 size; /* size in bytes of the array, including all elements */
__le32 type; /* SND_SOC_AR_TPLG_MODULE_CFG_TYPE */
__le32 priv[2]; /* Private data for future expansion */
__le32 data[0]; /* config data */
};
#endif /* __SND_AR_TOKENS_H__ */
+2
View File
@@ -106,6 +106,8 @@
*/
#define SOF_TKN_COMP_NO_WNAME_IN_KCONTROL_NAME 417
#define SOF_TKN_COMP_SCHED_DOMAIN 418
/* SSP */
#define SOF_TKN_INTEL_SSP_CLKS_CONTROL 500
#define SOF_TKN_INTEL_SSP_MCLK_ID 501