lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 22 Feb 2024 21:18:00 +0100
From: Ondřej Jirman <megi@....cz>
To: Mark Brown <broonie@...nel.org>
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

Hello Mark,

On Thu, Feb 22, 2024 at 06:41:13PM +0000, Mark Brown wrote:
> 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.

Yeah, the only reason this and the card reference seems to be here is to
check whether jack detection should be enabled and in what capacity.

Looks like there's some set_jack component callback for that. :)

I'll look into that.

kind regards,
	o.

> >  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.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ