Re: [PATCH v2] ASoC: imx-wm8958: add imx-wm8958 machine driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 26, 2016 at 11:42:42AM +0800, Zidan Wang wrote:

> +	if (id == HIFI_DAI) {
> +		/*
> +		 * Set GPIO1 pin function to reserve, so that DAC1 and ADC1
> +		 * using shared LRCLK from DACLRCK1.
> +		 */
> +		snd_soc_update_bits(codec, WM8994_GPIO_1, 0x1f, 0x2);

No, this is broken - if you're writing directly into the register map of
a device without the driver that's just asking for breakage.

> +	} else if (id == VOICE_DAI) {
> +		/*

This looks like you're writing a switch statement...

> +		if (card->dapm.bias_level == SND_SOC_BIAS_OFF) {
> +			/* need to enable mclk to write/read wm8958 register */
> +			for (i = 0; i < WM8958_MCLK_MAX; i++) {
> +				if (!IS_ERR(data->mclk[i])) {
> +					ret = clk_prepare_enable(data->mclk[i]);

The CODEC needs to look after its own clocks.

> +	[VOICE_DAI] =   {
> +			.name = "Voice",
> +			.stream_name = "Voice",
> +			.cpu_dai_name = "snd-soc-dummy-dai",
> +			.codec_name = "wm8994-codec",
> +			.codec_dai_name = "wm8994-aif2",
> +			.platform_name = "snd-soc-dummy",

Why are you mapping in dummy DAIs?  If these devices aren't connected
then they're not connected and you shouldn't represent them.  If they
are connected to something then describe those connections, possibly in
followup patches if you have other devices you need to support upstream
first.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux