[alsa-devel] [PATCH 2/3] sound: soc: fsl: Add support for Novena onboard audio

Mark Brown broonie at kernel.org
Fri Feb 7 19:14:33 CET 2014


On Fri, Feb 07, 2014 at 01:05:16PM +0800, Sean Cross wrote:
> Novena uses an ES8328 audio codec connected via I2S.

The CODEC looked pretty simple, can this use simple-card?

> +	/* Headphone jack detection */
> +	if (gpio_is_valid(data->jack_gpio)) {
> +		ret = snd_soc_jack_new(rtd->codec, "Headset",
> +				       SND_JACK_HEADSET | SND_JACK_BTN_0,
> +				       &headset_jack);
> +		if (ret)
> +			return ret;
> +
> +		headset_jack_gpios[0].gpio = data->jack_gpio;
> +		ret = snd_soc_jack_add_gpios(&headset_jack,
> +					     ARRAY_SIZE(headset_jack_gpios),
> +					     headset_jack_gpios);
> +	}

We'd need to add support for this but that shouldn't be too hard.

> +static int imx_set_frequency(struct imx_novena_data *data, int freq) {
> +	int ret;
> +
> +	ret = clk_set_parent(data->system_cko, data->codec_clk);
> +	if (ret) {
> +		dev_err(data->dev, "unable to set clk output");
> +		return ret;
> +	}
> +
> +	ret = clk_set_parent(data->codec_clk_sel, data->codec_clk_post_div);
> +	if (ret) {
> +		dev_err(data->dev, "unable to set clk parent");
> +		return ret;
> +	}

There's supposed to be support for this sort of thing going into the
clock API with some sort of generic binding.
-------------- 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/20140207/5ec74e59/attachment.sig>


More information about the Alsa-devel mailing list