-
Notifications
You must be signed in to change notification settings - Fork 140
Add rate and channels to HDA config #2007
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,4 +130,8 @@ | |
| #define SOF_TKN_INTEL_ALH_RATE 1400 | ||
| #define SOF_TKN_INTEL_ALH_CH 1401 | ||
|
|
||
| /* HDA */ | ||
|
Collaborator
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. Typo in summary line: rate amd channels -> rate and channels
Collaborator
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. 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 |
||
| #define SOF_TKN_INTEL_HDA_RATE 1500 | ||
| #define SOF_TKN_INTEL_HDA_CH 1501 | ||
|
|
||
| #endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -753,6 +753,12 @@ static const struct sof_topology_token dmic_pdm_tokens[] = { | |
|
|
||
| /* HDA */ | ||
| static const struct sof_topology_token hda_tokens[] = { | ||
| {SOF_TKN_INTEL_HDA_RATE, | ||
| SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32, | ||
| offsetof(struct sof_ipc_dai_hda_params, rate), 0}, | ||
| {SOF_TKN_INTEL_HDA_CH, | ||
| SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32, | ||
| offsetof(struct sof_ipc_dai_hda_params, channels), 0}, | ||
| }; | ||
|
|
||
| /* Leds */ | ||
|
|
@@ -3101,7 +3107,7 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index, | |
| config->hdr.size = size; | ||
|
Collaborator
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. @bardliao Can you add a mention in commit message that as "hda_tokens" array was empty, this error has been harmless. |
||
|
|
||
| /* get any bespoke DAI tokens */ | ||
| ret = sof_parse_tokens(scomp, config, hda_tokens, | ||
| ret = sof_parse_tokens(scomp, &config->hda, hda_tokens, | ||
plbossart marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ARRAY_SIZE(hda_tokens), private->array, | ||
| le32_to_cpu(private->size)); | ||
| if (ret != 0) { | ||
|
|
@@ -3110,6 +3116,9 @@ static int sof_link_hda_load(struct snd_soc_component *scomp, int index, | |
| return ret; | ||
| } | ||
|
|
||
| dev_dbg(scomp->dev, "HDA config rate %d channels %d\n", | ||
| config->hda.rate, config->hda.channels); | ||
|
|
||
| dai = snd_soc_find_dai(link->cpus); | ||
| if (!dai) { | ||
| dev_err(scomp->dev, "error: failed to find dai %s in %s", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.