mbox series

[v3,0/3] ASoC: wm8782: Allow higher audio rates

Message ID 20230917173726.1916439-1-contact@jookia.org
Headers show
Series ASoC: wm8782: Allow higher audio rates | expand

Message

John Watts Sept. 17, 2023, 5:37 p.m. UTC
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(-)

Comments

Charles Keepax Sept. 18, 2023, 8:31 a.m. UTC | #1
On Mon, Sep 18, 2023 at 03:37:24AM +1000, John Watts wrote:
> The wm8782 supports up to 192kHz audio when pins are set correctly.
> Instead of hardcoding which rates are supported constrain them at
> runtime based on a max_rate variable.
> 
> Signed-off-by: John Watts <contact@jookia.org>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles
Charles Keepax Sept. 18, 2023, 8:32 a.m. UTC | #2
On Mon, Sep 18, 2023 at 03:37:25AM +1000, John Watts wrote:
> The wm8782 supports rates 96kHz and 192kHz as long as the hardware
> is configured properly. Allow this to be specified in the device tree.
> 
> Signed-off-by: John Watts <contact@jookia.org>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles