Skip to content

Commit 219af25

Browse files
ujfalusibroonie
authored andcommitted
ASoC: Intel: Skylake: Correct the ssp rate discovery in skl_get_ssp_clks()
The present flag is only set once when one rate has been found to be saved. This will effectively going to ignore any rate discovered at later time and based on the code, this is not the intention. Fixes: bc2bd45 ("ASoC: Intel: Skylake: Parse nhlt and register clock device") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 051dade commit 219af25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/soc/intel/skylake/skl-nhlt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ static void skl_get_ssp_clks(struct skl_dev *skl, struct skl_ssp_clk *ssp_clks,
9999
struct nhlt_fmt_cfg *fmt_cfg;
100100
struct wav_fmt_ext *wav_fmt;
101101
unsigned long rate;
102-
bool present = false;
103102
int rate_index = 0;
104103
u16 channels, bps;
105104
u8 clk_src;
@@ -113,6 +112,8 @@ static void skl_get_ssp_clks(struct skl_dev *skl, struct skl_ssp_clk *ssp_clks,
113112
return;
114113

115114
for (i = 0; i < fmt->fmt_count; i++) {
115+
bool present = false;
116+
116117
fmt_cfg = &fmt->fmt_config[i];
117118
wav_fmt = &fmt_cfg->fmt_ext;
118119

0 commit comments

Comments
 (0)