diff mbox series

[v3,21/28] ASoC: dt-bindings: Update example for enabling USB offload on SM8250

Message ID 20230308235751.495-22-quic_wcheng@quicinc.com (mailing list archive)
State New, archived
Headers show
Series Introduce QC USB SND audio offloading support | expand

Commit Message

Wesley Cheng March 8, 2023, 11:57 p.m. UTC
Add an example on enabling of USB offload for the Q6DSP.  The routing can
be done by the mixer, which can pass the multimedia stream to the USB
backend.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
 .../devicetree/bindings/sound/qcom,sm8250.yaml    | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Krzysztof Kozlowski March 10, 2023, 8:56 a.m. UTC | #1
On 09/03/2023 00:57, Wesley Cheng wrote:
> Add an example on enabling of USB offload for the Q6DSP.  The routing can
> be done by the mixer, which can pass the multimedia stream to the USB
> backend.
> 
> Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

You still miss binding change to APR/GPR. Where is the USB DAI going to sit?



Best regards,
Krzysztof
Wesley Cheng June 23, 2023, 12:51 a.m. UTC | #2
Hi Krzysztof,

On 3/10/2023 12:56 AM, Krzysztof Kozlowski wrote:
> On 09/03/2023 00:57, Wesley Cheng wrote:
>> Add an example on enabling of USB offload for the Q6DSP.  The routing can
>> be done by the mixer, which can pass the multimedia stream to the USB
>> backend.
>>
>> Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
> 
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> You still miss binding change to APR/GPR. Where is the USB DAI going to sit?
> 

My initial idea is to have it as part of the q6afe APR node (as a 
child).  It would need to issues some transactions over APR to the Q6AFE 
port on the audio DSP, which was the main reason for this.

Something like:

q6afe: apr-service@4 {
	compatible = "qcom,q6afe";
	reg = <APR_SVC_AFE>;
	q6afedai: dais {
		compatible = "qcom,q6afe-dais";
		#address-cells = <1>;
		#size-cells = <0>;
		#sound-dai-cells = <1>;
	};
...
	usbdai: usbd {
		compatible = "qcom,q6usb";
		#sound-dai-cells = <1>;
		iommus = <&apps_smmu 0x180f 0x0>;
		qcom,usb-audio-stream-id = <0xf>;
		qcom,usb-audio-intr-num = <2>;
	};
};

I think the only modification I would probably make is to have an 
example of how to add the q6usb node to enable the audio offloading.

Thanks,
Wesley Cheng

> 
> 
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
index 262de7a60a73..13145e010ddf 100644
--- a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
@@ -220,6 +220,21 @@  examples:
                 sound-dai = <&vamacro 0>;
             };
         };
+
+        usb-dai-link {
+            link-name = "USB Playback";
+            cpu {
+                sound-dai = <&q6afedai USB_RX>;
+            };
+
+            codec {
+                sound-dai = <&usbdai USB_RX>;
+            };
+
+            platform {
+                sound-dai = <&q6routing>;
+            };
+        };
     };
 
   - |