diff options
author | Guenter Roeck <groeck@chromium.org> | 2018-05-24 15:49:22 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-06-01 13:09:13 -0400 |
commit | 348f48220b97130817de4aa2058569133c5cc051 (patch) | |
tree | 105b995d24a319e0fb104b1e87236fc53789c055 | |
parent | ac9391daac004e12dc4e4c62e130b09f245ece2b (diff) |
ASoC: topology: Move v4 manifest header data structures to uapi
Topology manifest v4 is still part of the ABI. Move its data structures
into the uapi header file.
No functional change.
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | include/uapi/sound/asoc.h | 57 | ||||
-rw-r--r-- | sound/soc/soc-topology.c | 56 |
2 files changed, 57 insertions, 56 deletions
diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h index b901cdbe532a..a74ca232f1fc 100644 --- a/include/uapi/sound/asoc.h +++ b/include/uapi/sound/asoc.h | |||
@@ -573,4 +573,61 @@ struct snd_soc_tplg_dai { | |||
573 | __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */ | 573 | __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */ |
574 | struct snd_soc_tplg_private priv; | 574 | struct snd_soc_tplg_private priv; |
575 | } __attribute__((packed)); | 575 | } __attribute__((packed)); |
576 | |||
577 | /* | ||
578 | * Old version of ABI structs, supported for backward compatibility. | ||
579 | */ | ||
580 | |||
581 | /* Manifest v4 */ | ||
582 | struct snd_soc_tplg_manifest_v4 { | ||
583 | __le32 size; /* in bytes of this structure */ | ||
584 | __le32 control_elems; /* number of control elements */ | ||
585 | __le32 widget_elems; /* number of widget elements */ | ||
586 | __le32 graph_elems; /* number of graph elements */ | ||
587 | __le32 pcm_elems; /* number of PCM elements */ | ||
588 | __le32 dai_link_elems; /* number of DAI link elements */ | ||
589 | struct snd_soc_tplg_private priv; | ||
590 | } __packed; | ||
591 | |||
592 | /* Stream Capabilities v4 */ | ||
593 | struct snd_soc_tplg_stream_caps_v4 { | ||
594 | __le32 size; /* in bytes of this structure */ | ||
595 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
596 | __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ | ||
597 | __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ | ||
598 | __le32 rate_min; /* min rate */ | ||
599 | __le32 rate_max; /* max rate */ | ||
600 | __le32 channels_min; /* min channels */ | ||
601 | __le32 channels_max; /* max channels */ | ||
602 | __le32 periods_min; /* min number of periods */ | ||
603 | __le32 periods_max; /* max number of periods */ | ||
604 | __le32 period_size_min; /* min period size bytes */ | ||
605 | __le32 period_size_max; /* max period size bytes */ | ||
606 | __le32 buffer_size_min; /* min buffer size bytes */ | ||
607 | __le32 buffer_size_max; /* max buffer size bytes */ | ||
608 | } __packed; | ||
609 | |||
610 | /* PCM v4 */ | ||
611 | struct snd_soc_tplg_pcm_v4 { | ||
612 | __le32 size; /* in bytes of this structure */ | ||
613 | char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
614 | char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
615 | __le32 pcm_id; /* unique ID - used to match with DAI link */ | ||
616 | __le32 dai_id; /* unique ID - used to match */ | ||
617 | __le32 playback; /* supports playback mode */ | ||
618 | __le32 capture; /* supports capture mode */ | ||
619 | __le32 compress; /* 1 = compressed; 0 = PCM */ | ||
620 | struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ | ||
621 | __le32 num_streams; /* number of streams */ | ||
622 | struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */ | ||
623 | } __packed; | ||
624 | |||
625 | /* Physical link config v4 */ | ||
626 | struct snd_soc_tplg_link_config_v4 { | ||
627 | __le32 size; /* in bytes of this structure */ | ||
628 | __le32 id; /* unique ID - used to match */ | ||
629 | struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ | ||
630 | __le32 num_streams; /* number of streams */ | ||
631 | } __packed; | ||
632 | |||
576 | #endif | 633 | #endif |
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 3d04fa297677..3fd5d9c867b9 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c | |||
@@ -54,62 +54,6 @@ | |||
54 | #define SOC_TPLG_PASS_START SOC_TPLG_PASS_MANIFEST | 54 | #define SOC_TPLG_PASS_START SOC_TPLG_PASS_MANIFEST |
55 | #define SOC_TPLG_PASS_END SOC_TPLG_PASS_LINK | 55 | #define SOC_TPLG_PASS_END SOC_TPLG_PASS_LINK |
56 | 56 | ||
57 | /* | ||
58 | * Old version of ABI structs, supported for backward compatibility. | ||
59 | */ | ||
60 | |||
61 | /* Manifest v4 */ | ||
62 | struct snd_soc_tplg_manifest_v4 { | ||
63 | __le32 size; /* in bytes of this structure */ | ||
64 | __le32 control_elems; /* number of control elements */ | ||
65 | __le32 widget_elems; /* number of widget elements */ | ||
66 | __le32 graph_elems; /* number of graph elements */ | ||
67 | __le32 pcm_elems; /* number of PCM elements */ | ||
68 | __le32 dai_link_elems; /* number of DAI link elements */ | ||
69 | struct snd_soc_tplg_private priv; | ||
70 | } __packed; | ||
71 | |||
72 | /* Stream Capabilities v4 */ | ||
73 | struct snd_soc_tplg_stream_caps_v4 { | ||
74 | __le32 size; /* in bytes of this structure */ | ||
75 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
76 | __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ | ||
77 | __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ | ||
78 | __le32 rate_min; /* min rate */ | ||
79 | __le32 rate_max; /* max rate */ | ||
80 | __le32 channels_min; /* min channels */ | ||
81 | __le32 channels_max; /* max channels */ | ||
82 | __le32 periods_min; /* min number of periods */ | ||
83 | __le32 periods_max; /* max number of periods */ | ||
84 | __le32 period_size_min; /* min period size bytes */ | ||
85 | __le32 period_size_max; /* max period size bytes */ | ||
86 | __le32 buffer_size_min; /* min buffer size bytes */ | ||
87 | __le32 buffer_size_max; /* max buffer size bytes */ | ||
88 | } __packed; | ||
89 | |||
90 | /* PCM v4 */ | ||
91 | struct snd_soc_tplg_pcm_v4 { | ||
92 | __le32 size; /* in bytes of this structure */ | ||
93 | char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
94 | char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | ||
95 | __le32 pcm_id; /* unique ID - used to match with DAI link */ | ||
96 | __le32 dai_id; /* unique ID - used to match */ | ||
97 | __le32 playback; /* supports playback mode */ | ||
98 | __le32 capture; /* supports capture mode */ | ||
99 | __le32 compress; /* 1 = compressed; 0 = PCM */ | ||
100 | struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ | ||
101 | __le32 num_streams; /* number of streams */ | ||
102 | struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */ | ||
103 | } __packed; | ||
104 | |||
105 | /* Physical link config v4 */ | ||
106 | struct snd_soc_tplg_link_config_v4 { | ||
107 | __le32 size; /* in bytes of this structure */ | ||
108 | __le32 id; /* unique ID - used to match */ | ||
109 | struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ | ||
110 | __le32 num_streams; /* number of streams */ | ||
111 | } __packed; | ||
112 | |||
113 | /* topology context */ | 57 | /* topology context */ |
114 | struct soc_tplg { | 58 | struct soc_tplg { |
115 | const struct firmware *fw; | 59 | const struct firmware *fw; |