# Class definition for output pin audio format object # audio_format objects can be instantiated as: # # Object.Base.output_audio_format."0" { # out_rate 48000 # out_sample_container_size 16 # out_valid_bit_depth 16 # out_interleaving_style "interleaved" # } # Class.Base."output_audio_format" { DefineAttribute."instance" { } DefineAttribute."pin_index" { # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" } # output sampling rate DefineAttribute."out_rate" { # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" } # output bit depth DefineAttribute."out_bit_depth" { # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" } # output valid bit depth DefineAttribute."out_valid_bit_depth" { # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" } # output channel count DefineAttribute."out_channels" { # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" constraints { min 1 max 8 } } # output channel map DefineAttribute."out_ch_map" { # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" } # output channel config DefineAttribute."out_ch_cfg" { # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" } # output interleaving style DefineAttribute."out_interleaving_style" { type "string" # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" constraints { !valid_values [ "interleaved" "non-interleaved" ] !tuple_values [ 0 1 ] } } # output format config DefineAttribute."out_fmt_cfg" { # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" } # # output buffer size # DefineAttribute."obs" { # Token set reference name and type token_ref "sof_tkn_cavs_audio_format.word" } #output sample_type DefineAttribute."out_sample_type" { type string # Token set reference name token_ref "sof_tkn_cavs_audio_format.word" constraints { !valid_values [ $SAMPLE_TYPE_MSB_INTEGER $SAMPLE_TYPE_LSB_INTEGER $SAMPLE_TYPE_SIGNED_INTEGER $SAMPLE_TYPE_UNSIGNED_INTEGER $SAMPLE_TYPE_FLOAT ] } } attributes { !constructor [ "instance" ] # # output_audio_format objects instantiated within the same alsaconf node must have # unique instance attribute values # unique "instance" } out_rate 48000 out_bit_depth 16 out_valid_bit_depth 16 out_channels 2 out_interleaving_style "interleaved" out_sample_type $SAMPLE_TYPE_MSB_INTEGER out_ch_cfg $CHANNEL_CONFIG_STEREO out_ch_map $CHANNEL_MAP_STEREO # math expression for computing output fmt_cfg out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256)) | ($out_sample_type * 65536)]" # math expression for computing input/put buffer sizes # for 11.025 22.05, 44.1, 88.2 and 176.4khz, we need to round it to ceiling value obs "$[($out_channels * ($[($out_rate + 999)] / 1000)) * ($out_bit_depth / 8)]" }