On Thu, 2016-12-22 at 17:27 +0800, Keyon Jie wrote:
This series is created to change the SSP format setting for both Tx and Rx, and it is verified on MinnowMax + ALC5651 codec with I2S stereo both SSP_CLK_EXT and SSP_CLK_AUDIO mode. Changes including:
- change ssp clock from 25M to 19.2M;
- add 16bit <==> 24bit volume converting functions;
- change to get dai format from host;
- change to get ssp stream format from host;
- remove the shim SSP divider and use SSCR0.SCR
for BCLK generating.
I've applied patches 1 - 4.
I dont want to introduce any IPC changes atm, please just hard code the new SSP format in intel-ipc.
Please also change volume_prepare so that :-
1) If source == host then s16_s32 2) if dest == host then S32_to_s16 3) if source == ssp then s24_to_s32 4) if dest == ssp then s32_to_s24
The data format used by all other copies (including mixer will be s32_to_s32). That we we are using 32bit internally. You will probably need to increase some buffer sizes internally.
We can then also remove any volume copies we dont use.
Liam
changes from v1:
- change to make dai format configurable;
- change to make ssp stream format configurable;
- clean shim SSP divider code;
- optimize volume copy functions.
Keyon Jie (7): ssp: switch to use SCR for BCLK generation. platform: switch default ssp clock to 19.2M volume: add 16bit<==>24bit volume copy function and mapping ssp: switch dai format form PCM B mode to normal I2S mode intel-ipc: get dai format from ipc dai: add stream_format to dai_data for codec stream intel-ipc: change to get ssp stream format from ipc
src/audio/dai.c | 10 ++ src/audio/volume.c | 119 ++++++++++++--------- src/drivers/ssp.c | 5 +- src/include/reef/dai.h | 1 + src/include/reef/stream.h | 20 ++++ src/include/uapi/intel-ipc.h | 2 + src/ipc/intel-ipc.c | 32 +++--- src/platform/baytrail/include/platform/platform.h | 10 +- src/platform/baytrail/platform.c | 120 ---------------------- 9 files changed, 126 insertions(+), 193 deletions(-)