Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/max…
Browse files Browse the repository at this point in the history
…98095', 'asoc/topic/max98357a', 'asoc/topic/max9877' and 'asoc/topic/max98925' into asoc-next
  • Loading branch information
Mark Brown committed Aug 30, 2015
6 parents 373e515 + 62d6d47 + 5549ce8 + 4ab0c59 + 623436a + 6eb1c2a commit 1d1ed2c
Show file tree
Hide file tree
Showing 25 changed files with 78 additions and 416 deletions.
6 changes: 5 additions & 1 deletion Documentation/devicetree/bindings/sound/max98357a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ This node models the Maxim MAX98357A DAC.

Required properties:
- compatible : "maxim,max98357a"
- sdmode-gpios : GPIO specifier for the GPIO -> DAC SDMODE pin

Optional properties:
- sdmode-gpios : GPIO specifier for the chip's SD_MODE pin.
If this option is not specified then driver does not manage
the pin state (e.g. chip is always on).

Example:

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/adav80x.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

#define ADAV80X_PLL_OUTE_SYSCLKPD(x) BIT(2 - (x))

static struct reg_default adav80x_reg_defaults[] = {
static const struct reg_default adav80x_reg_defaults[] = {
{ ADAV80X_PLAYBACK_CTRL, 0x01 },
{ ADAV80X_AUX_IN_CTRL, 0x01 },
{ ADAV80X_REC_CTRL, 0x02 },
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/alc5632.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/*
* ALC5632 register cache
*/
static struct reg_default alc5632_reg_defaults[] = {
static const struct reg_default alc5632_reg_defaults[] = {
{ 2, 0x8080 }, /* R2 - Speaker Output Volume */
{ 4, 0x8080 }, /* R4 - Headphone Output Volume */
{ 6, 0x8080 }, /* R6 - AUXOUT Volume */
Expand Down
6 changes: 3 additions & 3 deletions sound/soc/codecs/da7210.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ struct da7210_priv {
int master;
};

static struct reg_default da7210_reg_defaults[] = {
static const struct reg_default da7210_reg_defaults[] = {
{ 0x00, 0x00 },
{ 0x01, 0x11 },
{ 0x03, 0x00 },
Expand Down Expand Up @@ -1182,7 +1182,7 @@ static struct snd_soc_codec_driver soc_codec_dev_da7210 = {

#if IS_ENABLED(CONFIG_I2C)

static struct reg_default da7210_regmap_i2c_patch[] = {
static const struct reg_default da7210_regmap_i2c_patch[] = {

/* System controller master disable */
{ DA7210_STARTUP1, 0x00 },
Expand Down Expand Up @@ -1268,7 +1268,7 @@ static struct i2c_driver da7210_i2c_driver = {

#if defined(CONFIG_SPI_MASTER)

static struct reg_default da7210_regmap_spi_patch[] = {
static const struct reg_default da7210_regmap_spi_patch[] = {
/* Dummy read to give two pulses over nCS for SPI */
{ DA7210_AUX2, 0x00 },
{ DA7210_AUX2, 0x00 },
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/da7213.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ static const struct snd_soc_dapm_route da7213_audio_map[] = {
{"LINE", NULL, "Lineout PGA"},
};

static struct reg_default da7213_reg_defaults[] = {
static const struct reg_default da7213_reg_defaults[] = {
{ DA7213_DIG_ROUTING_DAI, 0x10 },
{ DA7213_SR, 0x0A },
{ DA7213_REFERENCES, 0x80 },
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/da732x.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct da732x_priv {
/*
* da732x register cache - default settings
*/
static struct reg_default da732x_reg_cache[] = {
static const struct reg_default da732x_reg_cache[] = {
{ DA732X_REG_REF1 , 0x02 },
{ DA732X_REG_BIAS_EN , 0x80 },
{ DA732X_REG_BIAS1 , 0x00 },
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/da9055.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ struct da9055_priv {
struct da9055_platform_data *pdata;
};

static struct reg_default da9055_reg_defaults[] = {
static const struct reg_default da9055_reg_defaults[] = {
{ 0x21, 0x10 },
{ 0x22, 0x0A },
{ 0x23, 0x00 },
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/isabelle.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


/* Register default values for ISABELLE driver. */
static struct reg_default isabelle_reg_defs[] = {
static const struct reg_default isabelle_reg_defs[] = {
{ 0, 0x00 },
{ 1, 0x00 },
{ 2, 0x00 },
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/lm49453.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <asm/div64.h>
#include "lm49453.h"

static struct reg_default lm49453_reg_defs[] = {
static const struct reg_default lm49453_reg_defs[] = {
{ 0, 0x00 },
{ 1, 0x00 },
{ 2, 0x00 },
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/max9768.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct max9768 {
u32 flags;
};

static struct reg_default max9768_default_regs[] = {
static const struct reg_default max9768_default_regs[] = {
{ 0, 0 },
{ 3, MAX9768_CTRL_FILTERLESS},
};
Expand Down
80 changes: 8 additions & 72 deletions sound/soc/codecs/max98090.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,75 +267,8 @@ static bool max98090_volatile_register(struct device *dev, unsigned int reg)
static bool max98090_readable_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case M98090_REG_DEVICE_STATUS:
case M98090_REG_JACK_STATUS:
case M98090_REG_INTERRUPT_S:
case M98090_REG_RESERVED:
case M98090_REG_LINE_INPUT_CONFIG:
case M98090_REG_LINE_INPUT_LEVEL:
case M98090_REG_INPUT_MODE:
case M98090_REG_MIC1_INPUT_LEVEL:
case M98090_REG_MIC2_INPUT_LEVEL:
case M98090_REG_MIC_BIAS_VOLTAGE:
case M98090_REG_DIGITAL_MIC_ENABLE:
case M98090_REG_DIGITAL_MIC_CONFIG:
case M98090_REG_LEFT_ADC_MIXER:
case M98090_REG_RIGHT_ADC_MIXER:
case M98090_REG_LEFT_ADC_LEVEL:
case M98090_REG_RIGHT_ADC_LEVEL:
case M98090_REG_ADC_BIQUAD_LEVEL:
case M98090_REG_ADC_SIDETONE:
case M98090_REG_SYSTEM_CLOCK:
case M98090_REG_CLOCK_MODE:
case M98090_REG_CLOCK_RATIO_NI_MSB:
case M98090_REG_CLOCK_RATIO_NI_LSB:
case M98090_REG_CLOCK_RATIO_MI_MSB:
case M98090_REG_CLOCK_RATIO_MI_LSB:
case M98090_REG_MASTER_MODE:
case M98090_REG_INTERFACE_FORMAT:
case M98090_REG_TDM_CONTROL:
case M98090_REG_TDM_FORMAT:
case M98090_REG_IO_CONFIGURATION:
case M98090_REG_FILTER_CONFIG:
case M98090_REG_DAI_PLAYBACK_LEVEL:
case M98090_REG_DAI_PLAYBACK_LEVEL_EQ:
case M98090_REG_LEFT_HP_MIXER:
case M98090_REG_RIGHT_HP_MIXER:
case M98090_REG_HP_CONTROL:
case M98090_REG_LEFT_HP_VOLUME:
case M98090_REG_RIGHT_HP_VOLUME:
case M98090_REG_LEFT_SPK_MIXER:
case M98090_REG_RIGHT_SPK_MIXER:
case M98090_REG_SPK_CONTROL:
case M98090_REG_LEFT_SPK_VOLUME:
case M98090_REG_RIGHT_SPK_VOLUME:
case M98090_REG_DRC_TIMING:
case M98090_REG_DRC_COMPRESSOR:
case M98090_REG_DRC_EXPANDER:
case M98090_REG_DRC_GAIN:
case M98090_REG_RCV_LOUTL_MIXER:
case M98090_REG_RCV_LOUTL_CONTROL:
case M98090_REG_RCV_LOUTL_VOLUME:
case M98090_REG_LOUTR_MIXER:
case M98090_REG_LOUTR_CONTROL:
case M98090_REG_LOUTR_VOLUME:
case M98090_REG_JACK_DETECT:
case M98090_REG_INPUT_ENABLE:
case M98090_REG_OUTPUT_ENABLE:
case M98090_REG_LEVEL_CONTROL:
case M98090_REG_DSP_FILTER_ENABLE:
case M98090_REG_BIAS_CONTROL:
case M98090_REG_DAC_CONTROL:
case M98090_REG_ADC_CONTROL:
case M98090_REG_DEVICE_SHUTDOWN:
case M98090_REG_EQUALIZER_BASE ... M98090_REG_EQUALIZER_BASE + 0x68:
case M98090_REG_RECORD_BIQUAD_BASE ... M98090_REG_RECORD_BIQUAD_BASE + 0x0E:
case M98090_REG_DMIC3_VOLUME:
case M98090_REG_DMIC4_VOLUME:
case M98090_REG_DMIC34_BQ_PREATTEN:
case M98090_REG_RECORD_TDM_SLOT:
case M98090_REG_SAMPLE_RATE:
case M98090_REG_DMIC34_BIQUAD_BASE ... M98090_REG_DMIC34_BIQUAD_BASE + 0x0E:
case M98090_REG_DEVICE_STATUS ... M98090_REG_INTERRUPT_S:
case M98090_REG_LINE_INPUT_CONFIG ... 0xD1:
case M98090_REG_REVISION_ID:
return true;
default:
Expand Down Expand Up @@ -1818,10 +1751,13 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
if (IS_ERR(max98090->mclk))
break;

if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON)
if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON) {
clk_disable_unprepare(max98090->mclk);
else
clk_prepare_enable(max98090->mclk);
} else {
ret = clk_prepare_enable(max98090->mclk);
if (ret)
return ret;
}
break;

case SND_SOC_BIAS_STANDBY:
Expand Down
Loading

0 comments on commit 1d1ed2c

Please sign in to comment.