[Sound-open-firmware] [PATCH] volume: fix the L/R channel mixed issue
Liam Girdwood
liam.r.girdwood at linux.intel.com
Wed Jan 11 09:19:22 CET 2017
On Wed, 2017-01-11 at 15:09 +0800, Keyon Jie wrote:
> The Right channel was assigned with Left channel by mistake
> in vol_s16_to_s32 and vol_s32_to_s32, here correct it.
>
> Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
> ---
> src/audio/volume.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/audio/volume.c b/src/audio/volume.c
> index 65c41b9..24a9d11 100644
> --- a/src/audio/volume.c
> +++ b/src/audio/volume.c
> @@ -91,7 +91,7 @@ static void vol_s16_to_s32(struct comp_dev *dev, struct comp_buffer *sink,
> /* buffer sizes are always divisible by period frames */
> for (i = 0; i < frames * 2; i += 2) {
> dest[i] = (int32_t)src[i] * cd->volume[0];
> - dest[i + 1] = (int32_t)src[i] * cd->volume[1];
> + dest[i + 1] = (int32_t)src[i + 1] * cd->volume[1];
> }
>
> source->r_ptr = src + i;
> @@ -127,7 +127,7 @@ static void vol_s32_to_s32(struct comp_dev *dev, struct comp_buffer *sink,
> /* buffer sizes are always divisible by period frames */
> for (i = 0; i < frames * 2; i += 2) {
> dest[i] = ((int64_t)src[i] * cd->volume[0]) >> 16;
> - dest[i + 1] = ((int64_t)src[i] * cd->volume[1]) >> 16;
> + dest[i + 1] = ((int64_t)src[i + 1] * cd->volume[1]) >> 16;
> }
>
> source->r_ptr = src + i;
Applied.
More information about the Sound-open-firmware
mailing list