Pull sound updates from Takashi Iwai: "No dramatic changes are found in this development cycle, but as usual, many commits are applied in a wide range of drivers. Most of big changes are in ASoC, where a few bits of framework work and quite a lot of cleanups and improvements to existing code have been done. The rest are usual stuff, a few HD-audio and USB-audio quirks and fixes, as well as the drop of kthread usages in the whole subsystem. Below are some highlights: ASoC: - support for stereo DAPM controls - some initial work on the of-graph sound card - regmap conversions of the remaining AC'97 drivers - a new version of the topology ABI; this should be backward compatible - updates / cleanups of rsnd, sunxi, sti, nau8825, samsung, arizona, Intel skylake, atom-sst - new drivers for Cirrus Logic CS42L42, Qualcomm MSM8916-WCD, and Realtek RT5665 USB-audio: - yet another race fix at disconnection - tolerated packet size calculation for some Android devices - quirks for Axe-Fx II, QuickCam, TEAC 501/503 HD-audio: - improvement of Dell pin fixup mapping - quirks for HP Z1 Gen3, Alienware 15 R2 2016 and ALC622 headset mic Misc: - replace all kthread usages with simple works" * tag 'sound-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (296 commits) ALSA: hiface: Fix M2Tech hiFace driver sampling rate change ALSA: usb-audio: Eliminate noise at the start of DSD playback. ALSA: usb-audio: Add native DSD support for TEAC 501/503 DAC ASoC: wm_adsp: wm_adsp_buf_alloc should use kfree in error path ASoC: topology: avoid uninitialized kcontrol_type ALSA: usb-audio: Add QuickCam Communicate Deluxe/S7500 to volume_control_quirks ALSA: usb-audio: add implicit fb quirk for Axe-Fx II ASoC: zte: spdif: correct ZX_SPDIF_CLK_RAT define ASoC: zte: spdif and i2s drivers are not zx296702 specific ASoC: rsnd: setup BRGCKR/BRRA/BRRB when starting ASoC: rsnd: enable/disable ADG when suspend/resume timing ASoC: rsnd: tidyup ssi->usrcnt counter check in hw_params ALSA: cs46xx: add a new line ASoC: Intel: update bxt_da7219_max98357a to support quad ch dmic capture ASoC: nau8825: disable sinc filter for high THD of ADC ALSA: usb-audio: more tolerant packetsize ALSA: usb-audio: avoid setting of sample rate multiple times on bus ASoC: cs35l34: Simplify the logic to set CS35L34_MCLK_CTL setting ALSA: hda - Gate the mic jack on HP Z1 Gen3 AiO ALSA: hda: when comparing pin configurations, ignore assoc in addition to seq ...
Showing the changes to include/uapi (2 of 269 files). Show all
Unified · Split
| @@ -33,6 +33,11 @@ · 32 unmodified lines | ||
| 33 | 33 | */ |
| 34 | 34 | #define SND_SOC_TPLG_STREAM_CONFIG_MAX 8 |
| 35 | 35 | |
| 36 | +/* | |
| 37 | + * Maximum number of physical link's hardware configs | |
| 38 | + */ | |
| 39 | +#define SND_SOC_TPLG_HW_CONFIG_MAX 8 | |
| 40 | + | |
| 36 | 41 | /* individual kcontrol info types - can be mixed with other types */ |
| 37 | 42 | #define SND_SOC_TPLG_CTL_VOLSW 1 |
| 38 | 43 | #define SND_SOC_TPLG_CTL_VOLSW_SX 2 |
| @@ -77,7 +82,8 @@ · 38 unmodified lines | ||
| 77 | 82 | #define SND_SOC_TPLG_NUM_TEXTS 16 |
| 78 | 83 | |
| 79 | 84 | /* ABI version */ |
| 80 | −#define SND_SOC_TPLG_ABI_VERSION 0x5 | |
| 85 | +#define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */ | |
| 86 | +#define SND_SOC_TPLG_ABI_VERSION_MIN 0x4 /* oldest version supported */ | |
| 81 | 87 | |
| 82 | 88 | /* Max size of TLV data */ |
| 83 | 89 | #define SND_SOC_TPLG_TLV_SIZE 32 |
| @@ -99,8 +105,8 @@ · 15 unmodified lines | ||
| 99 | 105 | #define SND_SOC_TPLG_TYPE_CODEC_LINK 9 |
| 100 | 106 | #define SND_SOC_TPLG_TYPE_BACKEND_LINK 10 |
| 101 | 107 | #define SND_SOC_TPLG_TYPE_PDATA 11 |
| 102 | −#define SND_SOC_TPLG_TYPE_BE_DAI 12 | |
| 103 | −#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_BE_DAI | |
| 108 | +#define SND_SOC_TPLG_TYPE_DAI 12 | |
| 109 | +#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_DAI | |
| 104 | 110 | |
| 105 | 111 | /* vendor block IDs - please add new vendor types to end */ |
| 106 | 112 | #define SND_SOC_TPLG_TYPE_VENDOR_FW 1000 |
| @@ -119,11 +125,32 @@ · 12 unmodified lines | ||
| 119 | 125 | #define SND_SOC_TPLG_TUPLE_TYPE_WORD 4 |
| 120 | 126 | #define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5 |
| 121 | 127 | |
| 122 | −/* BE DAI flags */ | |
| 128 | +/* DAI flags */ | |
| 123 | 129 | #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0) |
| 124 | 130 | #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) |
| 125 | 131 | #define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) |
| 126 | 132 | |
| 133 | +/* DAI physical PCM data formats. | |
| 134 | + * Add new formats to the end of the list. | |
| 135 | + */ | |
| 136 | +#define SND_SOC_DAI_FORMAT_I2S 1 /* I2S mode */ | |
| 137 | +#define SND_SOC_DAI_FORMAT_RIGHT_J 2 /* Right Justified mode */ | |
| 138 | +#define SND_SOC_DAI_FORMAT_LEFT_J 3 /* Left Justified mode */ | |
| 139 | +#define SND_SOC_DAI_FORMAT_DSP_A 4 /* L data MSB after FRM LRC */ | |
| 140 | +#define SND_SOC_DAI_FORMAT_DSP_B 5 /* L data MSB during FRM LRC */ | |
| 141 | +#define SND_SOC_DAI_FORMAT_AC97 6 /* AC97 */ | |
| 142 | +#define SND_SOC_DAI_FORMAT_PDM 7 /* Pulse density modulation */ | |
| 143 | + | |
| 144 | +/* left and right justified also known as MSB and LSB respectively */ | |
| 145 | +#define SND_SOC_DAI_FORMAT_MSB SND_SOC_DAI_FORMAT_LEFT_J | |
| 146 | +#define SND_SOC_DAI_FORMAT_LSB SND_SOC_DAI_FORMAT_RIGHT_J | |
| 147 | + | |
| 148 | +/* DAI link flags */ | |
| 149 | +#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0) | |
| 150 | +#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) | |
| 151 | +#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) | |
| 152 | +#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3) | |
| 153 | + | |
| 127 | 154 | /* |
| 128 | 155 | * Block Header. |
| 129 | 156 | * This header precedes all object and object arrays below. |
| @@ -267,6 +294,35 @@ struct snd_soc_tplg_stream { · 137 unmodified lines | ||
| 267 | 294 | __le32 channels; /* channels */ |
| 268 | 295 | } __attribute__((packed)); |
| 269 | 296 | |
| 297 | + | |
| 298 | +/* | |
| 299 | + * Describes a physical link's runtime supported hardware config, | |
| 300 | + * i.e. hardware audio formats. | |
| 301 | + */ | |
| 302 | +struct snd_soc_tplg_hw_config { | |
| 303 | + __le32 size; /* in bytes of this structure */ | |
| 304 | + __le32 id; /* unique ID - - used to match */ | |
| 305 | + __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */ | |
| 306 | + __u8 clock_gated; /* 1 if clock can be gated to save power */ | |
| 307 | + __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */ | |
| 308 | + __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */ | |
| 309 | + __u8 bclk_master; /* 1 for master of BCLK, 0 for slave */ | |
| 310 | + __u8 fsync_master; /* 1 for master of FSYNC, 0 for slave */ | |
| 311 | + __u8 mclk_direction; /* 0 for input, 1 for output */ | |
| 312 | + __le16 reserved; /* for 32bit alignment */ | |
| 313 | + __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */ | |
| 314 | + __le32 bclk_rate; /* BCLK freqency in Hz */ | |
| 315 | + __le32 fsync_rate; /* frame clock in Hz */ | |
| 316 | + __le32 tdm_slots; /* number of TDM slots in use */ | |
| 317 | + __le32 tdm_slot_width; /* width in bits for each slot */ | |
| 318 | + __le32 tx_slots; /* bit mask for active Tx slots */ | |
| 319 | + __le32 rx_slots; /* bit mask for active Rx slots */ | |
| 320 | + __le32 tx_channels; /* number of Tx channels */ | |
| 321 | + __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ | |
| 322 | + __le32 rx_channels; /* number of Rx channels */ | |
| 323 | + __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ | |
| 324 | +} __attribute__((packed)); | |
| 325 | + | |
| 270 | 326 | /* |
| 271 | 327 | * Manifest. List totals for each payload type. Not used in parsing, but will |
| 272 | 328 | * be passed to the component driver before any other objects in order for any |
| @@ -286,7 +342,7 @@ struct snd_soc_tplg_manifest { · 13 unmodified lines | ||
| 286 | 342 | __le32 graph_elems; /* number of graph elements */ |
| 287 | 343 | __le32 pcm_elems; /* number of PCM elements */ |
| 288 | 344 | __le32 dai_link_elems; /* number of DAI link elements */ |
| 289 | − __le32 be_dai_elems; /* number of BE DAI elements */ | |
| 345 | + __le32 dai_elems; /* number of physical DAI elements */ | |
| 290 | 346 | __le32 reserved[20]; /* reserved for new ABI element types */ |
| 291 | 347 | struct snd_soc_tplg_private priv; |
| 292 | 348 | } __attribute__((packed)); |
| @@ -434,13 +490,16 @@ struct snd_soc_tplg_pcm { · 141 unmodified lines | ||
| 434 | 490 | struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ |
| 435 | 491 | __le32 num_streams; /* number of streams */ |
| 436 | 492 | struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ |
| 493 | + __le32 flag_mask; /* bitmask of flags to configure */ | |
| 494 | + __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ | |
| 495 | + struct snd_soc_tplg_private priv; | |
| 437 | 496 | } __attribute__((packed)); |
| 438 | 497 | |
| 439 | 498 | |
| 440 | 499 | /* |
| 441 | − * Describes the BE or CC link runtime supported configs or params | |
| 500 | + * Describes the physical link runtime supported configs or params | |
| 442 | 501 | * |
| 443 | − * File block representation for BE/CC link config :- | |
| 502 | + * File block representation for physical link config :- | |
| 444 | 503 | * +-----------------------------------+-----+ |
| 445 | 504 | * | struct snd_soc_tplg_hdr | 1 | |
| 446 | 505 | * +-----------------------------------+-----+ |
| @@ -450,21 +509,30 @@ struct snd_soc_tplg_pcm { · 3 unmodified lines | ||
| 450 | 509 | struct snd_soc_tplg_link_config { |
| 451 | 510 | __le32 size; /* in bytes of this structure */ |
| 452 | 511 | __le32 id; /* unique ID - used to match */ |
| 512 | + char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ | |
| 513 | + char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used to match */ | |
| 453 | 514 | struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ |
| 454 | 515 | __le32 num_streams; /* number of streams */ |
| 516 | + struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */ | |
| 517 | + __le32 num_hw_configs; /* number of hw configs */ | |
| 518 | + __le32 default_hw_config_id; /* default hw config ID for init */ | |
| 519 | + __le32 flag_mask; /* bitmask of flags to configure */ | |
| 520 | + __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ | |
| 521 | + struct snd_soc_tplg_private priv; | |
| 455 | 522 | } __attribute__((packed)); |
| 456 | 523 | |
| 457 | 524 | /* |
| 458 | − * Describes SW/FW specific features of BE DAI. | |
| 525 | + * Describes SW/FW specific features of physical DAI. | |
| 526 | + * It can be used to configure backend DAIs for DPCM. | |
| 459 | 527 | * |
| 460 | − * File block representation for BE DAI :- | |
| 528 | + * File block representation for physical DAI :- | |
| 461 | 529 | * +-----------------------------------+-----+ |
| 462 | 530 | * | struct snd_soc_tplg_hdr | 1 | |
| 463 | 531 | * +-----------------------------------+-----+ |
| 464 | − * | struct snd_soc_tplg_be_dai | N | | |
| 532 | + * | struct snd_soc_tplg_dai | N | | |
| 465 | 533 | * +-----------------------------------+-----+ |
| 466 | 534 | */ |
| 467 | −struct snd_soc_tplg_be_dai { | |
| 535 | +struct snd_soc_tplg_dai { | |
| 468 | 536 | __le32 size; /* in bytes of this structure */ |
| 469 | 537 | char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ |
| 470 | 538 | __le32 dai_id; /* unique ID - used to match */ |
| @@ -157,6 +157,10 @@ · 156 unmodified lines | ||
| 157 | 157 | * |
| 158 | 158 | * %SKL_TKN_STR_LIB_NAME: Specifies the library name |
| 159 | 159 | * |
| 160 | + * %SKL_TKN_U32_PMODE: Specifies the power mode for pipe | |
| 161 | + * | |
| 162 | + * %SKL_TKL_U32_D0I3_CAPS: Specifies the D0i3 capability for module | |
| 163 | + * | |
| 160 | 164 | * module_id and loadable flags dont have tokens as these values will be |
| 161 | 165 | * read from the DSP FW manifest |
| 162 | 166 | */ |
| @@ -208,7 +212,9 @@ enum SKL_TKNS { · 45 unmodified lines | ||
| 208 | 212 | SKL_TKN_U32_PROC_DOMAIN, |
| 209 | 213 | SKL_TKN_U32_LIB_COUNT, |
| 210 | 214 | SKL_TKN_STR_LIB_NAME, |
| 211 | − SKL_TKN_MAX = SKL_TKN_STR_LIB_NAME, | |
| 215 | + SKL_TKN_U32_PMODE, | |
| 216 | + SKL_TKL_U32_D0I3_CAPS, | |
| 217 | + SKL_TKN_MAX = SKL_TKL_U32_D0I3_CAPS, | |
| 212 | 218 | }; |
| 213 | 219 | |
| 214 | 220 | #endif |