ASoC: rt5663: Add the manual offset field to compensate the DC offset
Subsystems (4)
Oder Chiou
maintainerPATCH 1/2 ASoC: rt5663: Add the manual offset field to compensate the DC offset
The patch adds the manual offset field in the devicetree to compensate the DC offset that will be different between the PCB layout. It only can be measured by the real production.
--- Documentation/devicetree/bindings/sound/rt5663.txt | 5 ++ include/sound/rt5663.h | 20 ++++++++ sound/soc/codecs/rt5663.c | 55 ++++++++++++++++++++-- sound/soc/codecs/rt5663.h | 2 + 4 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 include/sound/rt5663.h
Documentation/devicetree/bindings/sound/rt5663.txt +5 -0
@@ -12,6 +12,11 @@ Required properties: Optional properties: +- "realtek,dc_offset_l_manual" +- "realtek,dc_offset_r_manual" + Based on the different PCB layout, add the manual offset value to + compensate the DC offset for each L and R channel. + Pins on the device (for linking into audio routes) for RT5663: * IN1P
include/sound/rt5663.h new file +20 -0
@@ -0,0 +1,20 @@ +/* +* linux/sound/rt5663.h -- Platform data for RT5663 +* +* Copyright 2017 Realtek Semiconductor Corp. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __LINUX_SND_RT5663_H +#define __LINUX_SND_RT5663_H + +struct rt5663_platform_data { +unsigned int dc_offset_l_manual; +unsigned int dc_offset_r_manual; +}; + +#endif +
sound/soc/codecs/rt5663.c +50 -5
105 lines not on this page · raw message
sound/soc/codecs/rt5663.h +2 -0
@@ -12,6 +12,8 @@#ifndef __RT5663_H__#define __RT5663_H__ +#include <sound/rt5663.h> +/* Info */ #define RT5663_RESET 0x0000#define RT5663_VENDOR_ID 0x00fd
Signature · 1 line
2.7.4
Oder Chiou
maintainerPATCH 2/2 ASoC: rt5663: Update the HW default values based on the shipping version
The patch update the HW default values based on the shipping version.
--- sound/soc/codecs/rt5663.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
sound/soc/codecs/rt5663.c +9 -9
@@ -471,7 +471,7 @@ static const struct reg_default rt5663_reg[] = { { 0x0006, 0x1000 }, { 0x000a, 0x0000 }, { 0x0010, 0x000f }, - { 0x0015, 0x42c1 }, + { 0x0015, 0x42f1 }, { 0x0016, 0x0000 }, { 0x0018, 0x000b }, { 0x0019, 0xafaf },
@@ -514,7 +514,7 @@ static const struct reg_default rt5663_reg[] = { { 0x008a, 0x0000 }, { 0x008b, 0x0000 }, { 0x008c, 0x0003 }, - { 0x008e, 0x0004 }, + { 0x008e, 0x0008 }, { 0x008f, 0x1000 }, { 0x0090, 0x0646 }, { 0x0091, 0x0e3e },
@@ -525,7 +525,7 @@ static const struct reg_default rt5663_reg[] = { { 0x0098, 0x0000 }, { 0x009a, 0x0000 }, { 0x009f, 0x0000 }, - { 0x00ae, 0x2000 }, + { 0x00ae, 0x6000 }, { 0x00af, 0x0000 }, { 0x00b6, 0x0000 }, { 0x00b7, 0x0000 },
@@ -543,7 +543,7 @@ static const struct reg_default rt5663_reg[] = { { 0x00d9, 0x08f9 }, { 0x00db, 0x0008 }, { 0x00dc, 0x00c0 }, - { 0x00dd, 0x6724 }, + { 0x00dd, 0x6729 }, { 0x00de, 0x3131 }, { 0x00df, 0x0008 }, { 0x00e0, 0x4000 },
@@ -583,7 +583,7 @@ static const struct reg_default rt5663_reg[] = { { 0x0116, 0x0000 }, { 0x0117, 0x0f00 }, { 0x0118, 0x0006 }, - { 0x0125, 0x2224 }, + { 0x0125, 0x2424 }, { 0x0126, 0x5550 }, { 0x0127, 0x0400 }, { 0x0128, 0x7711 },
@@ -601,8 +601,8 @@ static const struct reg_default rt5663_reg[] = { { 0x0145, 0x0002 }, { 0x0146, 0x0000 }, { 0x0160, 0x0e80 }, - { 0x0161, 0x0020 }, - { 0x0162, 0x0080 }, + { 0x0161, 0x0080 }, + { 0x0162, 0x0200 }, { 0x0163, 0x0800 }, { 0x0164, 0x0000 }, { 0x0165, 0x0000 },
@@ -681,8 +681,8 @@ static const struct reg_default rt5663_reg[] = { { 0x0251, 0x0000 }, { 0x0252, 0x028a }, { 0x02fa, 0x0000 }, - { 0x02fb, 0x0000 }, - { 0x02fc, 0x0000 }, + { 0x02fb, 0x00a4 }, + { 0x02fc, 0x0300 }, { 0x0300, 0x0000 }, { 0x03d0, 0x0000 }, { 0x03d1, 0x0000 },
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: rt5663: Update the HW default values based on the shipping version" to the asoc tree
The patch
ASoC: rt5663: Update the HW default values based on the shipping version
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
9f8f5b5f6c515e0c9d9bc14996fa8b9414c5ce1aMon Sep 17 00:00:00 2001
From: "[email protected]" <[email protected]>
Date: Mon, 10 Jul 2017 11:14:57 +0800
Subject: [PATCH] ASoC: rt5663: Update the HW default values based on the
shipping version
The patch update the HW default values based on the shipping version.
--- sound/soc/codecs/rt5663.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
sound/soc/codecs/rt5663.c +9 -9
@@ -466,7 +466,7 @@ static const struct reg_default rt5663_reg[] = { { 0x0006, 0x1000 }, { 0x000a, 0x0000 }, { 0x0010, 0x000f }, - { 0x0015, 0x42c1 }, + { 0x0015, 0x42f1 }, { 0x0016, 0x0000 }, { 0x0018, 0x000b }, { 0x0019, 0xafaf },
@@ -509,7 +509,7 @@ static const struct reg_default rt5663_reg[] = { { 0x008a, 0x0000 }, { 0x008b, 0x0000 }, { 0x008c, 0x0003 }, - { 0x008e, 0x0004 }, + { 0x008e, 0x0008 }, { 0x008f, 0x1000 }, { 0x0090, 0x0646 }, { 0x0091, 0x0e3e },
@@ -520,7 +520,7 @@ static const struct reg_default rt5663_reg[] = { { 0x0098, 0x0000 }, { 0x009a, 0x0000 }, { 0x009f, 0x0000 }, - { 0x00ae, 0x2000 }, + { 0x00ae, 0x6000 }, { 0x00af, 0x0000 }, { 0x00b6, 0x0000 }, { 0x00b7, 0x0000 },
@@ -538,7 +538,7 @@ static const struct reg_default rt5663_reg[] = { { 0x00d9, 0x08f9 }, { 0x00db, 0x0008 }, { 0x00dc, 0x00c0 }, - { 0x00dd, 0x6724 }, + { 0x00dd, 0x6729 }, { 0x00de, 0x3131 }, { 0x00df, 0x0008 }, { 0x00e0, 0x4000 },
@@ -578,7 +578,7 @@ static const struct reg_default rt5663_reg[] = { { 0x0116, 0x0000 }, { 0x0117, 0x0f00 }, { 0x0118, 0x0006 }, - { 0x0125, 0x2224 }, + { 0x0125, 0x2424 }, { 0x0126, 0x5550 }, { 0x0127, 0x0400 }, { 0x0128, 0x7711 },
@@ -596,8 +596,8 @@ static const struct reg_default rt5663_reg[] = { { 0x0145, 0x0002 }, { 0x0146, 0x0000 }, { 0x0160, 0x0e80 }, - { 0x0161, 0x0020 }, - { 0x0162, 0x0080 }, + { 0x0161, 0x0080 }, + { 0x0162, 0x0200 }, { 0x0163, 0x0800 }, { 0x0164, 0x0000 }, { 0x0165, 0x0000 },
@@ -676,8 +676,8 @@ static const struct reg_default rt5663_reg[] = { { 0x0251, 0x0000 }, { 0x0252, 0x028a }, { 0x02fa, 0x0000 }, - { 0x02fb, 0x0000 }, - { 0x02fc, 0x0000 }, + { 0x02fb, 0x00a4 }, + { 0x02fc, 0x0300 }, { 0x0300, 0x0000 }, { 0x03d0, 0x0000 }, { 0x03d1, 0x0000 },
Signature · 1 line
2.13.2
Mark Brown
maintainerApplied "ASoC: rt5663: Add the manual offset field to compensate the DC offset" to the asoc tree
In reply to Oder ChiouThe patch
ASoC: rt5663: Add the manual offset field to compensate the DC offset
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
13700da6aea1d568ec68c7f2a90baf99a06851bfMon Sep 17 00:00:00 2001
From: "[email protected]" <[email protected]>
Date: Mon, 10 Jul 2017 11:14:56 +0800
Subject: [PATCH] ASoC: rt5663: Add the manual offset field to compensate the
DC offset
The patch adds the manual offset field in the devicetree to compensate the DC offset that will be different between the PCB layout. It only can be measured by the real production.
--- Documentation/devicetree/bindings/sound/rt5663.txt | 5 ++ include/sound/rt5663.h | 20 ++++++++ sound/soc/codecs/rt5663.c | 55 ++++++++++++++++++++-- sound/soc/codecs/rt5663.h | 2 + 4 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 include/sound/rt5663.h
Documentation/devicetree/bindings/sound/rt5663.txt +5 -0
@@ -12,6 +12,11 @@ Required properties: Optional properties: +- "realtek,dc_offset_l_manual" +- "realtek,dc_offset_r_manual" + Based on the different PCB layout, add the manual offset value to + compensate the DC offset for each L and R channel. + Pins on the device (for linking into audio routes) for RT5663: * IN1P
include/sound/rt5663.h new file +20 -0
@@ -0,0 +1,20 @@ +/* +* linux/sound/rt5663.h -- Platform data for RT5663 +* +* Copyright 2017 Realtek Semiconductor Corp. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __LINUX_SND_RT5663_H +#define __LINUX_SND_RT5663_H + +struct rt5663_platform_data { +unsigned int dc_offset_l_manual; +unsigned int dc_offset_r_manual; +}; + +#endif +
sound/soc/codecs/rt5663.c +50 -5
105 lines not on this page · raw message
sound/soc/codecs/rt5663.h +2 -0
@@ -12,6 +12,8 @@#ifndef __RT5663_H__#define __RT5663_H__ +#include <sound/rt5663.h> +/* Info */ #define RT5663_RESET 0x0000#define RT5663_VENDOR_ID 0x00fd
Signature · 1 line
2.13.2