From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v4] ASoC: add RT286 CODEC driver Date: Tue, 25 Feb 2014 09:23:33 +0100 Message-ID: References: <1393311589-14315-1-git-send-email-bardliao@realtek.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 8E2B726517F for ; Tue, 25 Feb 2014 09:23:34 +0100 (CET) In-Reply-To: <1393311589-14315-1-git-send-email-bardliao@realtek.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: bardliao@realtek.com Cc: oder_chiou@realtek.com, alsa-devel@alsa-project.org, lgirdwood@gmail.com, broonie@kernel.org, Gustaw Lewandowski , flove@realtek.com List-Id: alsa-devel@alsa-project.org At Tue, 25 Feb 2014 14:59:49 +0800, wrote: > > From: Bard Liao > > This patch adds the ALC286 codec driver. > > Signed-off-by: Bard Liao > Signed-off-by: Gustaw Lewandowski > > --- > > ALC286 is a dual mode codec, which can run as HD-A or I2S mode. > It is controlled by HD-A verb commands via I2C protocol. > The following is the I/O difference between ALC286 and general I2S codecs. > 1. A HD-A verb command contains three parts, NID, VID, and PID. > And an I2S command contains only two parts: address and data. > 2. Not only the register address is written, but the read command also > includes the entire write command. > 3. rt286 uses different registers for read and write the same bits. > As a result, standard regmap is difficult to be used on ALC286. > We don't request a standard I/O by snd_soc_codec_set_cache_io anymore. > Now we have ,reg_write and .reg_read functions for ALC286's I/O. > And we don't use cache due to item 3 above. > Some dummy registers (address <= 0xff) are defined for dapm routing. > Thhe dummy registers are cache only. > Due to item 2 above, HD-A verb commands are put into the address part of regmap. > When we issue HD-A verb write commands, the data part of regmap is zero. > > The jack detection function is done by Lewandowski Gustaw. > So I add Gustaw's Signed-off-by line in this patch > > The difference between this version and previous version is listed below. > * Use regmap_read/write instead of rt286_read/write to read write codec. > * Use the standard jack detection APIs for jack detection. > * Power off on bias level STANDBY. > * Add .symmetric_rates = 1. > * Add gpio2_en and remove irq_en in platform data. > * Other minor changes. You should put these in the patch changelog. The texts after the line "---" are ignored when applied to git. > --- /dev/null > +++ b/sound/soc/codecs/rt286.c > @@ -0,0 +1,1369 @@ > +/* > + * rt286.c -- RT286 ALSA SoC audio codec driver > + * > + * Copyright 2013 Realtek Semiconductor Corp. > + * Author: Bard Liao > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "../../pci/hda/hda_codec.h" Don't include this header here. The HD-audio verbs are defined in sound/hda_verbs.h in the usptream tree, so include it instead. Takashi