From: Johan Hovold <johan@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Banajit Goswami <bgoswami@quicinc.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: qcom: x1e80100: Add USB DisplayPort plug support
Date: Tue, 4 Jun 2024 12:43:46 +0200 [thread overview]
Message-ID: <Zl7v4hezEYcuCORC@hovoldconsulting.com> (raw)
In-Reply-To: <20240604094638.97780-1-krzysztof.kozlowski@linaro.org>
On Tue, Jun 04, 2024 at 11:46:38AM +0200, Krzysztof Kozlowski wrote:
> Add support for handling jack events of USB (DisplayPort).
> Depends on:
> https://lore.kernel.org/all/20240422134354.89291-1-srinivas.kandagatla@linaro.org/
> ---
> @@ -20,12 +20,32 @@ struct x1e80100_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];
As I asked Srini, please rename this dp_jack.
> bool jack_setup;
> };
>
> static int x1e80100_snd_init(struct snd_soc_pcm_runtime *rtd)
> {
> struct x1e80100_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_jack *hdmi_jack = NULL;
> + int hdmi_pcm_id = 0;
And use dp_ prefixes here too.
> +
> + switch (cpu_dai->id) {
> + 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
prev parent reply other threads:[~2024-06-04 10:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 9:46 [PATCH] ASoC: qcom: x1e80100: Add USB DisplayPort plug support Krzysztof Kozlowski
2024-06-04 10:43 ` Johan Hovold [this message]
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=Zl7v4hezEYcuCORC@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@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