aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/uapi/sound/asoc.h31
-rw-r--r--sound/soc/soc-topology.c4
2 files changed, 17 insertions, 18 deletions
diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 247c50bd60f0..2aa081ca95c1 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -83,7 +83,7 @@
83#define SND_SOC_TPLG_NUM_TEXTS 16 83#define SND_SOC_TPLG_NUM_TEXTS 16
84 84
85/* ABI version */ 85/* ABI version */
86#define SND_SOC_TPLG_ABI_VERSION 0x3 86#define SND_SOC_TPLG_ABI_VERSION 0x4
87 87
88/* Max size of TLV data */ 88/* Max size of TLV data */
89#define SND_SOC_TPLG_TLV_SIZE 32 89#define SND_SOC_TPLG_TLV_SIZE 32
@@ -378,30 +378,29 @@ struct snd_soc_tplg_dapm_widget {
378 */ 378 */
379} __attribute__((packed)); 379} __attribute__((packed));
380 380
381struct snd_soc_tplg_pcm_cfg_caps {
382 struct snd_soc_tplg_stream_caps caps;
383 struct snd_soc_tplg_stream_config configs[SND_SOC_TPLG_STREAM_CONFIG_MAX];
384 __le32 num_configs; /* number of configs */
385} __attribute__((packed));
386 381
387/* 382/*
388 * Describes SW/FW specific features of PCM or DAI link. 383 * Describes SW/FW specific features of PCM (FE DAI & DAI link).
389 * 384 *
390 * File block representation for PCM/DAI-Link :- 385 * File block representation for PCM :-
391 * +-----------------------------------+-----+ 386 * +-----------------------------------+-----+
392 * | struct snd_soc_tplg_hdr | 1 | 387 * | struct snd_soc_tplg_hdr | 1 |
393 * +-----------------------------------+-----+ 388 * +-----------------------------------+-----+
394 * | struct snd_soc_tplg_dapm_pcm_dai | N | 389 * | struct snd_soc_tplg_pcm | N |
395 * +-----------------------------------+-----+ 390 * +-----------------------------------+-----+
396 */ 391 */
397struct snd_soc_tplg_pcm_dai { 392struct snd_soc_tplg_pcm {
398 __le32 size; /* in bytes of this structure */ 393 __le32 size; /* in bytes of this structure */
399 char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; 394 char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
400 __le32 id; /* unique ID - used to match */ 395 char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
401 __le32 playback; /* supports playback mode */ 396 __le32 pcm_id; /* unique ID - used to match */
402 __le32 capture; /* supports capture mode */ 397 __le32 dai_id; /* unique ID - used to match */
403 __le32 compress; /* 1 = compressed; 0 = PCM */ 398 __le32 playback; /* supports playback mode */
404 struct snd_soc_tplg_pcm_cfg_caps capconf[2]; /* capabilities and configs */ 399 __le32 capture; /* supports capture mode */
400 __le32 compress; /* 1 = compressed; 0 = PCM */
401 struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */
402 __le32 num_streams; /* number of streams */
403 struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */
405} __attribute__((packed)); 404} __attribute__((packed));
406 405
407#endif 406#endif
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 69d01cd925ce..8d7ec80af51b 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1558,7 +1558,7 @@ static int soc_tplg_pcm_dai_elems_load(struct soc_tplg *tplg,
1558 pcm_dai = (struct snd_soc_tplg_pcm_dai *)tplg->pos; 1558 pcm_dai = (struct snd_soc_tplg_pcm_dai *)tplg->pos;
1559 1559
1560 if (soc_tplg_check_elem_count(tplg, 1560 if (soc_tplg_check_elem_count(tplg,
1561 sizeof(struct snd_soc_tplg_pcm_dai), count, 1561 sizeof(struct snd_soc_tplg_pcm), count,
1562 hdr->payload_size, "PCM DAI")) { 1562 hdr->payload_size, "PCM DAI")) {
1563 dev_err(tplg->dev, "ASoC: invalid count %d for PCM DAI elems\n", 1563 dev_err(tplg->dev, "ASoC: invalid count %d for PCM DAI elems\n",
1564 count); 1564 count);
@@ -1566,7 +1566,7 @@ static int soc_tplg_pcm_dai_elems_load(struct soc_tplg *tplg,
1566 } 1566 }
1567 1567
1568 dev_dbg(tplg->dev, "ASoC: adding %d PCM DAIs\n", count); 1568 dev_dbg(tplg->dev, "ASoC: adding %d PCM DAIs\n", count);
1569 tplg->pos += sizeof(struct snd_soc_tplg_pcm_dai) * count; 1569 tplg->pos += sizeof(struct snd_soc_tplg_pcm) * count;
1570 1570
1571 dobj = kzalloc(sizeof(struct snd_soc_dobj), GFP_KERNEL); 1571 dobj = kzalloc(sizeof(struct snd_soc_dobj), GFP_KERNEL);
1572 if (dobj == NULL) 1572 if (dobj == NULL)