From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH 1/3] sound/soc/codecs: add LAPIS Semiconductor ML26124 Date: Tue, 22 Nov 2011 11:19:20 +0000 Message-ID: <20111122111920.GB30048@opensource.wolfsonmicro.com> References: <1321848532-8784-1-git-send-email-tomoya.rohm@gmail.com> <20111121112607.GB3784@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Tomoya MORINAGA Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , Dimitris Papastamos , Mike Frysinger , Daniel Mack , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, qi.wang@intel.com, yong.y.wang@intel.com, joel.clark@intel.com, kok.howg.ewe@intel.com List-Id: alsa-devel@alsa-project.org On Tue, Nov 22, 2011 at 07:47:10PM +0900, Tomoya MORINAGA wrote: > 2011/11/21 Mark Brown wrote: > BTW, What's TLV ? Let me know the full spell of this "TLV". Tag/Length/Value. > >> +static const struct snd_kcontrol_new ml26124_dsp_controls[] =3D { > >> + =A0 =A0 SOC_SINGLE("Play Limitter ON/OFF", ML26124_FILTER_EN, 0,= 1, 0), > Do you mean SOC_SINGLE("Play Limitter Switch", ML26124_FILTER_EN, 0, = 1, 0) ? Yes. > >> + =A0 =A0 SOC_SINGLE("Set ALC position", ML26124_FILTER_EN, 5, 1, = 0), > > What does this actually do? =A0From the name it *really* doesn't lo= ok like > > a mixer input. > The above means where connects the ALC. > So, this doesn't relate to mixer input. If this control is not a mixer input it should not be a mixer input in the driver. Though with your explanation I still don't understand what it does so presumably the naming also needs to be improved. > However I couldn't understand the meaning of the widgets. So I didn't > write anything. See Documentation/sound/alsa/soc/dapm.txt. > >> +static int snd_card_codec_reg_read(struct ml26124_priv *priv, > >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0u= nsigned char reg, unsigned char *val) > >> +{ > >> + =A0 =A0 unsigned char data; > >> + =A0 =A0 struct i2c_client *i2c; > > Use the standard register access code, don't open code things in yo= ur > > driver unless there's a good reason to. =A0Current best practice fo= r most > > I2C or SPI devices is to use regmap, see any recently added driver = for > > examples. > What's "regmap" mean ? or do you mean drivers/mfd/* ? > Could you tell me this ? drivers/base/regmap and also grep in sound/soc/codecs/*.c > > Use snd_soc_update_bits() and the other standard register access > > functions. > Using snd_soc_update_bits(), need to register ".read" method. Or use a cache. > Is the same as the above snd_card_codec_reg_read ? I don't understand this question.