Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933477AbbELTa2 (ORCPT ); Tue, 12 May 2015 15:30:28 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:35034 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753261AbbELTa1 (ORCPT ); Tue, 12 May 2015 15:30:27 -0400 Date: Tue, 12 May 2015 20:30:14 +0100 From: Mark Brown To: Xing Zheng Cc: dgreid@chromium.org, dianders@chromium.org, heiko@sntech.de, sonnyrao@chromium.org, linux-rockchip@lists.infradead.org, zhengxing , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org Message-ID: <20150512193014.GB3066@sirena.org.uk> References: <1431422797-31903-1-git-send-email-zhengxing@rock-chips.com> <1431422797-31903-4-git-send-email-zhengxing@rock-chips.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="obAtV4On+KRLREo5" Content-Disposition: inline In-Reply-To: <1431422797-31903-4-git-send-email-zhengxing@rock-chips.com> X-Cookie: Auction: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 3/4] ASoC: rockchip: add rockchip machine driver for rt5650/rt5645 X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2536 Lines: 71 --obAtV4On+KRLREo5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 12, 2015 at 05:26:36PM +0800, Xing Zheng wrote: > From: zhengxing >=20 > The driver is used for rockchip board using a rt5650/rt5645. > Test on RK3288 with rt5650. Similar comments to the Maxim driver plus... > +/* Jack detect via rt5645 driver. */ > +extern int rt5645_set_jack_detect(struct snd_soc_codec *codec, > + struct snd_soc_jack *hp_jack, > + struct snd_soc_jack *mic_jack, > + struct snd_soc_jack *btn_jack); > + > +/* For compatible. */ > +int __weak rt5645_set_jack_detect(struct snd_soc_codec *codec, > + struct snd_soc_jack *hp_jack, > + struct snd_soc_jack *mic_jack, > + struct snd_soc_jack *btn_jack) > +{ > + dev_warn(codec->dev, "Jack detect dummy, have no implement it?\n"); > + > + return 0; > +} Don't do this - if the functionality isn't there in the CODEC driver get it implemented before you use it. Make sure you're using the API the CODEC actually ends up exporting. > + /* Enable Headset and 4 Buttons Jack detection */ > + ret =3D snd_soc_card_jack_new(card, "Headphone Jack", > + SND_JACK_HEADPHONE | SND_JACK_MICROPHONE, > + ret =3D snd_soc_card_jack_new(card, "Mic Jack", > + > + ret =3D snd_soc_card_jack_new(card, "Button Jack", No, don't do this - as discussed in another Chromebook review (I'm guessing this is a Chromebook) the jacks should represent the physical jacks in the system. It's possible you have separate headphone and microphone jacks but I really expect microphone and button to be on the same socket. --obAtV4On+KRLREo5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVUlTFAAoJECTWi3JdVIfQqjMH/2qpizPIinUrfeomSUdOeM4W lrG2OaGezU+DCa/DbeJMdBnFZ+tid5c1rh6abd5bnRIYWTZrkWXYYOkMQpAEC8GJ 1B2BFTpZEObLKIgg4qAkzuu/v4X6ScdxPHY/SFlsnIEUyaAvDbj3peycQJ838Vxz lwtRgkhc7TMTjOqI/lxMkdTNF5t6DMRY0ZXC/ZGjG2sO6shomdPEuUMnXFvcaQNv 8+iDNyfo4mdW5Rhkk6eWFf60p/phVC8R1aB6X4Rcbeao23kYi8zcsD1zFmKqrkyR e9z4mTG+mQpH7AjCC/cRlyD3ttZOjneDe9DNBxXRa1Z0BlFerOG8Z7eYW9IGUgo= =6AbP -----END PGP SIGNATURE----- --obAtV4On+KRLREo5-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/