From: Takashi Iwai <tiwai@suse.de>
To: bardliao@realtek.com
Cc: oder_chiou@realtek.com, alsa-devel@alsa-project.org,
lgirdwood@gmail.com, broonie@kernel.org,
Gustaw Lewandowski <gustaw.lewandowski@intel.com>,
flove@realtek.com
Subject: Re: [PATCH v4] ASoC: add RT286 CODEC driver
Date: Tue, 25 Feb 2014 09:23:33 +0100 [thread overview]
Message-ID: <s5htxbnvbwa.wl%tiwai@suse.de> (raw)
In-Reply-To: <1393311589-14315-1-git-send-email-bardliao@realtek.com>
At Tue, 25 Feb 2014 14:59:49 +0800,
<bardliao@realtek.com> wrote:
>
> From: Bard Liao <bardliao@realtek.com>
>
> This patch adds the ALC286 codec driver.
>
> Signed-off-by: Bard Liao <bardliao@realtek.com>
> Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@intel.com>
>
> ---
>
> 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 <bardliao@realtek.com>
> + *
> + * 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 <linux/module.h>
> +#include <linux/moduleparam.h>
> +#include <linux/init.h>
> +#include <linux/delay.h>
> +#include <linux/pm.h>
> +#include <linux/i2c.h>
> +#include <linux/platform_device.h>
> +#include <linux/spi/spi.h>
> +#include <linux/acpi.h>
> +#include <sound/core.h>
> +#include <sound/pcm.h>
> +#include <sound/pcm_params.h>
> +#include <sound/soc.h>
> +#include <sound/soc-dapm.h>
> +#include <sound/initval.h>
> +#include <sound/tlv.h>
> +#include <sound/jack.h>
> +#include <sound/rt286.h>
> +
> +#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
next prev parent reply other threads:[~2014-02-25 8:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 6:59 [PATCH v4] ASoC: add RT286 CODEC driver bardliao
2014-02-25 8:23 ` Takashi Iwai [this message]
2014-02-25 8:58 ` Bard Liao
2014-02-25 14:35 ` Liam Girdwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5htxbnvbwa.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=flove@realtek.com \
--cc=gustaw.lewandowski@intel.com \
--cc=lgirdwood@gmail.com \
--cc=oder_chiou@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox