Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp528425rdb; Thu, 22 Feb 2024 10:53:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXG/S+xNT8p2LRHVf9etr+c64IdmW34Es8/+NUdjlEeGAArkQMHP8v5H6IXwwFWuQOwbfYeDzu+/nHNnJuYW7CHuhEV4FixiBn7tNnEhQ== X-Google-Smtp-Source: AGHT+IHvat45gWqUgg7iYGHhMDQDl6NCjdT5x+zxOTpIJQ0RpP2l8JYpEV+eQQuVaRGH0LqCiJ54 X-Received: by 2002:aa7:c397:0:b0:564:726b:3200 with SMTP id k23-20020aa7c397000000b00564726b3200mr9683708edq.7.1708628010661; Thu, 22 Feb 2024 10:53:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708628010; cv=pass; d=google.com; s=arc-20160816; b=uZgXZVGaoUe/DPNUottILgw1CLDkDNAMAcjUy7fO1JafYedu7xFgo4OhEOkzEXBsnt pdvsXru+BAOTjK3TS4qtd3+S4n02CMs+bPzzTrxK73Mt4ER6D/ZYzCLbXlT6p8qafBmA 6Ixr0kOywsNsOTgoDrkwtsqJw/QMfqya7GAWO6kUO3pTo36oMSb3XD+ORMhq4eyU1CKY /Wp0O9dbimVSALzJHFgca8Ol7Y1D0TFXxj1aipoesc0mJpVVEEu8ApUOTlXivYAF0t/6 4S/rlA8KDS1SqNakc3hc3yLOvbEuAJDI3EDoPYrlT58i3gSSXTp+051TSezzEZkXqDn6 qWfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1gSqxMQBoVwu7JqgjdAIBetZr8NqAm96I/NuieBBA+E=; fh=yZHC7CGKzd61sQCu7xHXFfLh/T2R3JIR1Z9oUf+MZbM=; b=mo/tH/iYLpyzUoJwBUWlT4x45epHN2LGH5urPd22HhL+JJqXLLbLOdwKPZYuomIt6w niC5ZfL0mXAa0qaGL5z2ikhtIGF0QtAT80bGQfU7eQ8y2noCxOOAtRQr2m0FwscLPHry 97Ywun2Vv5Xplw3PnFGFObZE99nuOg+EvghE0IU5NIPa3u4qf1aIDRnh5evjrCaGxM7c wfPNGNdTx3G+XYROJ4FAqe+Wl++D1q/mUBqh9942+V6qlnqRvVJ+6KjxJTLFi8EAn8xN UJz9x5WY2XxH05PJGmBSCKR06bNsHlV73n4KcMU6QSn1+LkJe8VqSu+weoqXqLdmoBvm rFJA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tpLMDOqe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77189-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s8-20020a056402520800b00564901a92a8si3685580edd.39.2024.02.22.10.53.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 10:53:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77189-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tpLMDOqe; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77189-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EBEA01F26D4F for ; Thu, 22 Feb 2024 18:51:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 089F2140E58; Thu, 22 Feb 2024 18:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tpLMDOqe" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2125A38FB2; Thu, 22 Feb 2024 18:41:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627279; cv=none; b=NYdCxObBH8stsClgFE4HybdxEguSUFBQrMkeEJXIxeTHX2xsPG/8P/uqOEPXwgkHceoa1jht/FyBHvfsjxpdQUk/xxoqiwmcIiLMlduCPyL1SQ8+dqICmsbDFBc7i5t+UD1bO36gJXknsSN7KFeT+70LvGgd00rZWFivytOfE7U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627279; c=relaxed/simple; bh=6XJwHfKFPsJnbMTE3OuN1fl0JMH2yKdGnKVLUGPt9vE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=T0tYy2xm1bix7f3ZWQhfJgnpsj3UsPav4f2/Y7UX59QycVHaYDkbHCY6Um2zp3qtSfi2uJfckmWcp+Hga4MzsFvoNtx9eZzDwFw+F1LCM2aNLLjZmMRGWXSifr1T+jPjkYCuZvIyWu0dGLK1V1D0Qg0rA2fHKQT/OpIyXzKQu3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tpLMDOqe; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51715C433F1; Thu, 22 Feb 2024 18:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708627278; bh=6XJwHfKFPsJnbMTE3OuN1fl0JMH2yKdGnKVLUGPt9vE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tpLMDOqeEdmNC58Uv1I0ZhWdqg93g0Biw/4KKz68M0nSQgul88Y4P6czVnngiS5FF j9jZA7G/RqafCsvXvlBIScTzdIVWq5n+Lt04dv+Wsh003JHHr8KxaKVQOLlE7RkMdU sd4MUtnv0dwcYo92qgcUL5W762Yv3kr5sQAWMycB92ouqq4R6R7BvBiucG0kmSPhXW k1/bwLXSvgnDZptz9XdDH0OcBdZwaxsMyHSXDxJ8LzJXwwZajs2uopS0FJbXyEabgy 4OmPDv0lhyrRv+GeQO+3D7JWvcmxYVra554kvo9pD38WIEZsSO5C1mJxBrdRL3K3rr cI+RUxYTJBTXg== Date: Thu, 22 Feb 2024 18:41:13 +0000 From: Mark Brown To: =?utf-8?Q?Ond=C5=99ej?= Jirman Cc: linux-kernel@vger.kernel.org, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Arnaud Ferraris , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH 4/4] ASoC: sun8i-codec: Implement jack and accessory detection Message-ID: <0c351386-f1df-443f-a997-261f5c60c852@sirena.org.uk> References: <20240222181851.3398254-1-megi@xff.cz> <20240222181851.3398254-5-megi@xff.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nDVapEvA1lBavuoE" Content-Disposition: inline In-Reply-To: <20240222181851.3398254-5-megi@xff.cz> X-Cookie: I have accepted Provolone into my life! --nDVapEvA1lBavuoE Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 22, 2024 at 07:18:47PM +0100, Ond=C5=99ej Jirman wrote: > +static struct snd_soc_jack_pin sun8i_codec_jack_pins[] =3D { > + { > + .pin =3D "Headphone Jack", > + .mask =3D SND_JACK_HEADPHONE, > + }, > + { > + .pin =3D "Headset Microphone", > + .mask =3D 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 *compone= nt) > { > struct snd_soc_dapm_context *dapm =3D snd_soc_component_get_dapm(compon= ent); > struct sun8i_codec *scodec =3D snd_soc_component_get_drvdata(component); > int ret; > =20 > + scodec->card =3D component->card; > + The fact that you're needing to look at the card here should be a bit of a warning sign there. --nDVapEvA1lBavuoE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmXXlUgACgkQJNaLcl1U h9CKKgf/aoS85uaApPM+Hu5AKwDdPhzqPWfBz5tHxcaPCNpEosJgwvW7FkDEJJIs 7ODH56RBKAhTrzbyUAgg6PIgeOilZSXWzgUi5BkIqsSUJxW7jZJKa1Xk4XusRnOw 3bMp1wVMh1QlUVIV+0podvqlsDjEvC08l6Rq5hIRf7ZRxztdnsE9a774ZwTFyk2g UZeFv6KT7PegfqSNtyIrt9s/ghKpPAoCffRPkNTIc8+ZbGeBReomWijInFrK82gb rVHPuJdb5oXz/lH8Zj0LrFjEH511k6OxPwxGwwylruXbDyND/ur+YAhphUxrkTwO YIdwQVpj84jPawxlailo/ViT+V7i+A== =fWYW -----END PGP SIGNATURE----- --nDVapEvA1lBavuoE--