The wm8782 supports higher audio rates than just 48kHz. This is
configured by setting the FSAMPEN pin on the codec chip.
This patch series introduces the 'wlf,fsampen' device tree property
to indicate the pin status and control the maximum rate available
when using the codec.
v2 -> v3:
- Rate is now properly constrained using ALSA constraints
v1 -> v2:
- Switched from max-rate property to wlf,fsampen property
- Clarified property is optional, not required
John Watts (3):
ASoC: wm8782: Constrain maximum audio rate at runtime
ASoC: wm8782: Use wlf,fsampen device tree property
ASoC: dt-bindings: wlf,wm8782: Add wlf,fsampen property
.../devicetree/bindings/sound/wm8782.txt | 5 ++
sound/soc/codecs/wm8782.c | 63 +++++++++++++++----
2 files changed, 55 insertions(+), 13 deletions(-)
--
2.42.0
The WM8782 can safely support rates higher than 48kHz by changing the
value of the FSAMPEN pin.
Allow specifying the FSAMPEN pin value in the device tree.
Signed-off-by: John Watts <[email protected]>
---
Documentation/devicetree/bindings/sound/wm8782.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/wm8782.txt b/Documentation/devicetree/bindings/sound/wm8782.txt
index 256cdec6ec4d..d217a616e103 100644
--- a/Documentation/devicetree/bindings/sound/wm8782.txt
+++ b/Documentation/devicetree/bindings/sound/wm8782.txt
@@ -8,10 +8,15 @@ Required properties:
- Vdda-supply : phandle to a regulator for the analog power supply (2.7V - 5.5V)
- Vdd-supply : phandle to a regulator for the digital power supply (2.7V - 3.6V)
+Optional properties:
+
+ - wlf,fsampen : FSAMPEN pin value, 0 for low, 1 for high, 2 for disconnected
+
Example:
wm8782: stereo-adc {
compatible = "wlf,wm8782";
Vdda-supply = <&vdda_supply>;
Vdd-supply = <&vdd_supply>;
+ wlf,fsampen = <2>; /* 192KHz */
};
--
2.42.0