[alsa-devel] [PATCH 1/8] sound:asoc: Add support for STA529 Audio Codec
Lars-Peter Clausen
lars at metafoo.de
Tue Mar 20 18:57:06 CET 2012
On 03/20/2012 12:33 PM, Rajeev Kumar wrote:
> +static const char *interface_mode_text[] = { "slave", "master"};
Master/slave mode should be configured using the set_dai_fmt callback.
> +
> +static struct snd_soc_dai_ops sta529_dai_ops = {
const
> + .hw_params = sta529_hw_params,
> + .set_fmt = sta529_set_dai_fmt,
> + .digital_mute = sta529_mute,
> +};
> +
> +/* power down chip */
> +static int sta529_remove(struct snd_soc_codec *codec)
> +{
> + sta529_set_bias_level(codec, SND_SOC_BIAS_OFF);
> +
> + return 0;
> +}
> +
> +static int sta529_suspend(struct snd_soc_codec *codec, pm_message_t state)
The suspend callback doesn't take the state parameter anymore.
> +{
> + sta529_set_bias_level(codec, SND_SOC_BIAS_OFF);
> +
> + return 0;
> +}
> +
> +static int sta529_resume(struct snd_soc_codec *codec)
> +{
> + snd_soc_cache_sync(codec);
> + sta529_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
> + sta529_set_bias_level(codec, codec->dapm.suspend_bias_level);
> +
> + return 0;
> +}
> +
> +struct snd_soc_codec_driver soc_codec_dev_sta529 = {
A better name is be sta520_codec_driver
[...]
> +
> +static int sta529_i2c_remove(struct i2c_client *client)
__devexit
> +{
> + snd_soc_unregister_codec(&client->dev);
> + kfree(i2c_get_clientdata(client));
> + return 0;
> +}
river");
> +MODULE_AUTHOR("Rajeev Kumar <rajeev-dlh.kumar at st.com>");
> +MODULE_LICENSE("GPL");
More information about the Alsa-devel
mailing list