Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1436564

Re: [alsa-devel] [PATCH 3/4] ASoC: mediatek: add BT implementation

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [alsa-devel] [PATCH 3/4] ASoC: mediatek: add BT implementation
Date 2016-07-04 16:50 +0200
Message-ID <rRdm9-6R8-9@gated-at.bofh.it> (permalink)
References <rR9Lz-4Ah-3@gated-at.bofh.it> <rR9Lz-4Ah-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon, Jul 04, 2016 at 06:56:27PM +0800, Garlic Tseng wrote:

> +static int mt2701_btmrg_startup(struct snd_pcm_substream *substream,
> +				struct snd_soc_dai *dai)
> +{
> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> +	struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform);
> +	struct mt2701_afe_private *afe_priv = afe->platform_priv;
> +
> +	regmap_update_bits(afe->regmap, AUDIO_TOP_CON4,
> +			   AUDIO_TOP_CON4_PDN_MRGIF, 0);

We really shouldn't be writing the registers or other internal data of
the device.  Instead we should be getting the driver for the relevant
hardware component to do it.  If we just write to registers that makes
the interoperation with the real driver for the device more fragile than
it should be, people might update the main driver without noticing the
external driver.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[alsa-devel] [PATCH 3/4] ASoC: mediatek: add BT implementation Garlic Tseng <garlic.tseng@mediatek.com> - 2016-07-04 13:00 +0200
  Re: [alsa-devel] [PATCH 3/4] ASoC: mediatek: add BT implementation Mark Brown <broonie@kernel.org> - 2016-07-04 16:50 +0200
    Re: [alsa-devel] [PATCH 3/4] ASoC: mediatek: add BT implementation Garlic Tseng <garlic.tseng@mediatek.com> - 2016-07-05 04:00 +0200
      Re: [alsa-devel] [PATCH 3/4] ASoC: mediatek: add BT implementation Mark Brown <broonie@kernel.org> - 2016-07-05 10:20 +0200
        Re: [alsa-devel] [PATCH 3/4] ASoC: mediatek: add BT implementation Garlic Tseng <garlic.tseng@mediatek.com> - 2016-07-05 11:00 +0200
  Applied "ASoC: mediatek: add BT implementation" to the asoc tree Mark Brown <broonie@kernel.org> - 2016-07-05 12:00 +0200

csiph-web