Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9568eaec authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/rockchip',...

Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/rockchip', 'asoc/topic/rsnd' and 'asoc/topic/rt286' into asoc-next
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -483,6 +483,7 @@ config SND_SOC_RL6231


config SND_SOC_RT286
config SND_SOC_RT286
	tristate
	tristate
	depends on I2C


config SND_SOC_RT5631
config SND_SOC_RT5631
	tristate
	tristate
+16 −15
Original line number Original line Diff line number Diff line
@@ -2159,12 +2159,16 @@ static void max98090_jack_work(struct work_struct *work)


static irqreturn_t max98090_interrupt(int irq, void *data)
static irqreturn_t max98090_interrupt(int irq, void *data)
{
{
	struct snd_soc_codec *codec = data;
	struct max98090_priv *max98090 = data;
	struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
	struct snd_soc_codec *codec = max98090->codec;
	int ret;
	int ret;
	unsigned int mask;
	unsigned int mask;
	unsigned int active;
	unsigned int active;


	/* Treat interrupt before codec is initialized as spurious */
	if (codec == NULL)
		return IRQ_NONE;

	dev_dbg(codec->dev, "***** max98090_interrupt *****\n");
	dev_dbg(codec->dev, "***** max98090_interrupt *****\n");


	ret = regmap_read(max98090->regmap, M98090_REG_INTERRUPT_S, &mask);
	ret = regmap_read(max98090->regmap, M98090_REG_INTERRUPT_S, &mask);
@@ -2329,7 +2333,6 @@ static int max98090_probe(struct snd_soc_codec *codec)
	max98090->lin_state = 0;
	max98090->lin_state = 0;
	max98090->pa1en = 0;
	max98090->pa1en = 0;
	max98090->pa2en = 0;
	max98090->pa2en = 0;
	max98090->extmic_mux = 0;


	ret = snd_soc_read(codec, M98090_REG_REVISION_ID);
	ret = snd_soc_read(codec, M98090_REG_REVISION_ID);
	if (ret < 0) {
	if (ret < 0) {
@@ -2367,17 +2370,6 @@ static int max98090_probe(struct snd_soc_codec *codec)
	snd_soc_write(codec, M98090_REG_JACK_DETECT,
	snd_soc_write(codec, M98090_REG_JACK_DETECT,
		M98090_JDETEN_MASK | M98090_JDEB_25MS);
		M98090_JDETEN_MASK | M98090_JDEB_25MS);


	/* Register for interrupts */
	dev_dbg(codec->dev, "irq = %d\n", max98090->irq);

	ret = devm_request_threaded_irq(codec->dev, max98090->irq, NULL,
		max98090_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
		"max98090_interrupt", codec);
	if (ret < 0) {
		dev_err(codec->dev, "request_irq failed: %d\n",
			ret);
	}

	/*
	/*
	 * Clear any old interrupts.
	 * Clear any old interrupts.
	 * An old interrupt ocurring prior to installing the ISR
	 * An old interrupt ocurring prior to installing the ISR
@@ -2417,6 +2409,7 @@ static int max98090_remove(struct snd_soc_codec *codec)
	cancel_delayed_work_sync(&max98090->pll_det_enable_work);
	cancel_delayed_work_sync(&max98090->pll_det_enable_work);
	cancel_work_sync(&max98090->pll_det_disable_work);
	cancel_work_sync(&max98090->pll_det_disable_work);
	cancel_work_sync(&max98090->pll_work);
	cancel_work_sync(&max98090->pll_work);
	max98090->codec = NULL;


	return 0;
	return 0;
}
}
@@ -2469,7 +2462,6 @@ static int max98090_i2c_probe(struct i2c_client *i2c,
	max98090->devtype = driver_data;
	max98090->devtype = driver_data;
	i2c_set_clientdata(i2c, max98090);
	i2c_set_clientdata(i2c, max98090);
	max98090->pdata = i2c->dev.platform_data;
	max98090->pdata = i2c->dev.platform_data;
	max98090->irq = i2c->irq;


	max98090->regmap = devm_regmap_init_i2c(i2c, &max98090_regmap);
	max98090->regmap = devm_regmap_init_i2c(i2c, &max98090_regmap);
	if (IS_ERR(max98090->regmap)) {
	if (IS_ERR(max98090->regmap)) {
@@ -2478,6 +2470,15 @@ static int max98090_i2c_probe(struct i2c_client *i2c,
		goto err_enable;
		goto err_enable;
	}
	}


	ret = devm_request_threaded_irq(&i2c->dev, i2c->irq, NULL,
		max98090_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
		"max98090_interrupt", max98090);
	if (ret < 0) {
		dev_err(&i2c->dev, "request_irq failed: %d\n",
			ret);
		return ret;
	}

	ret = snd_soc_register_codec(&i2c->dev,
	ret = snd_soc_register_codec(&i2c->dev,
			&soc_codec_dev_max98090, max98090_dai,
			&soc_codec_dev_max98090, max98090_dai,
			ARRAY_SIZE(max98090_dai));
			ARRAY_SIZE(max98090_dai));
+0 −10
Original line number Original line Diff line number Diff line
@@ -11,11 +11,6 @@
#ifndef _MAX98090_H
#ifndef _MAX98090_H
#define _MAX98090_H
#define _MAX98090_H


#include <linux/version.h>

/* One can override the Linux version here with an explicit version number */
#define M98090_LINUX_VERSION LINUX_VERSION_CODE

/*
/*
 * MAX98090 Register Definitions
 * MAX98090 Register Definitions
 */
 */
@@ -1502,9 +1497,6 @@
#define M98090_REVID_WIDTH		8
#define M98090_REVID_WIDTH		8
#define M98090_REVID_NUM		(1<<M98090_REVID_WIDTH)
#define M98090_REVID_NUM		(1<<M98090_REVID_WIDTH)


#define M98090_BYTE1(w) ((w >> 8) & 0xff)
#define M98090_BYTE0(w) (w & 0xff)

/* Silicon revision number */
/* Silicon revision number */
#define M98090_REVA			0x40
#define M98090_REVA			0x40
#define M98091_REVA			0x50
#define M98091_REVA			0x50
@@ -1529,7 +1521,6 @@ struct max98090_priv {
	unsigned int bclk;
	unsigned int bclk;
	unsigned int lrclk;
	unsigned int lrclk;
	struct max98090_cdata dai[1];
	struct max98090_cdata dai[1];
	int irq;
	int jack_state;
	int jack_state;
	struct delayed_work jack_work;
	struct delayed_work jack_work;
	struct delayed_work pll_det_enable_work;
	struct delayed_work pll_det_enable_work;
@@ -1542,7 +1533,6 @@ struct max98090_priv {
	u8 lin_state;
	u8 lin_state;
	unsigned int pa1en;
	unsigned int pa1en;
	unsigned int pa2en;
	unsigned int pa2en;
	unsigned int extmic_mux;
	unsigned int sidetone;
	unsigned int sidetone;
	bool master;
	bool master;
};
};
+2 −0
Original line number Original line Diff line number Diff line
@@ -269,6 +269,7 @@ static int rt286_hw_read(void *context, unsigned int reg, unsigned int *value)
	return 0;
	return 0;
}
}


#ifdef CONFIG_PM
static void rt286_index_sync(struct snd_soc_codec *codec)
static void rt286_index_sync(struct snd_soc_codec *codec)
{
{
	struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec);
	struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec);
@@ -279,6 +280,7 @@ static void rt286_index_sync(struct snd_soc_codec *codec)
				  rt286->index_cache[i].def);
				  rt286->index_cache[i].def);
	}
	}
}
}
#endif


static int rt286_support_power_controls[] = {
static int rt286_support_power_controls[] = {
	RT286_DAC_OUT1,
	RT286_DAC_OUT1,
+1 −2
Original line number Original line Diff line number Diff line
@@ -2,11 +2,10 @@ config SND_SOC_ROCKCHIP
	tristate "ASoC support for Rockchip"
	tristate "ASoC support for Rockchip"
	depends on COMPILE_TEST || ARCH_ROCKCHIP
	depends on COMPILE_TEST || ARCH_ROCKCHIP
	select SND_SOC_GENERIC_DMAENGINE_PCM
	select SND_SOC_GENERIC_DMAENGINE_PCM
	select SND_ROCKCHIP_I2S
	help
	help
	  Say Y or M if you want to add support for codecs attached to
	  Say Y or M if you want to add support for codecs attached to
	  the Rockchip SoCs' Audio interfaces. You will also need to
	  the Rockchip SoCs' Audio interfaces. You will also need to
	  select the audio interfaces to support below.
	  select the audio interfaces to support below.


config SND_ROCKCHIP_I2S
config SND_SOC_ROCKCHIP_I2S
	tristate
	tristate
Loading