ASoC: rt5663: Add the function of impedance sensing
Subsystems (4)
Oder Chiou
maintainerPATCH v3 1/1 ASoC: rt5663: Add the function of impedance sensing
Support the function of impedance sensing. It could be set the matrix row number of the impedance sensing table and the related parameters in the DTS.
--- Documentation/devicetree/bindings/sound/rt5663.txt | 16 ++ include/sound/rt5663.h | 3 + sound/soc/codecs/rt5663.c | 218 ++++++++++++++++++++- 3 files changed, 233 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/sound/rt5663.txt +16 -0
@@ -19,6 +19,22 @@ Optional properties: Based on the different PCB layout, add the manual offset value to compensate the DC offset for each L and R channel, and they are different between headphone and headset. +- "realtek,impedance_sensing_num" + The matrix row number of the impedance sensing table. + If the value is 0, it means the impedance sensing is not supported. +- "realtek,impedance_sensing_table" + The matrix rows of the impedance sensing table are consisted by impedance + minimum, impedance maximun, volume, DC offset w/o and w/ mic of each L and + R channel accordingly. Example is shown as following. + < 0 300 7 0xffd160 0xffd1c0 0xff8a10 0xff8ab0 + 301 65535 4 0xffe470 0xffe470 0xffb8e0 0xffb8e0> + The first and second column are defined for the impedance range. If the + detected impedance value is in the range, then the volume value of the + third column will be set to codec. In our codec design, each volume value + should compensate different DC offset to avoid the pop sound, and it is + also different between headphone and headset. In the example, the + "realtek,impedance_sensing_num" is 2. It means that there are 2 ranges of + impedance in the impedance sensing function. Pins on the device (for linking into audio routes) for RT5663:
include/sound/rt5663.h +3 -0
@@ -16,6 +16,9 @@ struct rt5663_platform_data {unsigned int dc_offset_r_manual;unsigned int dc_offset_l_manual_mic;unsigned int dc_offset_r_manual_mic; + +unsigned int impedance_sensing_num; + unsigned int *impedance_sensing_table; };#endif
sound/soc/codecs/rt5663.c +214 -4
284 lines not on this page · raw message
Signature · 1 line
2.7.4
Mark Brown
maintainerApplied "ASoC: rt5663: Add the function of impedance sensing" to the asoc tree
The patch
ASoC: rt5663: Add the function of impedance sensing
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
457c25efc592bb5539e18161c505f7a865013fb7Mon Sep 17 00:00:00 2001
From: Oder Chiou <[email protected]>
Date: Mon, 18 Sep 2017 18:14:26 +0800
Subject: [PATCH] ASoC: rt5663: Add the function of impedance sensing
Support the function of impedance sensing. It could be set the matrix row number of the impedance sensing table and the related parameters in the DTS.
--- Documentation/devicetree/bindings/sound/rt5663.txt | 16 ++ include/sound/rt5663.h | 3 + sound/soc/codecs/rt5663.c | 218 ++++++++++++++++++++- 3 files changed, 233 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/sound/rt5663.txt +16 -0
@@ -19,6 +19,22 @@ Optional properties: Based on the different PCB layout, add the manual offset value to compensate the DC offset for each L and R channel, and they are different between headphone and headset. +- "realtek,impedance_sensing_num" + The matrix row number of the impedance sensing table. + If the value is 0, it means the impedance sensing is not supported. +- "realtek,impedance_sensing_table" + The matrix rows of the impedance sensing table are consisted by impedance + minimum, impedance maximun, volume, DC offset w/o and w/ mic of each L and + R channel accordingly. Example is shown as following. + < 0 300 7 0xffd160 0xffd1c0 0xff8a10 0xff8ab0 + 301 65535 4 0xffe470 0xffe470 0xffb8e0 0xffb8e0> + The first and second column are defined for the impedance range. If the + detected impedance value is in the range, then the volume value of the + third column will be set to codec. In our codec design, each volume value + should compensate different DC offset to avoid the pop sound, and it is + also different between headphone and headset. In the example, the + "realtek,impedance_sensing_num" is 2. It means that there are 2 ranges of + impedance in the impedance sensing function. Pins on the device (for linking into audio routes) for RT5663:
include/sound/rt5663.h +3 -0
@@ -16,6 +16,9 @@ struct rt5663_platform_data {unsigned int dc_offset_r_manual;unsigned int dc_offset_l_manual_mic;unsigned int dc_offset_r_manual_mic; + +unsigned int impedance_sensing_num; + unsigned int *impedance_sensing_table; };#endif
sound/soc/codecs/rt5663.c +214 -4
284 lines not on this page · raw message
Signature · 1 line
2.14.1