Skip to content

Add rate and channels to HDA config#2007

Merged
plbossart merged 2 commits intothesofproject:topic/sof-devfrom
bardliao:hda-params
Apr 15, 2020
Merged

Add rate and channels to HDA config#2007
plbossart merged 2 commits intothesofproject:topic/sof-devfrom
bardliao:hda-params

Conversation

@bardliao
Copy link
Collaborator

FW needs to know rate and channels for HDA dai.

This PR should not be merged before #1943

@bardliao bardliao added the ABI involves ABI changes, need extra attention label Apr 13, 2020
Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit-pick below.

plbossart
plbossart previously approved these changes Apr 13, 2020
Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @bardliao please add a reference to the firmware PR so that we merge at the same time - or at least with the same ABI change

slawblauciak
slawblauciak previously approved these changes Apr 14, 2020
@slawblauciak
Copy link

I wonder if we should add the FIFO size, since that is configurable by the kernel. Right now it's probably not needed for anything, but we're already extending the ABI and the FW does propagate the FIFO size information.

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bardliao Code looks good. I think we need to improve the commit messages though. I was a bit late with the SDW patches, but let's do better in these HDA patches. Please see my comments and proposals inline.

@@ -3064,7 +3064,7 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index,
config->hdr.size = size;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bardliao Can you add a mention in commit message that as "hda_tokens" array was empty, this error has been harmless.

#define SOF_TKN_MUTE_LED_USE 1300
#define SOF_TKN_MUTE_LED_DIRECTION 1301

/* HDA */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in summary line: rate amd channels -> rate and channels

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether it makes sense to keep 2nd and 3rd patches separate. The first one doesn't really make much sense on its own. And I don't think it's worth having the same explanation again in this commit, on why this is done.

If you keep these separate, maybe something more useful to commit description than
"FW needs to know rate and channels."
Maybe just add "Added support for rate and channel tokens for HDA DAI. Added in topology interface 3.16."

Items in hda_tokens are for &config->hda. So fix it to the right
object. This error has been harmless as hda_tokens array was empty.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
FW interface for HDA DAI parameters was extended with information on
sampling rate and channel count in version 3.16. Align kernel header
with the FW change. This change is backwards compatible. Old firmware
will ignore the values.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
@bardliao
Copy link
Collaborator Author

Thanks @kv2019i , PR updated

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bardliao Great, thanks, look good now!

Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @bardliao

@plbossart plbossart merged commit f9b8747 into thesofproject:topic/sof-dev Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ABI involves ABI changes, need extra attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants