0323-Allow-up-to-24dB-digital-gain-to-be-applied-when-usi.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From e38ba0616f674d2e78f8edd52f8fe770eb0e0a8e Mon Sep 17 00:00:00 2001
  2. From: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
  3. Date: Fri, 6 May 2016 09:42:55 +0100
  4. Subject: [PATCH] Allow up to 24dB digital gain to be applied when using
  5. IQAudIO DAC
  6. 24db_digital_gain DT param can be used to specify that PCM512x
  7. codec "Digital" volume control should not be limited to 0dB gain,
  8. and if specified will allow the full 24dB gain.
  9. Signed-off-by: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
  10. ---
  11. arch/arm/boot/dts/overlays/README | 17 +++++++++++++++--
  12. arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts | 6 +++++-
  13. 2 files changed, 20 insertions(+), 3 deletions(-)
  14. --- a/arch/arm/boot/dts/overlays/README
  15. +++ b/arch/arm/boot/dts/overlays/README
  16. @@ -490,8 +490,21 @@ Params: <None>
  17. Name: iqaudio-dac
  18. Info: Configures the IQaudio DAC audio card
  19. -Load: dtoverlay=iqaudio-dac
  20. -Params: <None>
  21. +Load: dtoverlay=iqaudio-dac,<param>
  22. +Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec
  23. + Digital volume control. Enable with
  24. + "dtoverlay=iqaudio-dac,24db_digital_gain"
  25. + (The default behaviour is that the Digital
  26. + volume control is limited to a maximum of
  27. + 0dB. ie. it can attenuate but not provide
  28. + gain. For most users, this will be desired
  29. + as it will prevent clipping. By appending
  30. + the 24db_digital_gain parameter, the Digital
  31. + volume control will allow up to 24dB of
  32. + gain. If this parameter is enabled, it is the
  33. + responsibility of the user to ensure that
  34. + the Digital volume control is set to a value
  35. + that does not result in clipping/distortion!)
  36. Name: iqaudio-dacplus
  37. --- a/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts
  38. +++ b/arch/arm/boot/dts/overlays/iqaudio-dac-overlay.dts
  39. @@ -30,10 +30,14 @@
  40. fragment@2 {
  41. target = <&sound>;
  42. - __overlay__ {
  43. + frag2: __overlay__ {
  44. compatible = "iqaudio,iqaudio-dac";
  45. i2s-controller = <&i2s>;
  46. status = "okay";
  47. };
  48. };
  49. +
  50. + __overrides__ {
  51. + 24db_digital_gain = <&frag2>,"iqaudio,24db_digital_gain?";
  52. + };
  53. };