public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: srinivas.kandagatla@linaro.org
Cc: broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
	lgirdwood@gmail.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] ASoC: qcom: sc8280xp: add Display port Jack
Date: Tue, 23 Apr 2024 13:48:50 +0200	[thread overview]
Message-ID: <ZiegIgranmsYg-KL@hovoldconsulting.com> (raw)
In-Reply-To: <20240422134354.89291-4-srinivas.kandagatla@linaro.org>

On Mon, Apr 22, 2024 at 02:43:53PM +0100, Srinivas Kandagatla wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> 
> Add support to Display Port Jack events, by making use of common helper

s/to/for/

drop comma

> function.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  sound/soc/qcom/sc8280xp.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
> index 878bd50ad4a7..38f97f19add9 100644
> --- a/sound/soc/qcom/sc8280xp.c
> +++ b/sound/soc/qcom/sc8280xp.c
> @@ -19,6 +19,7 @@ struct sc8280xp_snd_data {
>  	struct snd_soc_card *card;
>  	struct sdw_stream_runtime *sruntime[AFE_PORT_MAX];
>  	struct snd_soc_jack jack;
> +	struct snd_soc_jack hdmi_jack[8];

dp_jack

>  	bool jack_setup;
>  };
>  
> @@ -27,6 +28,8 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd)
>  	struct sc8280xp_snd_data *data = snd_soc_card_get_drvdata(rtd->card);
>  	struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
>  	struct snd_soc_card *card = rtd->card;
> +	struct snd_soc_jack *hdmi_jack  = NULL;

dp_jack

stray whitespace before =

> +	int hdmi_pcm_id = 0;

dp_pcm_id

no need to init

>  	switch (cpu_dai->id) {
>  	case WSA_CODEC_DMA_RX_0:
> @@ -41,10 +44,21 @@ static int sc8280xp_snd_init(struct snd_soc_pcm_runtime *rtd)
>  		snd_soc_limit_volume(card, "SpkrLeft PA Volume", 17);
>  		snd_soc_limit_volume(card, "SpkrRight PA Volume", 17);
>  		break;
> +	case DISPLAY_PORT_RX_0:
> +		hdmi_pcm_id = 0;
> +		hdmi_jack = &data->hdmi_jack[hdmi_pcm_id];
> +		break;
> +	case DISPLAY_PORT_RX_1 ... DISPLAY_PORT_RX_7:
> +		hdmi_pcm_id = cpu_dai->id - DISPLAY_PORT_RX_1 + 1;
> +		hdmi_jack = &data->hdmi_jack[hdmi_pcm_id];
> +		break;
>  	default:
>  		break;
>  	}
>  
> +	if (hdmi_jack)
> +		return qcom_snd_dp_jack_setup(rtd, hdmi_jack, hdmi_pcm_id);
> +
>  	return qcom_snd_wcd_jack_setup(rtd, &data->jack, &data->jack_setup);
>  }

Johan

  reply	other threads:[~2024-04-23 11:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 13:43 [PATCH v2 0/4] ASoC: qcom: display port changes srinivas.kandagatla
2024-04-22 13:43 ` [PATCH v2 1/4] ASoC: qcom: q6dsp: parse Display port tokens srinivas.kandagatla
2024-04-22 13:43 ` [PATCH v2 2/4] ASoC: qcom: common: add Display port Jack function srinivas.kandagatla
2024-04-23 11:44   ` Johan Hovold
2024-04-23 12:02   ` Johan Hovold
2024-04-23 15:55     ` Srinivas Kandagatla
2024-04-29 14:54       ` Johan Hovold
2024-05-09  8:59         ` Srinivas Kandagatla
2024-05-30 22:38           ` Dmitry Baryshkov
2024-05-31  6:44             ` Srinivas Kandagatla
2024-04-22 13:43 ` [PATCH v2 3/4] ASoC: qcom: sc8280xp: add Display port Jack srinivas.kandagatla
2024-04-23 11:48   ` Johan Hovold [this message]
2024-05-30 22:41   ` Dmitry Baryshkov
2024-04-22 13:43 ` [PATCH v2 4/4] ASoC: qcom: sm8250: fix a typo in function name srinivas.kandagatla
2024-04-23 11:59 ` [PATCH v2 0/4] ASoC: qcom: display port changes Johan Hovold
2024-04-23 12:38   ` Srinivas Kandagatla
2024-04-23 14:58     ` Johan Hovold
2024-04-23 15:59       ` Srinivas Kandagatla
2024-04-29 15:00         ` Johan Hovold
2024-05-30 22:56     ` Dmitry Baryshkov
2024-05-23  4:09 ` Xilin Wu
2024-05-24 12:50   ` Srinivas Kandagatla
2024-05-25  7:12     ` Xilin Wu
2024-06-06  9:18       ` Srinivas Kandagatla
2024-06-08 11:41         ` Xilin Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZiegIgranmsYg-KL@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox