mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 19:53:59 +08:00
Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next
This commit is contained in:
commit
0b1107b29b
96
include/linux/mfd/arizona/gpio.h
Normal file
96
include/linux/mfd/arizona/gpio.h
Normal file
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* GPIO configuration for Arizona devices
|
||||
*
|
||||
* Copyright 2013 Wolfson Microelectronics. PLC.
|
||||
*
|
||||
* Author: Charles Keepax <ckeepax@opensource.wolfsonmicro.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.
|
||||
*/
|
||||
|
||||
#ifndef _ARIZONA_GPIO_H
|
||||
#define _ARIZONA_GPIO_H
|
||||
|
||||
#define ARIZONA_GP_FN_TXLRCLK 0x00
|
||||
#define ARIZONA_GP_FN_GPIO 0x01
|
||||
#define ARIZONA_GP_FN_IRQ1 0x02
|
||||
#define ARIZONA_GP_FN_IRQ2 0x03
|
||||
#define ARIZONA_GP_FN_OPCLK 0x04
|
||||
#define ARIZONA_GP_FN_FLL1_OUT 0x05
|
||||
#define ARIZONA_GP_FN_FLL2_OUT 0x06
|
||||
#define ARIZONA_GP_FN_PWM1 0x08
|
||||
#define ARIZONA_GP_FN_PWM2 0x09
|
||||
#define ARIZONA_GP_FN_SYSCLK_UNDERCLOCKED 0x0A
|
||||
#define ARIZONA_GP_FN_ASYNCCLK_UNDERCLOCKED 0x0B
|
||||
#define ARIZONA_GP_FN_FLL1_LOCK 0x0C
|
||||
#define ARIZONA_GP_FN_FLL2_LOCK 0x0D
|
||||
#define ARIZONA_GP_FN_FLL1_CLOCK_OK 0x0F
|
||||
#define ARIZONA_GP_FN_FLL2_CLOCK_OK 0x10
|
||||
#define ARIZONA_GP_FN_HEADPHONE_DET 0x12
|
||||
#define ARIZONA_GP_FN_MIC_DET 0x13
|
||||
#define ARIZONA_GP_FN_WSEQ_STATUS 0x15
|
||||
#define ARIZONA_GP_FN_CIF_ADDRESS_ERROR 0x16
|
||||
#define ARIZONA_GP_FN_ASRC1_LOCK 0x1A
|
||||
#define ARIZONA_GP_FN_ASRC2_LOCK 0x1B
|
||||
#define ARIZONA_GP_FN_ASRC_CONFIG_ERROR 0x1C
|
||||
#define ARIZONA_GP_FN_DRC1_SIGNAL_DETECT 0x1D
|
||||
#define ARIZONA_GP_FN_DRC1_ANTICLIP 0x1E
|
||||
#define ARIZONA_GP_FN_DRC1_DECAY 0x1F
|
||||
#define ARIZONA_GP_FN_DRC1_NOISE 0x20
|
||||
#define ARIZONA_GP_FN_DRC1_QUICK_RELEASE 0x21
|
||||
#define ARIZONA_GP_FN_DRC2_SIGNAL_DETECT 0x22
|
||||
#define ARIZONA_GP_FN_DRC2_ANTICLIP 0x23
|
||||
#define ARIZONA_GP_FN_DRC2_DECAY 0x24
|
||||
#define ARIZONA_GP_FN_DRC2_NOISE 0x25
|
||||
#define ARIZONA_GP_FN_DRC2_QUICK_RELEASE 0x26
|
||||
#define ARIZONA_GP_FN_MIXER_DROPPED_SAMPLE 0x27
|
||||
#define ARIZONA_GP_FN_AIF1_CONFIG_ERROR 0x28
|
||||
#define ARIZONA_GP_FN_AIF2_CONFIG_ERROR 0x29
|
||||
#define ARIZONA_GP_FN_AIF3_CONFIG_ERROR 0x2A
|
||||
#define ARIZONA_GP_FN_SPK_TEMP_SHUTDOWN 0x2B
|
||||
#define ARIZONA_GP_FN_SPK_TEMP_WARNING 0x2C
|
||||
#define ARIZONA_GP_FN_UNDERCLOCKED 0x2D
|
||||
#define ARIZONA_GP_FN_OVERCLOCKED 0x2E
|
||||
#define ARIZONA_GP_FN_DSP_IRQ1 0x35
|
||||
#define ARIZONA_GP_FN_DSP_IRQ2 0x36
|
||||
#define ARIZONA_GP_FN_ASYNC_OPCLK 0x3D
|
||||
#define ARIZONA_GP_FN_BOOT_DONE 0x44
|
||||
#define ARIZONA_GP_FN_DSP1_RAM_READY 0x45
|
||||
#define ARIZONA_GP_FN_SYSCLK_ENA_STATUS 0x4B
|
||||
#define ARIZONA_GP_FN_ASYNCCLK_ENA_STATUS 0x4C
|
||||
|
||||
#define ARIZONA_GPN_DIR 0x8000 /* GPN_DIR */
|
||||
#define ARIZONA_GPN_DIR_MASK 0x8000 /* GPN_DIR */
|
||||
#define ARIZONA_GPN_DIR_SHIFT 15 /* GPN_DIR */
|
||||
#define ARIZONA_GPN_DIR_WIDTH 1 /* GPN_DIR */
|
||||
#define ARIZONA_GPN_PU 0x4000 /* GPN_PU */
|
||||
#define ARIZONA_GPN_PU_MASK 0x4000 /* GPN_PU */
|
||||
#define ARIZONA_GPN_PU_SHIFT 14 /* GPN_PU */
|
||||
#define ARIZONA_GPN_PU_WIDTH 1 /* GPN_PU */
|
||||
#define ARIZONA_GPN_PD 0x2000 /* GPN_PD */
|
||||
#define ARIZONA_GPN_PD_MASK 0x2000 /* GPN_PD */
|
||||
#define ARIZONA_GPN_PD_SHIFT 13 /* GPN_PD */
|
||||
#define ARIZONA_GPN_PD_WIDTH 1 /* GPN_PD */
|
||||
#define ARIZONA_GPN_LVL 0x0800 /* GPN_LVL */
|
||||
#define ARIZONA_GPN_LVL_MASK 0x0800 /* GPN_LVL */
|
||||
#define ARIZONA_GPN_LVL_SHIFT 11 /* GPN_LVL */
|
||||
#define ARIZONA_GPN_LVL_WIDTH 1 /* GPN_LVL */
|
||||
#define ARIZONA_GPN_POL 0x0400 /* GPN_POL */
|
||||
#define ARIZONA_GPN_POL_MASK 0x0400 /* GPN_POL */
|
||||
#define ARIZONA_GPN_POL_SHIFT 10 /* GPN_POL */
|
||||
#define ARIZONA_GPN_POL_WIDTH 1 /* GPN_POL */
|
||||
#define ARIZONA_GPN_OP_CFG 0x0200 /* GPN_OP_CFG */
|
||||
#define ARIZONA_GPN_OP_CFG_MASK 0x0200 /* GPN_OP_CFG */
|
||||
#define ARIZONA_GPN_OP_CFG_SHIFT 9 /* GPN_OP_CFG */
|
||||
#define ARIZONA_GPN_OP_CFG_WIDTH 1 /* GPN_OP_CFG */
|
||||
#define ARIZONA_GPN_DB 0x0100 /* GPN_DB */
|
||||
#define ARIZONA_GPN_DB_MASK 0x0100 /* GPN_DB */
|
||||
#define ARIZONA_GPN_DB_SHIFT 8 /* GPN_DB */
|
||||
#define ARIZONA_GPN_DB_WIDTH 1 /* GPN_DB */
|
||||
#define ARIZONA_GPN_FN_MASK 0x007F /* GPN_DB */
|
||||
#define ARIZONA_GPN_FN_SHIFT 0 /* GPN_DB */
|
||||
#define ARIZONA_GPN_FN_WIDTH 7 /* GPN_DB */
|
||||
|
||||
#endif
|
@ -123,6 +123,7 @@ config SND_SOC_ALL_CODECS
|
||||
select SND_SOC_WM8994 if MFD_WM8994
|
||||
select SND_SOC_WM8995 if SND_SOC_I2C_AND_SPI
|
||||
select SND_SOC_WM8996 if I2C
|
||||
select SND_SOC_WM8997 if MFD_WM8997
|
||||
select SND_SOC_WM9081 if I2C
|
||||
select SND_SOC_WM9090 if I2C
|
||||
select SND_SOC_WM9705 if SND_SOC_AC97_BUS
|
||||
@ -146,8 +147,10 @@ config SND_SOC_ARIZONA
|
||||
tristate
|
||||
default y if SND_SOC_WM5102=y
|
||||
default y if SND_SOC_WM5110=y
|
||||
default y if SND_SOC_WM8997=y
|
||||
default m if SND_SOC_WM5102=m
|
||||
default m if SND_SOC_WM5110=m
|
||||
default m if SND_SOC_WM8997=m
|
||||
|
||||
config SND_SOC_WM_HUBS
|
||||
tristate
|
||||
@ -504,6 +507,9 @@ config SND_SOC_WM8995
|
||||
config SND_SOC_WM8996
|
||||
tristate
|
||||
|
||||
config SND_SOC_WM8997
|
||||
tristate
|
||||
|
||||
config SND_SOC_WM9081
|
||||
tristate
|
||||
|
||||
|
@ -115,6 +115,7 @@ snd-soc-wm8991-objs := wm8991.o
|
||||
snd-soc-wm8993-objs := wm8993.o
|
||||
snd-soc-wm8994-objs := wm8994.o wm8958-dsp2.o
|
||||
snd-soc-wm8995-objs := wm8995.o
|
||||
snd-soc-wm8997-objs := wm8997.o
|
||||
snd-soc-wm9081-objs := wm9081.o
|
||||
snd-soc-wm9090-objs := wm9090.o
|
||||
snd-soc-wm9705-objs := wm9705.o
|
||||
@ -241,6 +242,7 @@ obj-$(CONFIG_SND_SOC_WM8991) += snd-soc-wm8991.o
|
||||
obj-$(CONFIG_SND_SOC_WM8993) += snd-soc-wm8993.o
|
||||
obj-$(CONFIG_SND_SOC_WM8994) += snd-soc-wm8994.o
|
||||
obj-$(CONFIG_SND_SOC_WM8995) += snd-soc-wm8995.o
|
||||
obj-$(CONFIG_SND_SOC_WM8997) += snd-soc-wm8997.o
|
||||
obj-$(CONFIG_SND_SOC_WM9081) += snd-soc-wm9081.o
|
||||
obj-$(CONFIG_SND_SOC_WM9090) += snd-soc-wm9090.o
|
||||
obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-wm9705.o
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <sound/tlv.h>
|
||||
|
||||
#include <linux/mfd/arizona/core.h>
|
||||
#include <linux/mfd/arizona/gpio.h>
|
||||
#include <linux/mfd/arizona/registers.h>
|
||||
|
||||
#include "arizona.h"
|
||||
@ -199,9 +200,16 @@ int arizona_init_spk(struct snd_soc_codec *codec)
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
ret = snd_soc_dapm_new_controls(&codec->dapm, &arizona_spkr, 1);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
switch (arizona->type) {
|
||||
case WM8997:
|
||||
break;
|
||||
default:
|
||||
ret = snd_soc_dapm_new_controls(&codec->dapm,
|
||||
&arizona_spkr, 1);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
break;
|
||||
}
|
||||
|
||||
ret = arizona_request_irq(arizona, ARIZONA_IRQ_SPK_SHUTDOWN_WARN,
|
||||
"Thermal warning", arizona_thermal_warn,
|
||||
@ -223,6 +231,41 @@ int arizona_init_spk(struct snd_soc_codec *codec)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(arizona_init_spk);
|
||||
|
||||
int arizona_init_gpio(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
|
||||
struct arizona *arizona = priv->arizona;
|
||||
int i;
|
||||
|
||||
switch (arizona->type) {
|
||||
case WM5110:
|
||||
snd_soc_dapm_disable_pin(&codec->dapm, "DRC2 Signal Activity");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
snd_soc_dapm_disable_pin(&codec->dapm, "DRC1 Signal Activity");
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(arizona->pdata.gpio_defaults); i++) {
|
||||
switch (arizona->pdata.gpio_defaults[i] & ARIZONA_GPN_FN_MASK) {
|
||||
case ARIZONA_GP_FN_DRC1_SIGNAL_DETECT:
|
||||
snd_soc_dapm_enable_pin(&codec->dapm,
|
||||
"DRC1 Signal Activity");
|
||||
break;
|
||||
case ARIZONA_GP_FN_DRC2_SIGNAL_DETECT:
|
||||
snd_soc_dapm_enable_pin(&codec->dapm,
|
||||
"DRC2 Signal Activity");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(arizona_init_gpio);
|
||||
|
||||
const char *arizona_mixer_texts[ARIZONA_NUM_MIXER_INPUTS] = {
|
||||
"None",
|
||||
"Tone Generator 1",
|
||||
@ -517,6 +560,26 @@ const struct soc_enum arizona_ng_hold =
|
||||
4, arizona_ng_hold_text);
|
||||
EXPORT_SYMBOL_GPL(arizona_ng_hold);
|
||||
|
||||
static const char * const arizona_in_dmic_osr_text[] = {
|
||||
"1.536MHz", "3.072MHz", "6.144MHz",
|
||||
};
|
||||
|
||||
const struct soc_enum arizona_in_dmic_osr[] = {
|
||||
SOC_ENUM_SINGLE(ARIZONA_IN1L_CONTROL, ARIZONA_IN1_OSR_SHIFT,
|
||||
ARRAY_SIZE(arizona_in_dmic_osr_text),
|
||||
arizona_in_dmic_osr_text),
|
||||
SOC_ENUM_SINGLE(ARIZONA_IN2L_CONTROL, ARIZONA_IN2_OSR_SHIFT,
|
||||
ARRAY_SIZE(arizona_in_dmic_osr_text),
|
||||
arizona_in_dmic_osr_text),
|
||||
SOC_ENUM_SINGLE(ARIZONA_IN3L_CONTROL, ARIZONA_IN3_OSR_SHIFT,
|
||||
ARRAY_SIZE(arizona_in_dmic_osr_text),
|
||||
arizona_in_dmic_osr_text),
|
||||
SOC_ENUM_SINGLE(ARIZONA_IN4L_CONTROL, ARIZONA_IN4_OSR_SHIFT,
|
||||
ARRAY_SIZE(arizona_in_dmic_osr_text),
|
||||
arizona_in_dmic_osr_text),
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(arizona_in_dmic_osr);
|
||||
|
||||
static void arizona_in_set_vu(struct snd_soc_codec *codec, int ena)
|
||||
{
|
||||
struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
|
||||
|
@ -150,7 +150,8 @@ extern int arizona_mixer_values[ARIZONA_NUM_MIXER_INPUTS];
|
||||
ARIZONA_MUX(name_str " Aux 5", &name##_aux5_mux), \
|
||||
ARIZONA_MUX(name_str " Aux 6", &name##_aux6_mux)
|
||||
|
||||
#define ARIZONA_MUX_ROUTES(name) \
|
||||
#define ARIZONA_MUX_ROUTES(widget, name) \
|
||||
{ widget, NULL, name " Input" }, \
|
||||
ARIZONA_MIXER_INPUT_ROUTES(name " Input")
|
||||
|
||||
#define ARIZONA_MIXER_ROUTES(widget, name) \
|
||||
@ -198,6 +199,7 @@ extern const struct soc_enum arizona_lhpf3_mode;
|
||||
extern const struct soc_enum arizona_lhpf4_mode;
|
||||
|
||||
extern const struct soc_enum arizona_ng_hold;
|
||||
extern const struct soc_enum arizona_in_dmic_osr[];
|
||||
|
||||
extern int arizona_in_ev(struct snd_soc_dapm_widget *w,
|
||||
struct snd_kcontrol *kcontrol,
|
||||
@ -242,6 +244,7 @@ extern int arizona_set_fll(struct arizona_fll *fll, int source,
|
||||
unsigned int Fref, unsigned int Fout);
|
||||
|
||||
extern int arizona_init_spk(struct snd_soc_codec *codec);
|
||||
extern int arizona_init_gpio(struct snd_soc_codec *codec);
|
||||
|
||||
extern int arizona_init_dai(struct arizona_priv *priv, int dai);
|
||||
|
||||
|
@ -998,6 +998,8 @@ SND_SOC_DAPM_INPUT("IN2R"),
|
||||
SND_SOC_DAPM_INPUT("IN3L"),
|
||||
SND_SOC_DAPM_INPUT("IN3R"),
|
||||
|
||||
SND_SOC_DAPM_OUTPUT("DRC1 Signal Activity"),
|
||||
|
||||
SND_SOC_DAPM_PGA_E("IN1L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1L_ENA_SHIFT,
|
||||
0, NULL, 0, arizona_in_ev,
|
||||
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
|
||||
@ -1421,9 +1423,6 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
|
||||
{ "Tone Generator 1", NULL, "TONE" },
|
||||
{ "Tone Generator 2", NULL, "TONE" },
|
||||
|
||||
{ "Mic Mute Mixer", NULL, "Noise Mixer" },
|
||||
{ "Mic Mute Mixer", NULL, "Mic Mixer" },
|
||||
|
||||
{ "AIF1 Capture", NULL, "AIF1TX1" },
|
||||
{ "AIF1 Capture", NULL, "AIF1TX2" },
|
||||
{ "AIF1 Capture", NULL, "AIF1TX3" },
|
||||
@ -1499,23 +1498,6 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
|
||||
{ "IN3L PGA", NULL, "IN3L" },
|
||||
{ "IN3R PGA", NULL, "IN3R" },
|
||||
|
||||
{ "ASRC1L", NULL, "ASRC1L Input" },
|
||||
{ "ASRC1R", NULL, "ASRC1R Input" },
|
||||
{ "ASRC2L", NULL, "ASRC2L Input" },
|
||||
{ "ASRC2R", NULL, "ASRC2R Input" },
|
||||
|
||||
{ "ISRC1DEC1", NULL, "ISRC1DEC1 Input" },
|
||||
{ "ISRC1DEC2", NULL, "ISRC1DEC2 Input" },
|
||||
|
||||
{ "ISRC1INT1", NULL, "ISRC1INT1 Input" },
|
||||
{ "ISRC1INT2", NULL, "ISRC1INT2 Input" },
|
||||
|
||||
{ "ISRC2DEC1", NULL, "ISRC2DEC1 Input" },
|
||||
{ "ISRC2DEC2", NULL, "ISRC2DEC2 Input" },
|
||||
|
||||
{ "ISRC2INT1", NULL, "ISRC2INT1 Input" },
|
||||
{ "ISRC2INT2", NULL, "ISRC2INT2 Input" },
|
||||
|
||||
ARIZONA_MIXER_ROUTES("OUT1L", "HPOUT1L"),
|
||||
ARIZONA_MIXER_ROUTES("OUT1R", "HPOUT1R"),
|
||||
ARIZONA_MIXER_ROUTES("OUT2L", "HPOUT2L"),
|
||||
@ -1567,22 +1549,25 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
|
||||
ARIZONA_MIXER_ROUTES("LHPF3", "LHPF3"),
|
||||
ARIZONA_MIXER_ROUTES("LHPF4", "LHPF4"),
|
||||
|
||||
ARIZONA_MUX_ROUTES("ASRC1L"),
|
||||
ARIZONA_MUX_ROUTES("ASRC1R"),
|
||||
ARIZONA_MUX_ROUTES("ASRC2L"),
|
||||
ARIZONA_MUX_ROUTES("ASRC2R"),
|
||||
ARIZONA_MIXER_ROUTES("Mic Mute Mixer", "Noise"),
|
||||
ARIZONA_MIXER_ROUTES("Mic Mute Mixer", "Mic"),
|
||||
|
||||
ARIZONA_MUX_ROUTES("ISRC1INT1"),
|
||||
ARIZONA_MUX_ROUTES("ISRC1INT2"),
|
||||
ARIZONA_MUX_ROUTES("ASRC1L", "ASRC1L"),
|
||||
ARIZONA_MUX_ROUTES("ASRC1R", "ASRC1R"),
|
||||
ARIZONA_MUX_ROUTES("ASRC2L", "ASRC2L"),
|
||||
ARIZONA_MUX_ROUTES("ASRC2R", "ASRC2R"),
|
||||
|
||||
ARIZONA_MUX_ROUTES("ISRC1DEC1"),
|
||||
ARIZONA_MUX_ROUTES("ISRC1DEC2"),
|
||||
ARIZONA_MUX_ROUTES("ISRC1INT1", "ISRC1INT1"),
|
||||
ARIZONA_MUX_ROUTES("ISRC1INT2", "ISRC1INT2"),
|
||||
|
||||
ARIZONA_MUX_ROUTES("ISRC2INT1"),
|
||||
ARIZONA_MUX_ROUTES("ISRC2INT2"),
|
||||
ARIZONA_MUX_ROUTES("ISRC1DEC1", "ISRC1DEC1"),
|
||||
ARIZONA_MUX_ROUTES("ISRC1DEC2", "ISRC1DEC2"),
|
||||
|
||||
ARIZONA_MUX_ROUTES("ISRC2DEC1"),
|
||||
ARIZONA_MUX_ROUTES("ISRC2DEC2"),
|
||||
ARIZONA_MUX_ROUTES("ISRC2INT1", "ISRC2INT1"),
|
||||
ARIZONA_MUX_ROUTES("ISRC2INT2", "ISRC2INT2"),
|
||||
|
||||
ARIZONA_MUX_ROUTES("ISRC2DEC1", "ISRC2DEC1"),
|
||||
ARIZONA_MUX_ROUTES("ISRC2DEC2", "ISRC2DEC2"),
|
||||
|
||||
ARIZONA_DSP_ROUTES("DSP1"),
|
||||
|
||||
@ -1614,6 +1599,9 @@ static const struct snd_soc_dapm_route wm5102_dapm_routes[] = {
|
||||
{ "SPKDAT1R", NULL, "OUT5R" },
|
||||
|
||||
{ "MICSUPP", NULL, "SYSCLK" },
|
||||
|
||||
{ "DRC1 Signal Activity", NULL, "DRC1L" },
|
||||
{ "DRC1 Signal Activity", NULL, "DRC1R" },
|
||||
};
|
||||
|
||||
static int wm5102_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
|
||||
@ -1781,6 +1769,7 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec)
|
||||
return ret;
|
||||
|
||||
arizona_init_spk(codec);
|
||||
arizona_init_gpio(codec);
|
||||
|
||||
snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS");
|
||||
|
||||
|
@ -58,14 +58,10 @@ static DECLARE_TLV_DB_SCALE(ng_tlv, -10200, 600, 0);
|
||||
SOC_SINGLE(name " NG SPKDAT2R Switch", base, 11, 1, 0)
|
||||
|
||||
static const struct snd_kcontrol_new wm5110_snd_controls[] = {
|
||||
SOC_SINGLE("IN1 High Performance Switch", ARIZONA_IN1L_CONTROL,
|
||||
ARIZONA_IN1_OSR_SHIFT, 1, 0),
|
||||
SOC_SINGLE("IN2 High Performance Switch", ARIZONA_IN2L_CONTROL,
|
||||
ARIZONA_IN2_OSR_SHIFT, 1, 0),
|
||||
SOC_SINGLE("IN3 High Performance Switch", ARIZONA_IN3L_CONTROL,
|
||||
ARIZONA_IN3_OSR_SHIFT, 1, 0),
|
||||
SOC_SINGLE("IN4 High Performance Switch", ARIZONA_IN4L_CONTROL,
|
||||
ARIZONA_IN4_OSR_SHIFT, 1, 0),
|
||||
SOC_ENUM("IN1 OSR", arizona_in_dmic_osr[0]),
|
||||
SOC_ENUM("IN2 OSR", arizona_in_dmic_osr[1]),
|
||||
SOC_ENUM("IN3 OSR", arizona_in_dmic_osr[2]),
|
||||
SOC_ENUM("IN4 OSR", arizona_in_dmic_osr[3]),
|
||||
|
||||
SOC_SINGLE_RANGE_TLV("IN1L Volume", ARIZONA_IN1L_CONTROL,
|
||||
ARIZONA_IN1L_PGA_VOL_SHIFT, 0x40, 0x5f, 0, ana_tlv),
|
||||
@ -432,6 +428,9 @@ SND_SOC_DAPM_INPUT("IN3R"),
|
||||
SND_SOC_DAPM_INPUT("IN4L"),
|
||||
SND_SOC_DAPM_INPUT("IN4R"),
|
||||
|
||||
SND_SOC_DAPM_OUTPUT("DRC1 Signal Activity"),
|
||||
SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"),
|
||||
|
||||
SND_SOC_DAPM_PGA_E("IN1L PGA", ARIZONA_INPUT_ENABLES, ARIZONA_IN1L_ENA_SHIFT,
|
||||
0, NULL, 0, arizona_in_ev,
|
||||
SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD |
|
||||
@ -842,9 +841,6 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
|
||||
{ "Tone Generator 1", NULL, "TONE" },
|
||||
{ "Tone Generator 2", NULL, "TONE" },
|
||||
|
||||
{ "Mic Mute Mixer", NULL, "Noise Mixer" },
|
||||
{ "Mic Mute Mixer", NULL, "Mic Mixer" },
|
||||
|
||||
{ "AIF1 Capture", NULL, "AIF1TX1" },
|
||||
{ "AIF1 Capture", NULL, "AIF1TX2" },
|
||||
{ "AIF1 Capture", NULL, "AIF1TX3" },
|
||||
@ -979,10 +975,13 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
|
||||
ARIZONA_MIXER_ROUTES("LHPF3", "LHPF3"),
|
||||
ARIZONA_MIXER_ROUTES("LHPF4", "LHPF4"),
|
||||
|
||||
ARIZONA_MUX_ROUTES("ASRC1L"),
|
||||
ARIZONA_MUX_ROUTES("ASRC1R"),
|
||||
ARIZONA_MUX_ROUTES("ASRC2L"),
|
||||
ARIZONA_MUX_ROUTES("ASRC2R"),
|
||||
ARIZONA_MIXER_ROUTES("Mic Mute Mixer", "Noise"),
|
||||
ARIZONA_MIXER_ROUTES("Mic Mute Mixer", "Mic"),
|
||||
|
||||
ARIZONA_MUX_ROUTES("ASRC1L", "ASRC1L"),
|
||||
ARIZONA_MUX_ROUTES("ASRC1R", "ASRC1R"),
|
||||
ARIZONA_MUX_ROUTES("ASRC2L", "ASRC2L"),
|
||||
ARIZONA_MUX_ROUTES("ASRC2R", "ASRC2R"),
|
||||
|
||||
{ "HPOUT1L", NULL, "OUT1L" },
|
||||
{ "HPOUT1R", NULL, "OUT1R" },
|
||||
@ -1006,6 +1005,11 @@ static const struct snd_soc_dapm_route wm5110_dapm_routes[] = {
|
||||
{ "SPKDAT2R", NULL, "OUT6R" },
|
||||
|
||||
{ "MICSUPP", NULL, "SYSCLK" },
|
||||
|
||||
{ "DRC1 Signal Activity", NULL, "DRC1L" },
|
||||
{ "DRC1 Signal Activity", NULL, "DRC1R" },
|
||||
{ "DRC2 Signal Activity", NULL, "DRC2L" },
|
||||
{ "DRC2 Signal Activity", NULL, "DRC2R" },
|
||||
};
|
||||
|
||||
static int wm5110_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
|
||||
@ -1170,6 +1174,7 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
|
||||
return ret;
|
||||
|
||||
arizona_init_spk(codec);
|
||||
arizona_init_gpio(codec);
|
||||
|
||||
snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS");
|
||||
|
||||
|
1175
sound/soc/codecs/wm8997.c
Normal file
1175
sound/soc/codecs/wm8997.c
Normal file
File diff suppressed because it is too large
Load Diff
23
sound/soc/codecs/wm8997.h
Normal file
23
sound/soc/codecs/wm8997.h
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* wm8997.h -- WM8997 ALSA SoC Audio driver
|
||||
*
|
||||
* Copyright 2012 Wolfson Microelectronics plc
|
||||
*
|
||||
* Author: Mark Brown <broonie@opensource.wolfsonmicro.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.
|
||||
*/
|
||||
|
||||
#ifndef _WM8997_H
|
||||
#define _WM8997_H
|
||||
|
||||
#include "arizona.h"
|
||||
|
||||
#define WM8997_FLL1 1
|
||||
#define WM8997_FLL2 2
|
||||
#define WM8997_FLL1_REFCLK 3
|
||||
#define WM8997_FLL2_REFCLK 4
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user