ASoC: SOF: Add asynchronous sample rate converter topology support
This patch adds into SOF topology the handling of ASRC DAPM type, adds the tokens to configure the ASRC, and implement component IPC into the driver. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191210004854.16845-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

committed by
Mark Brown

parent
d612b455f1
commit
433363e779
@@ -36,6 +36,7 @@ enum sof_comp_type {
|
||||
SOF_COMP_KPB, /* A key phrase buffer component */
|
||||
SOF_COMP_SELECTOR, /**< channel selector component */
|
||||
SOF_COMP_DEMUX,
|
||||
SOF_COMP_ASRC, /**< Asynchronous sample rate converter */
|
||||
/* keep FILEREAD/FILEWRITE as the last ones */
|
||||
SOF_COMP_FILEREAD = 10000, /**< host test based file IO */
|
||||
SOF_COMP_FILEWRITE = 10001, /**< host test based file IO */
|
||||
@@ -147,6 +148,32 @@ struct sof_ipc_comp_src {
|
||||
uint32_t rate_mask; /**< SOF_RATE_ supported rates */
|
||||
} __packed;
|
||||
|
||||
/* generic ASRC component */
|
||||
struct sof_ipc_comp_asrc {
|
||||
struct sof_ipc_comp comp;
|
||||
struct sof_ipc_comp_config config;
|
||||
/* either source or sink rate must be non zero */
|
||||
uint32_t source_rate; /**< Define fixed source rate or */
|
||||
/**< use 0 to indicate need to get */
|
||||
/**< the rate from stream */
|
||||
uint32_t sink_rate; /**< Define fixed sink rate or */
|
||||
/**< use 0 to indicate need to get */
|
||||
/**< the rate from stream */
|
||||
uint32_t asynchronous_mode; /**< synchronous 0, asynchronous 1 */
|
||||
/**< When 1 the ASRC tracks and */
|
||||
/**< compensates for drift. */
|
||||
uint32_t operation_mode; /**< push 0, pull 1, In push mode the */
|
||||
/**< ASRC consumes a defined number */
|
||||
/**< of frames at input, with varying */
|
||||
/**< number of frames at output. */
|
||||
/**< In pull mode the ASRC outputs */
|
||||
/**< a defined number of frames while */
|
||||
/**< number of input frames varies. */
|
||||
|
||||
/* reserved for future use */
|
||||
uint32_t reserved[4];
|
||||
} __attribute__((packed));
|
||||
|
||||
/* generic MUX component */
|
||||
struct sof_ipc_comp_mux {
|
||||
struct sof_ipc_comp comp;
|
||||
|
Reference in New Issue
Block a user