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

os/board/rtl8730e: add driver layer implemenation for i2s tdm #6541

Draft
wants to merge 3 commits into
base: TDM_Dev
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
os/board/rtl8730e: fix clock configuration for signal generation
Fix clock selection parameters to get targeted signal value:
MCLK = 12.288MHz (OK)
BCLK = 2.048MHz (OK)
WCLK (need to setup Rx api in order to trigger WCLK activity)
  • Loading branch information
lhenry-realtek committed Nov 27, 2024
commit 110a416e567ae927e2f26767eac8541e0780ef97
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,13 @@ static uint32_t i2s_clock_select(i2s_t *obj)

Init_Params.sr = obj->sampling_rate;
dbg("ChLen: %d ChCnt: %d Sr: %d\n", obj->channel_length, obj->channel_num, obj->sampling_rate);
#if defined(CONFIG_AMEBASMART_I2S_TDM)
Init_Params.codec_multiplier_with_rate = 0;
Init_Params.sport_mclk_fixed_max = (uint32_t) 12288000; //12.288MHz
#else
Init_Params.codec_multiplier_with_rate = 256;
Init_Params.sport_mclk_fixed_max = (uint32_t) NULL;
#endif
Audio_Clock_Choose(PLL_CLK, &Init_Params, &Clock_Params);
obj->clock = Clock_Params.Clock;

Expand All @@ -422,7 +427,7 @@ static uint32_t i2s_clock_select(i2s_t *obj)
clock_mode = PLL_CLOCK_98P304M / Clock_Params.PLL_DIV;
break;
}
dbg("CLK: %d mode: %f div: %d\n", Clock_Params.Clock, clock_mode, Clock_Params.PLL_DIV);
dbg("CLK: %d div: %d\n", Clock_Params.Clock, Clock_Params.PLL_DIV);
return clock_mode;
}

Expand Down