[3/3] arm64: dts: qcom: acer-aspire1: Add sound
Commit Message
This laptop has two i2s speakers; an i2s audio codec for the headset
jack; two DMIC microphones in the lid and the displayport audio channel.
This commit adds the audio node that describes all of the above with the
exception of the DMICs that require in-SoC digital codec to be brought
up, which will be done later.
Note that the displayport channel is connected here for completeness,
but the displayport can't be used yet since the HPD signal is created by
the embedded controller, which will be added later.
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts | 153 +++++++++++++++++++++++
1 file changed, 153 insertions(+)
Comments
On 27.10.2023 16:42, Nikita Travkin wrote:
> This laptop has two i2s speakers; an i2s audio codec for the headset
> jack; two DMIC microphones in the lid and the displayport audio channel.
>
> This commit adds the audio node that describes all of the above with the
> exception of the DMICs that require in-SoC digital codec to be brought
> up, which will be done later.
>
> Note that the displayport channel is connected here for completeness,
> but the displayport can't be used yet since the HPD signal is created by
> the embedded controller, which will be added later.
>
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> ---
[...]
> + primary-tx-dai-link {
> + link-name = "Primary MI2S Capture";
> +
> + cpu {
> + sound-dai = <&q6afedai PRIMARY_MI2S_TX>;
> + };
> +
> + platform {
> + sound-dai = <&q6routing>;
> + };
> +
> + codec {
> + sound-dai = <&alc5682 0>;
Both RX and TX going to 5862 interface?
Konrad
On 30.10.2023 22:50, Konrad Dybcio wrote:
> On 27.10.2023 16:42, Nikita Travkin wrote:
>> This laptop has two i2s speakers; an i2s audio codec for the headset
>> jack; two DMIC microphones in the lid and the displayport audio channel.
>>
>> This commit adds the audio node that describes all of the above with the
>> exception of the DMICs that require in-SoC digital codec to be brought
>> up, which will be done later.
>>
>> Note that the displayport channel is connected here for completeness,
>> but the displayport can't be used yet since the HPD signal is created by
>> the embedded controller, which will be added later.
>>
>> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
>> ---
> [...]
>
>
>> + primary-tx-dai-link {
>> + link-name = "Primary MI2S Capture";
>> +
>> + cpu {
>> + sound-dai = <&q6afedai PRIMARY_MI2S_TX>;
>> + };
>> +
>> + platform {
>> + sound-dai = <&q6routing>;
>> + };
>> +
>> + codec {
>> + sound-dai = <&alc5682 0>;
> Both RX and TX going to 5862 interface?
interface1*
>
> Konrad
Konrad Dybcio писал(а) 31.10.2023 02:51:
> On 30.10.2023 22:50, Konrad Dybcio wrote:
>> On 27.10.2023 16:42, Nikita Travkin wrote:
>>> This laptop has two i2s speakers; an i2s audio codec for the headset
>>> jack; two DMIC microphones in the lid and the displayport audio channel.
>>>
>>> This commit adds the audio node that describes all of the above with the
>>> exception of the DMICs that require in-SoC digital codec to be brought
>>> up, which will be done later.
>>>
>>> Note that the displayport channel is connected here for completeness,
>>> but the displayport can't be used yet since the HPD signal is created by
>>> the embedded controller, which will be added later.
>>>
>>> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
>>> ---
>> [...]
>>
>>
>>> + primary-tx-dai-link {
>>> + link-name = "Primary MI2S Capture";
>>> +
>>> + cpu {
>>> + sound-dai = <&q6afedai PRIMARY_MI2S_TX>;
>>> + };
>>> +
>>> + platform {
>>> + sound-dai = <&q6routing>;
>>> + };
>>> +
>>> + codec {
>>> + sound-dai = <&alc5682 0>;
>> Both RX and TX going to 5862 interface?
> interface1*
Yes, indeed. The codec has a single i2s with rx and tx, and
shared i2s clocks. They are connected to the prim i2s.
Codec playback is headphone jack, and capture is headset
mic. It could have also been the lid dmics, like on trogdor
but 2/3 describes that sad story...
Nikita
>>
>> Konrad
On 31.10.2023 08:26, Nikita Travkin wrote:
> Konrad Dybcio писал(а) 31.10.2023 02:51:
>> On 30.10.2023 22:50, Konrad Dybcio wrote:
>>> On 27.10.2023 16:42, Nikita Travkin wrote:
>>>> This laptop has two i2s speakers; an i2s audio codec for the headset
>>>> jack; two DMIC microphones in the lid and the displayport audio channel.
>>>>
>>>> This commit adds the audio node that describes all of the above with the
>>>> exception of the DMICs that require in-SoC digital codec to be brought
>>>> up, which will be done later.
>>>>
>>>> Note that the displayport channel is connected here for completeness,
>>>> but the displayport can't be used yet since the HPD signal is created by
>>>> the embedded controller, which will be added later.
>>>>
>>>> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
>>>> ---
>>> [...]
>>>
>>>
>>>> + primary-tx-dai-link {
>>>> + link-name = "Primary MI2S Capture";
>>>> +
>>>> + cpu {
>>>> + sound-dai = <&q6afedai PRIMARY_MI2S_TX>;
>>>> + };
>>>> +
>>>> + platform {
>>>> + sound-dai = <&q6routing>;
>>>> + };
>>>> +
>>>> + codec {
>>>> + sound-dai = <&alc5682 0>;
>>> Both RX and TX going to 5862 interface?
>> interface1*
>
> Yes, indeed. The codec has a single i2s with rx and tx, and
> shared i2s clocks. They are connected to the prim i2s.
>
> Codec playback is headphone jack, and capture is headset
> mic. It could have also been the lid dmics, like on trogdor
> but 2/3 describes that sad story...
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
@@ -3,6 +3,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sc7180.dtsi"
@@ -129,6 +130,113 @@ reg_lcm_3p3: panel-regulator {
pinctrl-names = "default";
};
+ sound: sound {
+ compatible = "qcom,sc7180-qdsp6-sndcard";
+ pinctrl-0 = <&pri_mi2s_active>, <&pri_mi2s_mclk_active>, <&ter_mi2s_active>;
+ pinctrl-names = "default";
+ model = "Acer-Aspire-1";
+
+ audio-routing =
+ "Headphone Jack", "HPOL",
+ "Headphone Jack", "HPOR";
+
+ multimedia1-dai-link {
+ link-name = "MultiMedia1";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+ };
+ };
+
+ multimedia2-dai-link {
+ link-name = "MultiMedia2";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
+ };
+ };
+
+ multimedia3-dai-link {
+ link-name = "MultiMedia3";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
+ };
+ };
+
+ multimedia4-dai-link {
+ link-name = "MultiMedia4";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>;
+ };
+ };
+
+ primary-rx-dai-link {
+ link-name = "Primary MI2S Playback";
+
+ cpu {
+ sound-dai = <&q6afedai PRIMARY_MI2S_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&alc5682 0>;
+ };
+ };
+
+ primary-tx-dai-link {
+ link-name = "Primary MI2S Capture";
+
+ cpu {
+ sound-dai = <&q6afedai PRIMARY_MI2S_TX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&alc5682 0>;
+ };
+ };
+
+ tertiary-rx-dai-link {
+ link-name = "Tertiary MI2S Playback";
+
+ cpu {
+ sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&max98357a>;
+ };
+ };
+
+ displayport-rx-dai-link {
+ link-name = "DisplayPort Playback";
+
+ cpu {
+ sound-dai = <&q6afedai DISPLAY_PORT_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&mdss_dp>;
+ };
+ };
+ };
+
reg_tp_3p3: touchpad-regulator {
compatible = "regulator-fixed";
regulator-name = "tp_3p3";
@@ -368,6 +476,45 @@ &pm6150_rtc {
status = "okay";
};
+&q6afedai {
+ dai@16 {
+ reg = <PRIMARY_MI2S_RX>;
+ qcom,sd-lines = <1>;
+ };
+
+ dai@17 {
+ reg = <PRIMARY_MI2S_TX>;
+ qcom,sd-lines = <0>;
+ };
+
+ dai@20 {
+ reg = <TERTIARY_MI2S_RX>;
+ qcom,sd-lines = <0>;
+ };
+
+ dai@104 {
+ reg = <DISPLAY_PORT_RX>;
+ };
+};
+
+&q6asmdai {
+ dai@0 {
+ reg = <0>;
+ };
+
+ dai@1 {
+ reg = <1>;
+ };
+
+ dai@2 {
+ reg = <2>;
+ };
+
+ dai@3 {
+ reg = <3>;
+ };
+};
+
&qupv3_id_0 {
status = "okay";
};
@@ -376,6 +523,12 @@ &qupv3_id_1 {
status = "okay";
};
+&remoteproc_adsp {
+ memory-region = <&adsp_mem>;
+ firmware-name = "qcom/sc7180/acer/aspire1/qcadsp7180.mbn";
+ status = "okay";
+};
+
&remoteproc_mpss {
firmware-name = "qcom/sc7180/acer/aspire1/qcmpss7180_nm.mbn";
status = "okay";