Re: [PATCH 06/13] arm64: dts: qcom: msm8916-wingtech-wt88047: Add sound and modem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26.09.2023 18:51, Stephan Gerhold wrote:
> Enable sound and modem for the Xiaomi Redmi 2. The setup
> is similar to most MSM8916 devices, i.e.:
> 
>  - QDSP6 audio
>  - Earpiece/headphones/microphones via digital/analog codec in
>    MSM8916/PM8916
>  - Audio jack detection via analog codec in PM8916
>  - WWAN Internet via BAM-DMUX
> 
> except:
> 
>  - Speaker amplifier is connected to HPH_R (headphones) output of the
>    analog codec. There is a separate analog switch that allows disabling
>    playback via the headphone jack.
> 
> Signed-off-by: Stephan Gerhold <stephan@xxxxxxxxxxx>
> ---
>  .../boot/dts/qcom/msm8916-wingtech-wt88047.dts     | 76 ++++++++++++++++++++++
>  1 file changed, 76 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
> index 419f35c1fc92..600c225a2568 100644
> --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
> +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts
> @@ -6,6 +6,8 @@
>  /dts-v1/;
>  
>  #include "msm8916-pm8916.dtsi"
> +#include "msm8916-modem-qdsp6.dtsi"
> +
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/input/input.h>
>  #include <dt-bindings/leds/common.h>
> @@ -25,6 +27,28 @@ chosen {
>  		stdout-path = "serial0";
>  	};
>  
> +	speaker_amp: audio-amplifier {
> +		compatible = "simple-audio-amplifier";
> +		enable-gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>;
> +		sound-name-prefix = "Speaker Amp";
> +		pinctrl-0 = <&speaker_amp_default>;
> +		pinctrl-names = "default";
> +	};
> +
> +	/*
> +	 * This seems to be actually an analog switch that either routes audio
> +	 * to the headphone jack or nowhere. Given that we need to enable a GPIO
> +	 * to get sound on headphones, modelling it as simple-audio-amplifier
> +	 * works just fine.
> +	 */
Funny phones, as always

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>

Konrad




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux