topology: Parse flags for PCM

Users can define flags by both text conf file and C API.
Add flags and flag_mask to C API template of PCM object.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Mengdong Lin 2016-11-04 07:07:06 +08:00 committed by Takashi Iwai
parent f94ed5cf75
commit b398ed4058
2 changed files with 56 additions and 0 deletions

View file

@ -607,6 +607,11 @@ extern "C" {
* "config3"
* ]
* }
*
* # Optional boolean flags
* symmetric_rates "true"
* symmetric_channels "true"
* symmetric_sample_bits "false"
* }
* </pre>
*
@ -894,6 +899,8 @@ struct snd_tplg_pcm_template {
unsigned int capture; /*!< supports capture mode */
unsigned int compress; /*!< 1 = compressed; 0 = PCM */
struct snd_tplg_stream_caps_template *caps[2]; /*!< playback & capture for DAI */
unsigned int flag_mask; /*!< bitmask of flags to configure */
unsigned int flags; /*!< flag value SND_SOC_TPLG_LNK_FLGBIT_* */
int num_streams; /*!< number of supported configs */
struct snd_tplg_stream_template stream[0]; /*!< supported configs */
};