[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0c351386-f1df-443f-a997-261f5c60c852@sirena.org.uk>
Date: Thu, 22 Feb 2024 18:41:13 +0000
From: Mark Brown <broonie@...nel.org>
To: Ondřej Jirman <megi@....cz>
Cc: linux-kernel@...r.kernel.org, Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Arnaud Ferraris <arnaud.ferraris@...labora.com>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>, linux-sound@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH 4/4] ASoC: sun8i-codec: Implement jack and accessory
detection
On Thu, Feb 22, 2024 at 07:18:47PM +0100, Ondřej Jirman wrote:
> +static struct snd_soc_jack_pin sun8i_codec_jack_pins[] = {
> + {
> + .pin = "Headphone Jack",
> + .mask = SND_JACK_HEADPHONE,
> + },
> + {
> + .pin = "Headset Microphone",
> + .mask = SND_JACK_MICROPHONE,
> + },
> +};
> +
The jack being a headset jack is going to be system specific isn't it?
Some systems might have separate headphone and microphone jacks. I'd
not expect to see any pin handling code at all in a CODEC driver, that
belongs in the machine driver.
> static int sun8i_codec_component_probe(struct snd_soc_component *component)
> {
> struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
> struct sun8i_codec *scodec = snd_soc_component_get_drvdata(component);
> int ret;
>
> + scodec->card = component->card;
> +
The fact that you're needing to look at the card here should be a bit of
a warning sign there.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists