Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Cc: alsa-devel@alsa-project.org, garlic.tseng@mediatek.com,
	linux-mediatek@lists.infradead.org, chipeng.chang@mediatek.com,
	wsd_upstream@mediatek.com
Subject: Re: [PATCH v4 1/5] ASoC: add mt6351 codec driver
Date: Wed, 25 Apr 2018 18:19:34 +0100	[thread overview]
Message-ID: <20180425171934.GH24769@sirena.org.uk> (raw)
In-Reply-To: <20180425072522.14167-2-kaichieh.chuang@mediatek.com>


[-- Attachment #1.1: Type: text/plain, Size: 1624 bytes --]

On Wed, Apr 25, 2018 at 03:25:18PM +0800, KaiChieh Chuang wrote:

This is almost ready, a few more things below that I just noticed as the
bigger issues have all been dealt with now.  Sorry, should've noticed
most of these sooner.

> +++ b/sound/soc/codecs/mt6351.c
> @@ -0,0 +1,1516 @@
> +/*
> + * mt6351.c  --  mt6351 ALSA SoC audio codec driver
> + *
> + * Copyright (c) 2018 MediaTek Inc.
> + * Author: KaiChieh Chuang <kaichieh.chuang@mediatek.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.

This should be a C++ comment with a SPDX header instead of the GPL
statement.

> +static unsigned int get_play_reg_val(struct snd_soc_codec *codec,
> +				     unsigned int rate)

The driver is using snd_soc_codec quite a bit but we are trying to
transition away from that to snd_soc_component - you can see a lot of
example transitions in mainline from Moritmoto-san, everything that
exists at the CODEC level has a pretty direct equivalent in the
component struct so it's mostly (but not quite entirely unfortunately)
search and replace.

> +static struct snd_soc_codec_driver mt6351_soc_codec_driver = {
> +	.probe = mt6351_codec_probe,
> +
> +	.component_driver = {
> +		.dapm_widgets = mt6351_dapm_widgets,
> +		.num_dapm_widgets = ARRAY_SIZE(mt6351_dapm_widgets),
> +		.dapm_routes = mt6351_dapm_routes,
> +		.num_dapm_routes = ARRAY_SIZE(mt6351_dapm_routes),
> +	},
> +};

You should be able to add the controls that you're manually registering
in probe here.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2018-04-25 17:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25  7:25 [PATCH v4 0/5] ASoC: mediatek: add support for mt6797 SoC KaiChieh Chuang
     [not found] ` <20180425072522.14167-1-kaichieh.chuang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-04-25  7:25   ` [PATCH v4 1/5] ASoC: add mt6351 codec driver KaiChieh Chuang
2018-04-25 17:19     ` Mark Brown [this message]
2018-04-25  7:25   ` [PATCH v4 2/5] ASoC: mt6797: add structure define and clock control function for 6797 KaiChieh Chuang
2018-04-25 17:52     ` Mark Brown
2018-04-25  7:25   ` [PATCH v4 3/5] ASoC: mt6797: add mt6797 platform driver KaiChieh Chuang
2018-04-25  7:25 ` [PATCH v4 4/5] ASoC: add mt6797-mt6351 driver and config option KaiChieh Chuang
2018-04-25  7:25 ` [PATCH v4 5/5] ASoC: mediatek: add documents for mt6797 KaiChieh Chuang

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=20180425171934.GH24769@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=chipeng.chang@mediatek.com \
    --cc=garlic.tseng@mediatek.com \
    --cc=kaichieh.chuang@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=wsd_upstream@mediatek.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