From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
devicetree@vger.kernel.org, Khanh Le <khanh.le.xr@renesas.com>
Subject: Re: [PATCH 1/2] ASoC: Add ak4619 codec support
Date: Mon, 17 Jun 2024 09:29:50 +0200 [thread overview]
Message-ID: <bfc40d4b-f3ef-44ab-8048-1ff5bdcbfb57@linaro.org> (raw)
In-Reply-To: <875xu8tnpw.wl-kuninori.morimoto.gx@renesas.com>
On 17/06/2024 02:30, Kuninori Morimoto wrote:
> From: Khanh Le <khanh.le.xr@renesas.com>
>
> This patch adds support for the Asahi Kasei AK4619 audio codec.
>
> [Kuninori cleanuped and adjusted to upstream code]
...
> + /*
> + * Select below from Sound Card, not here
> + * SND_SOC_DAIFMT_CBC_CFC
> + * SND_SOC_DAIFMT_CBP_CFP
> + */
> +
> + /* First Priority */
> + SND_SOC_POSSIBLE_DAIFMT_I2S |
> + SND_SOC_POSSIBLE_DAIFMT_LEFT_J,
> +
> + /* Second Priority */
> + SND_SOC_POSSIBLE_DAIFMT_DSP_A |
> + SND_SOC_POSSIBLE_DAIFMT_DSP_B,
> +};
> +
> +static struct snd_soc_dai_ops ak4619_dai_ops = {
Missing const
> + .startup = ak4619_dai_startup,
> + .set_sysclk = ak4619_dai_set_sysclk,
> + .set_fmt = ak4619_dai_set_fmt,
> + .hw_params = ak4619_dai_hw_params,
> + .mute_stream = ak4619_dai_mute,
> + .auto_selectable_formats = ak4619_dai_formats,
> + .num_auto_selectable_formats = ARRAY_SIZE(ak4619_dai_formats),
> +};
> +
> +static const struct snd_soc_component_driver soc_component_dev_ak4619 = {
> + .set_bias_level = ak4619_set_bias_level,
> + .controls = ak4619_snd_controls,
> + .num_controls = ARRAY_SIZE(ak4619_snd_controls),
> + .dapm_widgets = ak4619_dapm_widgets,
> + .num_dapm_widgets = ARRAY_SIZE(ak4619_dapm_widgets),
> + .dapm_routes = ak4619_intercon,
> + .num_dapm_routes = ARRAY_SIZE(ak4619_intercon),
> + .idle_bias_on = 1,
> + .endianness = 1,
> +};
> +
> +static const struct regmap_config ak4619_regmap_cfg = {
> + .reg_bits = 8,
> + .val_bits = 8,
> + .max_register = 0x14,
> + .reg_defaults = ak4619_reg_defaults,
> + .num_reg_defaults = ARRAY_SIZE(ak4619_reg_defaults),
> + .cache_type = REGCACHE_RBTREE,
> +};
> +
> +static int ak4619_i2c_probe(struct i2c_client *i2c)
> +{
> + struct device *dev = &i2c->dev;
> + struct ak4619_priv *ak4619;
> + int ret;
> +
> + ak4619 = devm_kzalloc(dev, sizeof(struct ak4619_priv), GFP_KERNEL);
sizeof(*)
> + if (!ak4619)
> + return -ENOMEM;
> +
> + i2c_set_clientdata(i2c, ak4619);
> +
> + ak4619->regmap = devm_regmap_init_i2c(i2c, &ak4619_regmap_cfg);
> + if (IS_ERR(ak4619->regmap)) {
> + ret = PTR_ERR(ak4619->regmap);
> + dev_err(dev, "regmap_init() failed: %d\n", ret);
> + return ret;
> + }
> +
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-06-17 7:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 0:29 [PATCH 0/2] ASoC: Add ak4619 codec support Kuninori Morimoto
2024-06-17 0:30 ` [PATCH 1/2] " Kuninori Morimoto
2024-06-17 7:29 ` Krzysztof Kozlowski [this message]
2024-06-17 0:30 ` [PATCH 2/2] ASoC: dt-bindings: ak4619: Add initial DT binding Kuninori Morimoto
2024-06-17 7:27 ` Krzysztof Kozlowski
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=bfc40d4b-f3ef-44ab-8048-1ff5bdcbfb57@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=khanh.le.xr@renesas.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=robh@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).