[Sound-open-firmware] [PATCH] dai: rename frame_size in dai_config to sample_size
The element frame_size in dai_config struct is actually sample size for each channel, e.g. 24 for S24_4LE, so rename it to sample_size to avoid confusion.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com --- src/drivers/ssp.c | 12 ++++++------ src/include/reef/dai.h | 2 +- src/ipc/intel-ipc.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/drivers/ssp.c b/src/drivers/ssp.c index c285af3..2b5b89e 100644 --- a/src/drivers/ssp.c +++ b/src/drivers/ssp.c @@ -260,8 +260,8 @@ static inline int ssp_set_config(struct dai *dai, struct dai_config *dai_config) case DAI_FMT_I2S: sscr0 |= SSCR0_PSP; sscr1 |= SSCR1_TRAIL; - sspsp |= SSPSP_SFRMWDTH(dai->config.frame_size + 1); - sspsp |= SSPSP_SFRMDLY((dai->config.frame_size + 1) * 2); + sspsp |= SSPSP_SFRMWDTH(dai->config.sample_size + 1); + sspsp |= SSPSP_SFRMDLY((dai->config.sample_size + 1) * 2); sspsp |= SSPSP_DMYSTRT(1); break; case DAI_FMT_DSP_A: @@ -274,11 +274,11 @@ static inline int ssp_set_config(struct dai *dai, struct dai_config *dai_config) return -EINVAL; }
- /* frame size */ - if (dai->config.frame_size > 16) - sscr0 |= (SSCR0_EDSS | SSCR0_DSIZE(dai->config.frame_size - 16)); + /* sample size */ + if (dai->config.sample_size > 16) + sscr0 |= (SSCR0_EDSS | SSCR0_DSIZE(dai->config.sample_size - 16)); else - sscr0 |= SSCR0_DSIZE(dai->config.frame_size); + sscr0 |= SSCR0_DSIZE(dai->config.sample_size);
/* watermarks - TODO: do we still need old sscr1 method ?? */ sscr1 |= (SSCR1_TX(4) | SSCR1_RX(4)); diff --git a/src/include/reef/dai.h b/src/include/reef/dai.h index cfcc428..5e301e1 100644 --- a/src/include/reef/dai.h +++ b/src/include/reef/dai.h @@ -100,7 +100,7 @@ struct dai_slot_map { /* DAI runtime hardware configuration */ struct dai_config { uint32_t format; - uint32_t frame_size; /* in BCLKs */ + uint32_t sample_size; /* in BCLKs */ struct dai_slot_map tx_slot_map[DAI_NUM_SLOT_MAPS]; struct dai_slot_map rx_slot_map[DAI_NUM_SLOT_MAPS]; uint32_t bclk; /* BCLK frequency in Hz */ diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c index bfffaf6..127541d 100644 --- a/src/ipc/intel-ipc.c +++ b/src/ipc/intel-ipc.c @@ -565,7 +565,7 @@ static uint32_t ipc_device_set_formats(uint32_t header) dai_dev->dai_config.mclk = config_req.clock_frequency; dai_dev->dai_config.format = DAI_FMT_I2S | DAI_FMT_CONT | DAI_FMT_NB_NF | DAI_FMT_CBS_CFS; - dai_dev->dai_config.frame_size = 24; /* really sample size */ + dai_dev->dai_config.sample_size = 24; dai_dev->dai_config.bclk = 2400000; dai_dev->dai_config.mclk = 19200000; dai_dev->dai_config.clk_src = SSP_CLK_EXT;
On Tue, 2017-01-03 at 10:56 +0800, Keyon Jie wrote:
The element frame_size in dai_config struct is actually sample size for each channel, e.g. 24 for S24_4LE, so rename it to sample_size to avoid confusion.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com
Applied.
Thanks
Liam
participants (2)
-
Keyon Jie
-
Liam Girdwood