From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Johan Hovold <johan@kernel.org>
Cc: peda@axentia.se, broonie@kernel.org, andersson@kernel.org,
krzk+dt@kernel.org, ivprusov@salutedevices.com,
luca.ceresoli@bootlin.com, zhoubinbin@loongson.cn,
paulha@opensource.cirrus.com, lgirdwood@gmail.com,
robh@kernel.org, conor+dt@kernel.org, konradybcio@kernel.org,
perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, johan+linaro@kernel.org,
Christopher Obbard <christopher.obbard@linaro.org>
Subject: Re: [PATCH v6 5/6] ASoC: codecs: wcd938x: add mux control support for hp audio mux
Date: Sat, 5 Apr 2025 20:27:47 +0300 [thread overview]
Message-ID: <6e135e55-b5e4-4ead-85ba-29c2cd6aa7a2@oss.qualcomm.com> (raw)
In-Reply-To: <8613cf45-d202-4577-868c-8caf771c7bc4@linaro.org>
On 03/04/2025 15:19, Srinivas Kandagatla wrote:
>
>
> On 02/04/2025 10:12, Johan Hovold wrote:
>> On Thu, Mar 27, 2025 at 10:06:32AM +0000, Srinivas Kandagatla wrote:
>>> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>>
>>> On some platforms to minimise pop and click during switching between
>>> CTIA and OMTP headset an additional HiFi mux is used. Most common
>>> case is that this switch is switched on by default, but on some
>>> platforms this needs a regulator enable.
>>>
>>> move to using mux control to enable both regulator and handle gpios,
>>> deprecate the usage of gpio.
>>>
>>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>> Tested-by: Christopher Obbard <christopher.obbard@linaro.org>
>>
>>> @@ -3261,11 +3276,26 @@ static int wcd938x_populate_dt_data(struct
>>> wcd938x_priv *wcd938x, struct device
>>> return dev_err_probe(dev, wcd938x->reset_gpio,
>>> "Failed to get reset gpio\n");
>>> - wcd938x->us_euro_gpio = devm_gpiod_get_optional(dev, "us-euro",
>>> - GPIOD_OUT_LOW);
>>> - if (IS_ERR(wcd938x->us_euro_gpio))
>>> - return dev_err_probe(dev, PTR_ERR(wcd938x->us_euro_gpio),
>>> - "us-euro swap Control GPIO not found\n");
>>> + wcd938x->us_euro_mux = devm_mux_control_get(dev, NULL);
>>
> Thanks Johan,
>> Running with this patch on the CRD I noticed that this now prints an
>> error as there is no optional mux (or gpio) defined:
>>
>> wcd938x_codec audio-codec: /audio-codec: failed to get mux-control
>> (0)
>
> This is not from codec driver, mux control is throwing up this.
>
>>
>> You need to suppress that error in mux_get() to allow for optional muxes
>> to be looked up like this.
> I have a plan for this,
>
> I proposed some changes to mux api for exclusive apis at https://
> lkml.org/lkml/2025/3/26/955
>
> This should also allow us to easily add an optional api, which I plan to
> do once i get some feedback on this patch.
I'd rather suggest an API to switch the state without deselecting the
the mux.
>
> --srini
>
>>
--
With best wishes
Dmitry
next prev parent reply other threads:[~2025-04-05 17:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-27 10:06 [PATCH v6 0/6] ASoC: wcd938x: enable t14s audio headset srinivas.kandagatla
2025-03-27 10:06 ` [PATCH v6 1/6] dt-bindings: mux: add optional regulator binding to gpio mux srinivas.kandagatla
2025-05-08 12:57 ` (subset) " Krzysztof Kozlowski
2025-03-27 10:06 ` [PATCH v6 2/6] mux: gpio: add optional regulator support srinivas.kandagatla
2025-04-01 10:16 ` Mark Brown
2025-04-02 8:11 ` Srinivas Kandagatla
2025-04-02 8:05 ` Johan Hovold
2025-05-08 12:45 ` Johan Hovold
2025-05-08 12:54 ` Krzysztof Kozlowski
2025-05-08 12:57 ` (subset) " Krzysztof Kozlowski
2025-03-27 10:06 ` [PATCH v6 3/6] ASoC: codecs: wcd-mbhc: cleanup swap_gnd_mic api srinivas.kandagatla
2025-03-27 12:11 ` Dmitry Baryshkov
2025-03-27 10:06 ` [PATCH v6 4/6] ASoC: dt-bindings: wcd93xx: add bindings for audio mux controlling hp srinivas.kandagatla
2025-03-27 10:06 ` [PATCH v6 5/6] ASoC: codecs: wcd938x: add mux control support for hp audio mux srinivas.kandagatla
2025-03-27 12:13 ` Dmitry Baryshkov
2025-04-02 8:06 ` Johan Hovold
2025-04-02 9:12 ` Johan Hovold
2025-04-03 12:19 ` Srinivas Kandagatla
2025-04-03 14:29 ` Johan Hovold
2025-04-05 17:27 ` Dmitry Baryshkov [this message]
2025-03-27 10:06 ` [PATCH v6 6/6] arm64: dts: qcom: x1e78100-t14s: Enable audio headset support srinivas.kandagatla
2025-04-02 8:08 ` Johan Hovold
2025-05-08 12:47 ` Johan Hovold
2025-05-08 12:55 ` Krzysztof Kozlowski
2025-05-17 5:57 ` (subset) " Bjorn Andersson
2025-04-08 12:49 ` (subset) [PATCH v6 0/6] ASoC: wcd938x: enable t14s audio headset Mark Brown
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=6e135e55-b5e4-4ead-85ba-29c2cd6aa7a2@oss.qualcomm.com \
--to=dmitry.baryshkov@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=broonie@kernel.org \
--cc=christopher.obbard@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ivprusov@salutedevices.com \
--cc=johan+linaro@kernel.org \
--cc=johan@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=paulha@opensource.cirrus.com \
--cc=peda@axentia.se \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.com \
--cc=zhoubinbin@loongson.cn \
/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