mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:25:43 +01:00
topology: pre-process-dai: add support for PCM and BE DAI objects
Add support for pre-processing PCM and BE DAI objects: Object.PCM.pcm."0" { name "Port0" direction "duplex" } will be converted to: SectionPCM.'Port0' {} The capabilities and dai configs will be added those objects are pre-processed. An ex of DAI object would be: Object.Dai.SSP."0" { direction "duplex" stream_name "NoCodec-0" id 0 default_hw_conf_id 0 format "s24le" quirks "lbm_mode" sample_bits 24 } converted to: SectionBE { 'SSP.0.duplex' { id 0 stream_name NoCodec-0 default_hw_conf_id 0 data [ 'SSP.0.duplex.sof_tkn_intel_ssp.word' 'SSP.0.duplex.sof_tkn_dai.word' 'SSP.0.duplex.sof_tkn_dai.string' 'SSP.0.duplex.sof_tkn_intel_ssp.short' ] } Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
758e4dba81
commit
b0be235024
1 changed files with 13 additions and 0 deletions
|
@ -858,6 +858,17 @@ static int tplg_build_generic_object(struct tplg_pre_processor *tplg_pp, snd_con
|
|||
return ret;
|
||||
}
|
||||
|
||||
const struct config_template_items be_dai_config = {
|
||||
.int_config_ids = {"id", "default_hw_conf_id", "symmertic_rates", "symmetric_channels",
|
||||
"symmetric_sample_bits"},
|
||||
.string_config_ids = {"stream_name"},
|
||||
};
|
||||
|
||||
const struct config_template_items pcm_config = {
|
||||
.int_config_ids = {"id", "compress", "symmertic_rates", "symmetric_channels",
|
||||
"symmetric_sample_bits"},
|
||||
};
|
||||
|
||||
const struct config_template_items mixer_control_config = {
|
||||
.int_config_ids = {"index", "max", "invert"},
|
||||
.compound_config_ids = {"access"}
|
||||
|
@ -905,6 +916,8 @@ const struct build_function_map object_build_map[] = {
|
|||
&mixer_control_config},
|
||||
{"Control", "bytes", "SectionControlBytes", &tplg_build_bytes_control,
|
||||
&bytes_control_config},
|
||||
{"Dai", "", "SectionBE", &tplg_build_generic_object, &be_dai_config},
|
||||
{"PCM", "pcm", "SectionPCM", &tplg_build_generic_object, &pcm_config},
|
||||
};
|
||||
|
||||
static const struct build_function_map *tplg_object_get_map(struct tplg_pre_processor *tplg_pp,
|
||||
|
|
Loading…
Reference in a new issue