[alsa-devel] [PATCH 6/6] ASoC: Intel: Add Haswell Machine support

Mark Brown broonie at kernel.org
Fri Feb 21 06:22:47 CET 2014


On Thu, Feb 20, 2014 at 09:48:47PM +0000, Liam Girdwood wrote:
> Add support for Haswell based machines with SST DSP audio.

Applied, thanks.

> +config SND_SOC_INTEL_HASWELL_MACH
> +        tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
> +        depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS
> +	select SND_SOC_INTEL_HASWELL
> +	select SND_SOC_RT5640
> +	help
> +          This adds support for the Lynxpoint Audio DSP on Intel(R) Haswell
> +	  Ultrabook platforms.
> +          Say Y if you have such a device
> +          If unsure select "N".

Looks like there's formatting issues here again - tab/space probably.

> +static const struct snd_soc_dapm_route haswell_rt5640_map[] = {
> +
> +	{"Headphones", NULL, "HPOR"},
> +	{"Headphones", NULL, "HPOL"},
> +	{"IN2P", NULL, "Mic"},
> +
> +	/* CODEC BE connections */
> +	{"SSP0 CODEC IN", NULL, "AIF1 Capture"},
> +	{"AIF1 Playback", NULL, "SSP0 CODEC OUT"},
> +};

A DPCM system in mainline!  Yay!

> +static int haswell_rt5640_hw_params(struct snd_pcm_substream *substream,
> +	struct snd_pcm_hw_params *params)
> +{
> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> +	struct snd_soc_dai *codec_dai = rtd->codec_dai;
> +	int ret;
> +
> +	/* Set codec DAI configuration */
> +	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
> +			SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
> +	if (ret < 0) {
> +		dev_err(rtd->dev, "can't set codec DAI configuration\n");
> +		return ret;
> +	}

Set .dai_fmt in the dai_link?

> +	/* set correct codec filter for DAI format and clock config */
> +	snd_soc_update_bits(rtd->codec, 0x83, 0xffff, 0x8000);

The CODEC driver ought to be figuring out the magic numbers for itself
really.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140221/82d82ed2/attachment-0001.sig>


More information about the Alsa-devel mailing list