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.
Attachment:
signature.asc
Description: PGP signature
- Follow-Ups:
- Re: [PATCH 4/4] ASoC: sun8i-codec: Implement jack and accessory detection
- From: Ondřej Jirman
- Re: [PATCH 4/4] ASoC: sun8i-codec: Implement jack and accessory detection
- References:
- [PATCH 0/4] Add support for jack detection to codec present in A64 SoC
- From: Ondřej Jirman
- [PATCH 4/4] ASoC: sun8i-codec: Implement jack and accessory detection
- From: Ondřej Jirman
- [PATCH 0/4] Add support for jack detection to codec present in A64 SoC
- Prev by Date: Re: [PATCH 0/4] Add support for jack detection to codec present in A64 SoC
- Next by Date: Re: [PATCH] ALSA: pcm: clarify and fix default msbits value for all formats
- Previous by thread: [PATCH 4/4] ASoC: sun8i-codec: Implement jack and accessory detection
- Next by thread: Re: [PATCH 4/4] ASoC: sun8i-codec: Implement jack and accessory detection
- Index(es):