[Sound-open-firmware] [PATCH v3 1/2] volume: support 8-channel feature
add the 8-channel feature for the capture function for apl-gpmrb platform.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com Reviewed-by: Keyon Jie yang.jie@linux.intel.com
--- test with: apl-gpmrb with tdf8532 codec
linux topic/sof-dev: 0d51a5ed28c5 sof master: 48d2a1c551d7 soft master: 2cc3ad2a9287
pass the regression test: Minnowboard Turbo UP^2 CNL-RVP --- src/audio/volume_generic.c | 367 +++++++++++++++++++++++++++++++++++++ 1 file changed, 367 insertions(+)
diff --git a/src/audio/volume_generic.c b/src/audio/volume_generic.c index 200cf12..d07fd30 100644 --- a/src/audio/volume_generic.c +++ b/src/audio/volume_generic.c @@ -220,6 +220,7 @@ static void vol_s24_to_s24_2ch(struct comp_dev *dev, struct comp_buffer *sink, } }
+#if PLATFORM_MAX_CHANNELS >= 4 /* volume scaling functions for 4-channel input */
/* copy and scale volume from 16 bit source buffer to 32 bit dest buffer */ @@ -465,6 +466,359 @@ static void vol_s24_to_s24_4ch(struct comp_dev *dev, struct comp_buffer *sink, Q_SHIFT_BITS_64(23, 16, 23)); } } +#endif + +#if PLATFORM_MAX_CHANNELS >= 8 +/* volume scaling functions for 8-channel input */ + +/* copy and scale volume from 16 bit source buffer to 32 bit dest buffer */ +static void vol_s16_to_s32_8ch(struct comp_dev *dev, struct comp_buffer *sink, + struct comp_buffer *source) +{ + struct comp_data *cd = comp_get_drvdata(dev); + int16_t *src = (int16_t *)source->r_ptr; + int32_t *dest = (int32_t *)sink->w_ptr; + int32_t i; + + /* buffer sizes are always divisible by period frames */ + /* Samples are Q1.15 --> Q1.31 and volume is Q1.16 */ + for (i = 0; i < dev->frames * 8; i += 8) { + dest[i] = (int32_t)src[i] * cd->volume[0]; + dest[i + 1] = (int32_t)src[i + 1] * cd->volume[1]; + dest[i + 2] = (int32_t)src[i + 2] * cd->volume[2]; + dest[i + 3] = (int32_t)src[i + 3] * cd->volume[3]; + dest[i + 4] = (int32_t)src[i + 4] * cd->volume[4]; + dest[i + 5] = (int32_t)src[i + 5] * cd->volume[5]; + dest[i + 6] = (int32_t)src[i + 6] * cd->volume[6]; + dest[i + 7] = (int32_t)src[i + 7] * cd->volume[7]; + } +} + +/* copy and scale volume from 32 bit source buffer to 16 bit dest buffer */ +static void vol_s32_to_s16_8ch(struct comp_dev *dev, struct comp_buffer *sink, + struct comp_buffer *source) +{ + struct comp_data *cd = comp_get_drvdata(dev); + int32_t *src = (int32_t *)source->r_ptr; + int16_t *dest = (int16_t *)sink->w_ptr; + int32_t i; + + /* buffer sizes are always divisible by period frames */ + /* Samples are Q1.31 --> Q1.15 and volume is Q1.16 */ + for (i = 0; i < dev->frames * 8; i += 8) { + dest[i] = (int16_t)q_multsr_sat_32x32(src[i], cd->volume[0], + Q_SHIFT_BITS_64(31, 16, + 15)); + dest[i + 1] = (int16_t)q_multsr_sat_32x32(src[i + 1], + cd->volume[1], + Q_SHIFT_BITS_64(31, + 16, + 15)); + dest[i + 2] = (int16_t)q_multsr_sat_32x32(src[i + 2], + cd->volume[2], + Q_SHIFT_BITS_64(31, + 16, + 15)); + dest[i + 3] = (int16_t)q_multsr_sat_32x32(src[i + 3], + cd->volume[3], + Q_SHIFT_BITS_64(31, + 16, + 15)); + dest[i + 4] = (int16_t)q_multsr_sat_32x32(src[i + 4], + cd->volume[4], + Q_SHIFT_BITS_64(31, + 16, + 15)); + dest[i + 5] = (int16_t)q_multsr_sat_32x32(src[i + 5], + cd->volume[5], + Q_SHIFT_BITS_64(31, + 16, + 15)); + dest[i + 6] = (int16_t)q_multsr_sat_32x32(src[i + 6], + cd->volume[6], + Q_SHIFT_BITS_64(31, + 16, + 15)); + dest[i + 7] = (int16_t)q_multsr_sat_32x32(src[i + 7], + cd->volume[7], + Q_SHIFT_BITS_64(31, + 16, + 15)); + } +} + +/* copy and scale volume from 32 bit source buffer to 32 bit dest buffer */ +static void vol_s32_to_s32_8ch(struct comp_dev *dev, struct comp_buffer *sink, + struct comp_buffer *source) +{ + struct comp_data *cd = comp_get_drvdata(dev); + int32_t *src = (int32_t *)source->r_ptr; + int32_t *dest = (int32_t *)sink->w_ptr; + int32_t i; + + /* buffer sizes are always divisible by period frames */ + /* Samples are Q1.31 --> Q1.31 and volume is Q1.16 */ + for (i = 0; i < dev->frames * 8; i += 8) { + dest[i] = q_multsr_sat_32x32(src[i], cd->volume[0], + Q_SHIFT_BITS_64(31, 16, 31)); + dest[i + 1] = q_multsr_sat_32x32(src[i + 1], cd->volume[1], + Q_SHIFT_BITS_64(31, 16, 31)); + dest[i + 2] = q_multsr_sat_32x32(src[i + 2], cd->volume[2], + Q_SHIFT_BITS_64(31, 16, 31)); + dest[i + 3] = q_multsr_sat_32x32(src[i + 3], cd->volume[3], + Q_SHIFT_BITS_64(31, 16, 31)); + dest[i + 4] = q_multsr_sat_32x32(src[i + 4], cd->volume[4], + Q_SHIFT_BITS_64(31, 16, 31)); + dest[i + 5] = q_multsr_sat_32x32(src[i + 5], cd->volume[5], + Q_SHIFT_BITS_64(31, 16, 31)); + dest[i + 6] = q_multsr_sat_32x32(src[i + 6], cd->volume[6], + Q_SHIFT_BITS_64(31, 16, 31)); + dest[i + 7] = q_multsr_sat_32x32(src[i + 7], cd->volume[7], + Q_SHIFT_BITS_64(31, 16, 31)); + } +} + +/* copy and scale volume from 16 bit source buffer to 16 bit dest buffer */ +static void vol_s16_to_s16_8ch(struct comp_dev *dev, struct comp_buffer *sink, + struct comp_buffer *source) +{ + struct comp_data *cd = comp_get_drvdata(dev); + int16_t *src = (int16_t *)source->r_ptr; + int16_t *dest = (int16_t *)sink->w_ptr; + int32_t i; + + /* buffer sizes are always divisible by period frames */ + /* Samples are Q1.15 --> Q1.15 and volume is Q1.16 */ + for (i = 0; i < dev->frames * 8; i += 8) { + dest[i] = q_multsr_sat_16x16(src[i], cd->volume[0], + Q_SHIFT_BITS_32(15, 16, 15)); + dest[i + 1] = q_multsr_sat_16x16(src[i + 1], cd->volume[1], + Q_SHIFT_BITS_32(15, 16, 15)); + dest[i + 2] = q_multsr_sat_16x16(src[i + 2], cd->volume[2], + Q_SHIFT_BITS_32(15, 16, 15)); + dest[i + 3] = q_multsr_sat_16x16(src[i + 3], cd->volume[3], + Q_SHIFT_BITS_32(15, 16, 15)); + dest[i + 4] = q_multsr_sat_16x16(src[i + 4], cd->volume[4], + Q_SHIFT_BITS_32(15, 16, 15)); + dest[i + 5] = q_multsr_sat_16x16(src[i + 5], cd->volume[5], + Q_SHIFT_BITS_32(15, 16, 15)); + dest[i + 6] = q_multsr_sat_16x16(src[i + 6], cd->volume[6], + Q_SHIFT_BITS_32(15, 16, 15)); + dest[i + 7] = q_multsr_sat_16x16(src[i + 7], cd->volume[7], + Q_SHIFT_BITS_32(15, 16, 15)); + } +} + +/* copy and scale volume from 16 bit source buffer to 24 bit + * on 32 bit boundary buffer + */ +static void vol_s16_to_s24_8ch(struct comp_dev *dev, struct comp_buffer *sink, + struct comp_buffer *source) +{ + struct comp_data *cd = comp_get_drvdata(dev); + int16_t *src = (int16_t *)source->r_ptr; + int32_t *dest = (int32_t *)sink->w_ptr; + int32_t i; + + /* buffer sizes are always divisible by period frames */ + /* Samples are Q1.15 and volume is Q1.16 */ + for (i = 0; i < dev->frames * 8; i += 8) { + dest[i] = q_multsr_sat_32x32(src[i], cd->volume[0], + Q_SHIFT_BITS_64(15, 16, 23)); + dest[i + 1] = q_multsr_sat_32x32(src[i + 1], cd->volume[1], + Q_SHIFT_BITS_64(15, 16, 23)); + dest[i + 2] = q_multsr_sat_32x32(src[i + 2], cd->volume[2], + Q_SHIFT_BITS_64(15, 16, 23)); + dest[i + 3] = q_multsr_sat_32x32(src[i + 3], cd->volume[3], + Q_SHIFT_BITS_64(15, 16, 23)); + dest[i + 4] = q_multsr_sat_32x32(src[i + 4], cd->volume[4], + Q_SHIFT_BITS_64(15, 16, 23)); + dest[i + 5] = q_multsr_sat_32x32(src[i + 5], cd->volume[5], + Q_SHIFT_BITS_64(15, 16, 23)); + dest[i + 6] = q_multsr_sat_32x32(src[i + 6], cd->volume[6], + Q_SHIFT_BITS_64(15, 16, 23)); + dest[i + 7] = q_multsr_sat_32x32(src[i + 7], cd->volume[7], + Q_SHIFT_BITS_64(15, 16, 23)); + } +} + +/* copy and scale volume from 16 bit source buffer to 24 bit + * on 32 bit boundary dest buffer + */ +static void vol_s24_to_s16_8ch(struct comp_dev *dev, struct comp_buffer *sink, + struct comp_buffer *source) +{ + struct comp_data *cd = comp_get_drvdata(dev); + int32_t *src = (int32_t *)source->r_ptr; + int16_t *dest = (int16_t *)sink->w_ptr; + int32_t i, sample; + + /* buffer sizes are always divisible by period frames */ + /* Samples are Q1.23 --> Q1.15 and volume is Q1.16 */ + for (i = 0; i < dev->frames * 8; i += 8) { + sample = sign_extend_s24(src[i]); + dest[i] = (int16_t)q_multsr_sat_32x32(sample, cd->volume[0], + Q_SHIFT_BITS_64(23, 16, + 15)); + sample = sign_extend_s24(src[i + 1]); + dest[i + 1] = (int16_t)q_multsr_sat_32x32(sample, + cd->volume[1], + Q_SHIFT_BITS_64(23, + 16, + 15)); + sample = sign_extend_s24(src[i + 2]); + dest[i + 2] = (int16_t)q_multsr_sat_32x32(sample, + cd->volume[2], + Q_SHIFT_BITS_64(23, + 16, + 15)); + sample = sign_extend_s24(src[i + 3]); + dest[i + 3] = (int16_t)q_multsr_sat_32x32(sample, + cd->volume[3], + Q_SHIFT_BITS_64(23, + 16, + 15)); + sample = sign_extend_s24(src[i + 4]); + dest[i + 4] = (int16_t)q_multsr_sat_32x32(sample, + cd->volume[4], + Q_SHIFT_BITS_64(23, + 16, + 15)); + sample = sign_extend_s24(src[i + 5]); + dest[i + 5] = (int16_t)q_multsr_sat_32x32(sample, + cd->volume[5], + Q_SHIFT_BITS_64(23, + 16, + 15)); + sample = sign_extend_s24(src[i + 6]); + dest[i + 6] = (int16_t)q_multsr_sat_32x32(sample, + cd->volume[6], + Q_SHIFT_BITS_64(23, + 16, + 15)); + sample = sign_extend_s24(src[i + 7]); + dest[i + 7] = (int16_t)q_multsr_sat_32x32(sample, + cd->volume[7], + Q_SHIFT_BITS_64(23, + 16, + 15)); + } +} + +/* copy and scale volume from 32 bit source buffer to 24 bit + * on 32 bit boundary dest buffer + */ +static void vol_s32_to_s24_8ch(struct comp_dev *dev, struct comp_buffer *sink, + struct comp_buffer *source) +{ + struct comp_data *cd = comp_get_drvdata(dev); + int32_t *src = (int32_t *)source->r_ptr; + int32_t *dest = (int32_t *)sink->w_ptr; + int32_t i; + + /* buffer sizes are always divisible by period frames */ + /* Samples are Q1.31 --> Q1.23 and volume is Q1.16 */ + for (i = 0; i < dev->frames * 8; i += 8) { + dest[i] = q_multsr_sat_32x32(src[i], cd->volume[0], + Q_SHIFT_BITS_64(31, 16, 23)); + dest[i + 1] = q_multsr_sat_32x32(src[i + 1], cd->volume[1], + Q_SHIFT_BITS_64(31, 16, 23)); + dest[i + 2] = q_multsr_sat_32x32(src[i + 2], cd->volume[2], + Q_SHIFT_BITS_64(31, 16, 23)); + dest[i + 3] = q_multsr_sat_32x32(src[i + 3], cd->volume[3], + Q_SHIFT_BITS_64(31, 16, 23)); + dest[i + 4] = q_multsr_sat_32x32(src[i + 4], cd->volume[4], + Q_SHIFT_BITS_64(31, 16, 23)); + dest[i + 5] = q_multsr_sat_32x32(src[i + 5], cd->volume[5], + Q_SHIFT_BITS_64(31, 16, 23)); + dest[i + 6] = q_multsr_sat_32x32(src[i + 6], cd->volume[6], + Q_SHIFT_BITS_64(31, 16, 23)); + dest[i + 7] = q_multsr_sat_32x32(src[i + 7], cd->volume[7], + Q_SHIFT_BITS_64(31, 16, 23)); + } +} + +/* copy and scale volume from 16 bit source buffer to 24 bit + * on 32 bit boundary dest buffer + */ +static void vol_s24_to_s32_8ch(struct comp_dev *dev, struct comp_buffer *sink, + struct comp_buffer *source) +{ + struct comp_data *cd = comp_get_drvdata(dev); + int32_t *src = (int32_t *)source->r_ptr; + int32_t *dest = (int32_t *)sink->w_ptr; + int32_t i; + + /* buffer sizes are always divisible by period frames */ + /* Samples are Q1.23 --> Q1.31 and volume is Q1.16 */ + for (i = 0; i < dev->frames * 8; i += 8) { + dest[i] = q_multsr_sat_32x32(sign_extend_s24(src[i]), + cd->volume[0], + Q_SHIFT_BITS_64(23, 16, 31)); + dest[i + 1] = q_multsr_sat_32x32(sign_extend_s24(src[i + 1]), + cd->volume[1], + Q_SHIFT_BITS_64(23, 16, 31)); + dest[i + 2] = q_multsr_sat_32x32(sign_extend_s24(src[i + 2]), + cd->volume[2], + Q_SHIFT_BITS_64(23, 16, 31)); + dest[i + 3] = q_multsr_sat_32x32(sign_extend_s24(src[i + 3]), + cd->volume[3], + Q_SHIFT_BITS_64(23, 16, 31)); + dest[i + 4] = q_multsr_sat_32x32(sign_extend_s24(src[i + 4]), + cd->volume[4], + Q_SHIFT_BITS_64(23, 16, 31)); + dest[i + 5] = q_multsr_sat_32x32(sign_extend_s24(src[i + 5]), + cd->volume[5], + Q_SHIFT_BITS_64(23, 16, 31)); + dest[i + 6] = q_multsr_sat_32x32(sign_extend_s24(src[i + 6]), + cd->volume[6], + Q_SHIFT_BITS_64(23, 16, 31)); + dest[i + 7] = q_multsr_sat_32x32(sign_extend_s24(src[i + 7]), + cd->volume[7], + Q_SHIFT_BITS_64(23, 16, 31)); + } +} + +/* Copy and scale volume from 24 bit source buffer to 24 bit on 32 bit boundary + * dest buffer. + */ +static void vol_s24_to_s24_8ch(struct comp_dev *dev, struct comp_buffer *sink, + struct comp_buffer *source) +{ + struct comp_data *cd = comp_get_drvdata(dev); + int32_t i, *src = (int32_t *)source->r_ptr; + int32_t *dest = (int32_t *)sink->w_ptr; + + /* buffer sizes are always divisible by period frames */ + /* Samples are Q1.23 --> Q1.23 and volume is Q1.16 */ + for (i = 0; i < dev->frames * 8; i += 8) { + dest[i] = q_multsr_sat_32x32(sign_extend_s24(src[i]), + cd->volume[0], + Q_SHIFT_BITS_64(23, 16, 23)); + dest[i + 1] = q_multsr_sat_32x32(sign_extend_s24(src[i + 1]), + cd->volume[1], + Q_SHIFT_BITS_64(23, 16, 23)); + dest[i + 2] = q_multsr_sat_32x32(sign_extend_s24(src[i + 2]), + cd->volume[2], + Q_SHIFT_BITS_64(23, 16, 23)); + dest[i + 3] = q_multsr_sat_32x32(sign_extend_s24(src[i + 3]), + cd->volume[3], + Q_SHIFT_BITS_64(23, 16, 23)); + dest[i + 4] = q_multsr_sat_32x32(sign_extend_s24(src[i + 4]), + cd->volume[4], + Q_SHIFT_BITS_64(23, 16, 23)); + dest[i + 5] = q_multsr_sat_32x32(sign_extend_s24(src[i + 5]), + cd->volume[5], + Q_SHIFT_BITS_64(23, 16, 23)); + dest[i + 6] = q_multsr_sat_32x32(sign_extend_s24(src[i + 6]), + cd->volume[6], + Q_SHIFT_BITS_64(23, 16, 23)); + dest[i + 7] = q_multsr_sat_32x32(sign_extend_s24(src[i + 7]), + cd->volume[7], + Q_SHIFT_BITS_64(23, 16, 23)); + } +} +#endif
const struct comp_func_map func_map[] = { {SOF_IPC_FRAME_S16_LE, SOF_IPC_FRAME_S16_LE, 2, vol_s16_to_s16_2ch}, @@ -476,6 +830,7 @@ const struct comp_func_map func_map[] = { {SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_S24_4LE, 2, vol_s32_to_s24_2ch}, {SOF_IPC_FRAME_S24_4LE, SOF_IPC_FRAME_S32_LE, 2, vol_s24_to_s32_2ch}, {SOF_IPC_FRAME_S24_4LE, SOF_IPC_FRAME_S24_4LE, 2, vol_s24_to_s24_2ch}, +#if PLATFORM_MAX_CHANNELS >= 4 {SOF_IPC_FRAME_S16_LE, SOF_IPC_FRAME_S16_LE, 4, vol_s16_to_s16_4ch}, {SOF_IPC_FRAME_S16_LE, SOF_IPC_FRAME_S32_LE, 4, vol_s16_to_s32_4ch}, {SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_S16_LE, 4, vol_s32_to_s16_4ch}, @@ -485,6 +840,18 @@ const struct comp_func_map func_map[] = { {SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_S24_4LE, 4, vol_s32_to_s24_4ch}, {SOF_IPC_FRAME_S24_4LE, SOF_IPC_FRAME_S32_LE, 4, vol_s24_to_s32_4ch}, {SOF_IPC_FRAME_S24_4LE, SOF_IPC_FRAME_S24_4LE, 4, vol_s24_to_s24_4ch}, +#endif +#if PLATFORM_MAX_CHANNELS >= 8 + {SOF_IPC_FRAME_S16_LE, SOF_IPC_FRAME_S16_LE, 8, vol_s16_to_s16_8ch}, + {SOF_IPC_FRAME_S16_LE, SOF_IPC_FRAME_S32_LE, 8, vol_s16_to_s32_8ch}, + {SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_S16_LE, 8, vol_s32_to_s16_8ch}, + {SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_S32_LE, 8, vol_s32_to_s32_8ch}, + {SOF_IPC_FRAME_S16_LE, SOF_IPC_FRAME_S24_4LE, 8, vol_s16_to_s24_8ch}, + {SOF_IPC_FRAME_S24_4LE, SOF_IPC_FRAME_S16_LE, 8, vol_s24_to_s16_8ch}, + {SOF_IPC_FRAME_S32_LE, SOF_IPC_FRAME_S24_4LE, 8, vol_s32_to_s24_8ch}, + {SOF_IPC_FRAME_S24_4LE, SOF_IPC_FRAME_S32_LE, 8, vol_s24_to_s32_8ch}, + {SOF_IPC_FRAME_S24_4LE, SOF_IPC_FRAME_S24_4LE, 8, vol_s24_to_s24_8ch}, +#endif };
scale_vol vol_get_processing_function(struct comp_dev *dev)
apollolake platform should support 8-channel.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
--- test with: apl-gpmrb with tdf8532 codec
linux topic/sof-dev: 0d51a5ed28c5 sof master: 48d2a1c551d7 soft master: 2cc3ad2a9287
pass the regression test: Minnowboard Turbo UP^2 CNL-RVP --- src/platform/apollolake/include/platform/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/platform/apollolake/include/platform/platform.h b/src/platform/apollolake/include/platform/platform.h index 1cce0c7..04badb6 100644 --- a/src/platform/apollolake/include/platform/platform.h +++ b/src/platform/apollolake/include/platform/platform.h @@ -66,7 +66,7 @@ struct sof; #define PLATFORM_HOST_DMA_MASK 0x00000000
/* Platform stream capabilities */ -#define PLATFORM_MAX_CHANNELS 4 +#define PLATFORM_MAX_CHANNELS 8 #define PLATFORM_MAX_STREAMS 16
/* clock source used by scheduler for deadline calculations */
On Wed, 2018-06-20 at 11:04 +0800, Wu Zhigang wrote:
apollolake platform should support 8-channel.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
test with: apl-gpmrb with tdf8532 codec
linux topic/sof-dev: 0d51a5ed28c5 sof master: 48d2a1c551d7 soft master: 2cc3ad2a9287
pass the regression test: Minnowboard Turbo UP^2 CNL-RVP
src/platform/apollolake/include/platform/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/platform/apollolake/include/platform/platform.h b/src/platform/apollolake/include/platform/platform.h index 1cce0c7..04badb6 100644 --- a/src/platform/apollolake/include/platform/platform.h +++ b/src/platform/apollolake/include/platform/platform.h @@ -66,7 +66,7 @@ struct sof; #define PLATFORM_HOST_DMA_MASK 0x00000000
/* Platform stream capabilities */ -#define PLATFORM_MAX_CHANNELS 4 +#define PLATFORM_MAX_CHANNELS 8 #define PLATFORM_MAX_STREAMS 16
Applied patch 1/2.
max channels should be 16 for BYT, HSW, APL and CNL given that the SSP port can playback 16 channels.
Liam
On 6/20/18 5:25 AM, Liam Girdwood wrote:
On Wed, 2018-06-20 at 11:04 +0800, Wu Zhigang wrote:
apollolake platform should support 8-channel.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
test with: apl-gpmrb with tdf8532 codec
linux topic/sof-dev: 0d51a5ed28c5 sof master: 48d2a1c551d7 soft master: 2cc3ad2a9287
pass the regression test: Minnowboard Turbo UP^2 CNL-RVP
src/platform/apollolake/include/platform/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/platform/apollolake/include/platform/platform.h b/src/platform/apollolake/include/platform/platform.h index 1cce0c7..04badb6 100644 --- a/src/platform/apollolake/include/platform/platform.h +++ b/src/platform/apollolake/include/platform/platform.h @@ -66,7 +66,7 @@ struct sof; #define PLATFORM_HOST_DMA_MASK 0x00000000
/* Platform stream capabilities */ -#define PLATFORM_MAX_CHANNELS 4 +#define PLATFORM_MAX_CHANNELS 8 #define PLATFORM_MAX_STREAMS 16
Applied patch 1/2.
max channels should be 16 for BYT, HSW, APL and CNL given that the SSP port can playback 16 channels.
Nope. the SSP can handle 8 slots max on all these platforms.
Liam _______________________________________________ Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
On 2018年06月20日 18:25, Liam Girdwood wrote:
On Wed, 2018-06-20 at 11:04 +0800, Wu Zhigang wrote:
apollolake platform should support 8-channel.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
test with: apl-gpmrb with tdf8532 codec
linux topic/sof-dev: 0d51a5ed28c5 sof master: 48d2a1c551d7 soft master: 2cc3ad2a9287
pass the regression test: Minnowboard Turbo UP^2 CNL-RVP
src/platform/apollolake/include/platform/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/platform/apollolake/include/platform/platform.h b/src/platform/apollolake/include/platform/platform.h index 1cce0c7..04badb6 100644 --- a/src/platform/apollolake/include/platform/platform.h +++ b/src/platform/apollolake/include/platform/platform.h @@ -66,7 +66,7 @@ struct sof; #define PLATFORM_HOST_DMA_MASK 0x00000000
/* Platform stream capabilities */ -#define PLATFORM_MAX_CHANNELS 4 +#define PLATFORM_MAX_CHANNELS 8 #define PLATFORM_MAX_STREAMS 16
Applied patch 1/2.
max channels should be 16 for BYT, HSW, APL and CNL given that the SSP port can playback 16 channels.
Liam
Are you sure of this? I checked the SSP's register for CNL: SSTSA and SSRSA. It only supports 8-channel. Or maybe my manual is not latest. Thanks ~zhigang
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
On Thu, 2018-06-21 at 09:10 +0800, zhigangw wrote:
On 2018年06月20日 18:25, Liam Girdwood wrote:
On Wed, 2018-06-20 at 11:04 +0800, Wu Zhigang wrote:
apollolake platform should support 8-channel.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
test with: apl-gpmrb with tdf8532 codec
linux topic/sof-dev: 0d51a5ed28c5 sof master: 48d2a1c551d7 soft master: 2cc3ad2a9287
pass the regression test: Minnowboard Turbo UP^2 CNL-RVP
src/platform/apollolake/include/platform/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/platform/apollolake/include/platform/platform.h b/src/platform/apollolake/include/platform/platform.h index 1cce0c7..04badb6 100644 --- a/src/platform/apollolake/include/platform/platform.h +++ b/src/platform/apollolake/include/platform/platform.h @@ -66,7 +66,7 @@ struct sof; #define PLATFORM_HOST_DMA_MASK 0x00000000
/* Platform stream capabilities */ -#define PLATFORM_MAX_CHANNELS 4 +#define PLATFORM_MAX_CHANNELS 8 #define PLATFORM_MAX_STREAMS 16
Applied patch 1/2.
max channels should be 16 for BYT, HSW, APL and CNL given that the SSP port can playback 16 channels.
Liam
Are you sure of this? I checked the SSP's register for CNL: SSTSA and SSRSA. It only supports 8-channel.
You and Pierre are right (it's 8), I was looking at a recent driver patch that had the wrong value.
Liam
participants (4)
-
Liam Girdwood
-
Pierre-Louis Bossart
-
Wu Zhigang
-
zhigangw