Message ID | 20230810224930.3216717-4-contact@jookia.org |
---|---|
State | New |
Headers | show |
Series | [1/3] ASoC: wm8782: Handle maximum audio rate at runtime | expand |
On Sat, Aug 12, 2023 at 12:26:15AM +1000, John Watts wrote: > On Fri, Aug 11, 2023 at 02:59:35PM +0100, Mark Brown wrote: > > On Fri, Aug 11, 2023 at 08:49:30AM +1000, John Watts wrote: > > > + - max-rate : max supported audio rate configured by FSAMPEN pin, defaults to 48000 > > This seems like a cumbersome and error prone way to configure this - why > > not just have the binding specify the state of the pin? That's just a > > boolean high/low whereas this requires getting the rate right and then > > having the driver validate it. > Hi there, the pin is tristate, Z, 0 and 1. How would that be represented? You'd have to define an enum for that but it does still feel like it might be easier to work with since it's more direct.
On Mon, Aug 14, 2023 at 07:27:04PM +0100, Mark Brown wrote: > You'd have to define an enum for that but it does still feel like it > might be easier to work with since it's more direct. Alright, I'll give it a go in the next version. Thanks for the feedback! John.
On Mon, Aug 14, 2023 at 4:45 PM John Watts <contact@jookia.org> wrote: > > On Mon, Aug 14, 2023 at 07:27:04PM +0100, Mark Brown wrote: > > You'd have to define an enum for that but it does still feel like it > > might be easier to work with since it's more direct. > > Alright, I'll give it a go in the next version. Thanks for the feedback! That property will need a vendor prefix as well which was missing here. Rob
diff --git a/Documentation/devicetree/bindings/sound/wm8782.txt b/Documentation/devicetree/bindings/sound/wm8782.txt index 256cdec6ec4d..a68061a3e671 100644 --- a/Documentation/devicetree/bindings/sound/wm8782.txt +++ b/Documentation/devicetree/bindings/sound/wm8782.txt @@ -7,6 +7,7 @@ Required properties: - compatible : "wlf,wm8782" - 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) + - max-rate : max supported audio rate configured by FSAMPEN pin, defaults to 48000 Example: @@ -14,4 +15,5 @@ wm8782: stereo-adc { compatible = "wlf,wm8782"; Vdda-supply = <&vdda_supply>; Vdd-supply = <&vdd_supply>; + max-rate = <96000>; /* FSAMPEN is 1 */ };
The WM8782 can safely support rates higher than 48kHz by changing the value of the FSAMPEN pin. Allow specifying the maximum support rate the hardware configuration supports in the device tree. Signed-off-by: John Watts <contact@jookia.org> --- Documentation/devicetree/bindings/sound/wm8782.txt | 2 ++ 1 file changed, 2 insertions(+)