forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 133
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
fixup! ASoC: SOF: Intel: hda-dai-ops: fix HDaudio link format #4665
Merged
plbossart
merged 1 commit into
thesofproject:topic/sof-dev
from
plbossart:fix/lnl-nocodec
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,18 +240,24 @@ static unsigned int generic_calc_stream_format(struct snd_sof_dev *sdev, | |
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); | ||
struct snd_soc_dai *codec_dai; | ||
unsigned int format_val; | ||
u32 ch_mask = 0; | ||
u32 ch_mask; | ||
int num_channels; | ||
int codec_dai_id; | ||
|
||
/* | ||
* if the multiple dais are handled by the same dailink, we may need to update the | ||
* stream channel count - the params are modified in soc-pcm based on the codec_ch_maps info | ||
*/ | ||
for_each_rtd_codec_dais(rtd, codec_dai_id, codec_dai) | ||
ch_mask |= rtd->dai_link->codec_ch_maps[codec_dai_id].ch_mask; | ||
num_channels = params_channels(params); | ||
if (rtd->dai_link->codec_ch_maps) { | ||
ch_mask = 0; | ||
for_each_rtd_codec_dais(rtd, codec_dai_id, codec_dai) { | ||
ch_mask |= rtd->dai_link->codec_ch_maps[codec_dai_id].ch_mask; | ||
} | ||
if (ch_mask) | ||
num_channels = hweight_long(ch_mask); | ||
} | ||
|
||
num_channels = hweight_long(ch_mask); | ||
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. This might be better convey the logic and line 251 and 257-258 can be dropped, and leave the ch_mask initialized at declaration (line 263 can be dropped)? if (ch_mask)
num_channels = hweight_long(ch_mask);
else
num_channels = params_channels(params); |
||
if (num_channels != params_channels(params)) | ||
dev_dbg(sdev->dev, "configuring stream format for %d channels, params_channels was %d\n", | ||
num_channels, params_channels(params)); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this new check really needed?
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.
it doesn't really matter, all this code will have to be redone with the changes from Moritomo-san. See #4632