[alsa-devel] [PATCH] ASoC: add RT286 CODEC driver
Takashi Iwai
tiwai at suse.de
Tue Nov 26 10:25:23 CET 2013
At Tue, 26 Nov 2013 17:11:31 +0800,
<bardliao at realtek.com> wrote:
>
> From: Bard Liao <bardliao at realtek.com>
>
> This patch adds the ALC286 codec driver.
>
> Signed-off-by: Bard Liao <bardliao at realtek.com>
> ---
>
> This is the initial codec driver of ALC586.
> I tested DMCI/Headset recording and Speaker/Headphone playback.
>
> ---
> sound/soc/codecs/Kconfig | 3 +
> sound/soc/codecs/Makefile | 2 +
> sound/soc/codecs/rt286.c | 1609 +++++++++++++++++++++++++++++++++++++++++++++
> sound/soc/codecs/rt286.h | 113 ++++
> 4 files changed, 1727 insertions(+)
> create mode 100644 sound/soc/codecs/rt286.c
> create mode 100644 sound/soc/codecs/rt286.h
>
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 983d087a..56748d4 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -313,6 +313,9 @@ config SND_SOC_PCM1792A
> config SND_SOC_PCM3008
> tristate
>
> +config SND_SOC_RT286
> + tristate
> +
> config SND_SOC_RT5631
> tristate
>
> diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
> index bc12676..b31615c 100644
> --- a/sound/soc/codecs/Makefile
> +++ b/sound/soc/codecs/Makefile
> @@ -48,6 +48,7 @@ snd-soc-pcm1792a-codec-objs := pcm1792a.o
> snd-soc-pcm3008-objs := pcm3008.o
> snd-soc-rt5631-objs := rt5631.o
> snd-soc-rt5640-objs := rt5640.o
> +snd-soc-rt286-objs := rt286.o
> snd-soc-sgtl5000-objs := sgtl5000.o
> snd-soc-alc5623-objs := alc5623.o
> snd-soc-alc5632-objs := alc5632.o
> @@ -181,6 +182,7 @@ obj-$(CONFIG_SND_SOC_PCM1792A) += snd-soc-pcm1792a-codec.o
> obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o
> obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o
> obj-$(CONFIG_SND_SOC_RT5640) += snd-soc-rt5640.o
> +obj-$(CONFIG_SND_SOC_RT286) += snd-soc-rt286.o
> obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o
> obj-$(CONFIG_SND_SOC_SIGMADSP) += snd-soc-sigmadsp.o
> obj-$(CONFIG_SND_SOC_SI476X) += snd-soc-si476x.o
> diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
> new file mode 100644
> index 0000000..e95f76c
> --- /dev/null
> +++ b/sound/soc/codecs/rt286.c
> @@ -0,0 +1,1609 @@
> +/*
> + * rt286.c -- RT286 ALSA SoC audio codec driver
> + *
> + * Copyright 2013 Realtek Semiconductor Corp.
> + * Author: Bard Liao <bardliao at realtek.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +#define DEBUG
> +#include <linux/module.h>
> +#include <linux/moduleparam.h>
> +#include <linux/init.h>
> +#include <linux/delay.h>
> +#include <linux/pm.h>
> +#include <linux/i2c.h>
> +#include <linux/platform_device.h>
> +#include <linux/spi/spi.h>
> +#include <linux/acpi.h>
> +#include <sound/core.h>
> +#include <sound/pcm.h>
> +#include <sound/pcm_params.h>
> +#include <sound/soc.h>
> +#include <sound/soc-dapm.h>
> +#include <sound/initval.h>
> +#include <sound/tlv.h>
> +
> +#include "../../pci/hda/hda_codec.h"
This is bad. If you need the definitions of HD-audio verbs, we can
split them into a public header instead.
Takashi
More information about the Alsa-devel
mailing list