Skip to content
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

Support a larger range of amp feedback channel counts #9624

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

rfvirgil
Copy link
Contributor

These two patches expand the possible combinations of feedback channel count and number of links.

It has been tested on these combinations:

1 bus, 2 amps, 1 fb channel per amp, total 2 channels
1 bus, 2 amps, 2 fb channel per amp, total 4 channels
1 bus, 4 amps, 1 fb channel per amp, total 4 channels

2 buses, 1 amp per bus, 1 fb channel per amp, total 2 channels
2 buses, 1 amp per bus, 2 fb channel per amp, total 4 channels
2 buses, 1 amp per bus, 4 fb channel per amp, total 8 channels
2 buses, 2 amp per bus, 1 fb channel per amp, total 4 channels
2 buses, 2 amp per bus, 2 fb channel per amp, total 8 channels
2 buses, 3 amp per bus, 1 fb channel per amp, total 6 channels
2 buses, 4 amp per bus, 1 fb channel per amp, total 8 channels

Replace the hardcoded assumption of 2 feedback channels per link

A new constant AMP_FEEDBACK_CH_PER_LINK is added to set the number of
channels for the link BE DAI, replacing the original hardcoded value
of 2.

The default values are:
  For NUM_SDW_AMP_LINKS=1:
    AMP_FEEDBACK_CH=2, AMP_FEEDBACK_CH_PER_LINK=2

  For NUM_SDW_AMP_LINKS=2:
    AMP_FEEDBACK_CH=4, AMP_FEEDBACK_CH_PER_LINK=2

The alh-copier definition has been rewritten so that it is based only on
AMP_FEEDBACK_CH, instead of making assumptions from NUM_SDW_AMP_LINKS.
It supports 2 or 4 total feedback channels. Support for 1 and 3 feedback
channels has not been included because these are unusual and the code is
smaller without them. They can be added later if they are needed.

Signed-off-by: Richard Fitzgerald <[email protected]>
Add support for 6 channel and 8 channel amp feedback.

The host-copier defaults provide 2 channel stereo and 4 channel 3.1.
Use the value of AMP_FEEDBACK_CH to set special case input and output
formats for 6 channels and 8 channels.

The alh-copier also needs special cases for 6 and 8 channels.

Signed-off-by: Richard Fitzgerald <[email protected]>
@lgirdwood
Copy link
Member

@bardliao pls review

@lgirdwood lgirdwood merged commit 808eacd into thesofproject:main Oct 30, 2024
44 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants