Enable USB audio offloading which allows to play audio via a USB-C
headset with lower power consumption and enabling some other features.

This can be used like the following:

  $ amixer -c0 cset name='USB_RX Audio Mixer MultiMedia1' On
  $ aplay --device=plughw:0,0 test.wav

Compared to regular playback to the USB sound card no xhci-hcd
interrupts appear during playback, instead the ADSP will be handling the
USB transfers.

Signed-off-by: Luca Weiss <luca.we...@fairphone.com>
---
 arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts 
b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 
e115b6a52b299ef663ccfb614785f8f89091f39d..d30912f952db271aa4fbc2570ca04b771ffef3ca
 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -1176,6 +1176,22 @@ platform {
                        sound-dai = <&q6routing>;
                };
        };
+
+       usb-dai-link {
+               link-name = "USB Playback";
+
+               codec {
+                       sound-dai = <&q6usbdai USB_RX>;
+               };
+
+               cpu {
+                       sound-dai = <&q6afedai USB_RX>;
+               };
+
+               platform {
+                       sound-dai = <&q6routing>;
+               };
+       };
 };
 
 &spi13 {

-- 
2.50.1


Reply via email to