[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160704144406.GH6247@sirena.org.uk>
Date: Mon, 4 Jul 2016 16:44:06 +0200
From: Mark Brown <broonie@...nel.org>
To: Garlic Tseng <garlic.tseng@...iatek.com>
Cc: tiwai@...e.de, srv_heupstream@...iatek.com,
linux-mediatek@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org, koro.chen@...iatek.com,
PC.Liao@...iatek.com, ir.lian@...iatek.com
Subject: Re: [alsa-devel] [PATCH 3/4] ASoC: mediatek: add BT implementation
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.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists