Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 367
Prepare for modules with multiple input/output pins#7014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| # Class definition for sink pin audio format object | ||
| # audio_format objects can be instantiated as: | ||
| # | ||
| # Object.Base.sink_audio_format."0" { | ||
| # in_rate 48000 | ||
| # in_sample_container_size 16 | ||
| # in_valid_bit_depth 16 | ||
| # in_interleaving_style "interleaved" | ||
| # } | ||
| # | ||
| Class.Base."sink_audio_format" { | ||
| DefineAttribute."instance" { | ||
| } | ||
| DefineAttribute."pin_index" { | ||
| # Token set reference name | ||
| token_ref "sof_tkn_cavs_audio_format.word" | ||
| } | ||
| # input sampling rate | ||
| DefineAttribute."in_rate" { | ||
| # Token set reference name | ||
| token_ref "sof_tkn_cavs_audio_format.word" | ||
| } | ||
| # input bit depth | ||
| DefineAttribute."in_bit_depth" { | ||
| # Token set reference name | ||
| token_ref "sof_tkn_cavs_audio_format.word" | ||
| } | ||
| # input valid bit depth | ||
| DefineAttribute."in_valid_bit_depth" { | ||
| # Token set reference name | ||
| token_ref "sof_tkn_cavs_audio_format.word" | ||
| } | ||
| # input channel count | ||
| DefineAttribute."in_channels" { | ||
| # Token set reference name | ||
| token_ref "sof_tkn_cavs_audio_format.word" | ||
| constraints { | ||
| min 1 | ||
| max 8 | ||
| } | ||
| } | ||
| # input channel map | ||
| DefineAttribute."in_ch_map" { | ||
| # Token set reference name | ||
| token_ref "sof_tkn_cavs_audio_format.word" | ||
| } | ||
| # input channel config | ||
| DefineAttribute."in_ch_cfg" { | ||
| # Token set reference name | ||
| token_ref "sof_tkn_cavs_audio_format.word" | ||
| } | ||
| # input interleaving style | ||
| DefineAttribute."in_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 | ||
| ] | ||
| } | ||
| } | ||
| # input format config | ||
| DefineAttribute."in_fmt_cfg" { | ||
| # Token set reference name | ||
| token_ref "sof_tkn_cavs_audio_format.word" | ||
| } | ||
| # input sample_type | ||
| DefineAttribute."in_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 | ||
| ] | ||
| } | ||
| } | ||
| # | ||
| # input buffer size | ||
| # | ||
| DefineAttribute."ibs" { | ||
| # Token set reference name and type | ||
| token_ref "sof_tkn_cavs_audio_format.word" | ||
| } | ||
| attributes { | ||
| !constructor [ | ||
| "instance" | ||
| ] | ||
| # | ||
| # audio_format objects instantiated within the same alsaconf node must have unique | ||
| # instance attribute values | ||
| # | ||
| unique "instance" | ||
| } | ||
| in_rate 48000 | ||
| in_bit_depth 16 | ||
| in_valid_bit_depth 16 | ||
| in_channels 2 | ||
| in_interleaving_style "interleaved" | ||
| in_sample_type $SAMPLE_TYPE_MSB_INTEGER | ||
| in_ch_cfg $CHANNEL_CONFIG_STEREO | ||
| in_ch_map $CHANNEL_MAP_STEREO | ||
| # math expression for computing input/output fmt_cfg | ||
| in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256)) | ($in_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 | ||
| ibs "$[($in_channels * ($[($in_rate + 999)] / 1000)) * ($in_bit_depth / 8)]" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| # Class definition for spirce pin audio format object | ||
| # audio_format objects can be instantiated as: | ||
| # | ||
| # Object.Base.source_audio_format."0" { | ||
| # out_rate 48000 | ||
| # out_sample_container_size 16 | ||
| # out_valid_bit_depth 16 | ||
| # out_interleaving_style "interleaved" | ||
| # } | ||
| # | ||
| Class.Base."source_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)]" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -22,6 +22,8 @@ Object.Base.VendorToken { | ||
| # the widget name that the queue is connected from/to. | ||
| sink_pin_binding_wname 413 | ||
| src_pin_binding_wname 414 | ||
| num_sink_audio_formats 415 | ||
| num_source_audio_formats 416 | ||
| } | ||
| "2" { | ||
| @@ -160,6 +162,7 @@ Object.Base.VendorToken { | ||
| in_interleaving_style 1906 | ||
| in_fmt_cfg 1907 | ||
| in_sample_type 1908 | ||
| pin_index 1909 | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this belong in this PR? I don't see the link with input/output CollaboratorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a token needed for the pin_index attributes in the new classes | ||
| # tokens up to 1929 reserved for future use | ||
| out_rate 1930 | ||
| out_bit_depth 1931 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -68,6 +68,8 @@ Class.Widget."wov" { | ||
| !mandatory [ | ||
| "no_pm" | ||
| "uuid" | ||
| "num_sink_audio_formats" | ||
| "num_source_audio_formats" | ||
| ] | ||
| # | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused.
Don't we have support for pins other than index 0? I would thin that they somehow work and somehow they actually get audio format, no?
Isn't the problem lies that we have only one set of audio format definition, which is global for the whole module and for all of it's pins?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ujfalusi we dont. The only audio formats we use today are for pin 0 and always intput and output together in pairs. Clearly this wont work