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

Commit af707971 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/rcar' and...

Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/rcar' and 'asoc/topic/rt286' into asoc-next
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ struct rsnd_ssi_platform_info {
struct rsnd_src_platform_info {
	u32 convert_rate; /* sampling rate convert */
	int dma_id; /* for Gen2 SCU */
	int irq;
};

/*
+27 −2
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include "rt286.h"

#define RT286_VENDOR_ID 0x10ec0286
#define RT288_VENDOR_ID 0x10ec0288

struct rt286_priv {
	struct regmap *regmap;
@@ -1171,6 +1172,7 @@ static const struct regmap_config rt286_regmap = {

static const struct i2c_device_id rt286_i2c_id[] = {
	{"rt286", 0},
	{"rt288", 0},
	{}
};
MODULE_DEVICE_TABLE(i2c, rt286_i2c_id);
@@ -1191,6 +1193,17 @@ static struct dmi_system_id force_combo_jack_table[] = {
	{ }
};

static struct dmi_system_id dmi_dell_dino[] = {
	{
		.ident = "Dell Dino",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
			DMI_MATCH(DMI_BOARD_NAME, "0144P8")
		}
	},
	{ }
};

static int rt286_i2c_probe(struct i2c_client *i2c,
			   const struct i2c_device_id *id)
{
@@ -1213,7 +1226,7 @@ static int rt286_i2c_probe(struct i2c_client *i2c,

	regmap_read(rt286->regmap,
		RT286_GET_PARAM(AC_NODE_ROOT, AC_PAR_VENDOR_ID), &ret);
	if (ret != RT286_VENDOR_ID) {
	if (ret != RT286_VENDOR_ID && ret != RT288_VENDOR_ID) {
		dev_err(&i2c->dev,
			"Device with ID register %x is not rt286\n", ret);
		return -ENODEV;
@@ -1226,7 +1239,8 @@ static int rt286_i2c_probe(struct i2c_client *i2c,
	if (pdata)
		rt286->pdata = *pdata;

	if (dmi_check_system(force_combo_jack_table))
	if (dmi_check_system(force_combo_jack_table) ||
		dmi_check_system(dmi_dell_dino))
		rt286->pdata.cbj_en = true;

	regmap_write(rt286->regmap, RT286_SET_AUDIO_POWER, AC_PWRST_D3);
@@ -1265,6 +1279,17 @@ static int rt286_i2c_probe(struct i2c_client *i2c,
	regmap_update_bits(rt286->regmap, RT286_DEPOP_CTRL3, 0xf777, 0x4737);
	regmap_update_bits(rt286->regmap, RT286_DEPOP_CTRL4, 0x00ff, 0x003f);

	if (dmi_check_system(dmi_dell_dino)) {
		regmap_update_bits(rt286->regmap,
			RT286_SET_GPIO_MASK, 0x40, 0x40);
		regmap_update_bits(rt286->regmap,
			RT286_SET_GPIO_DIRECTION, 0x40, 0x40);
		regmap_update_bits(rt286->regmap,
			RT286_SET_GPIO_DATA, 0x40, 0x40);
		regmap_update_bits(rt286->regmap,
			RT286_GPIO_CTRL, 0xc, 0x8);
	}

	if (rt286->i2c->irq) {
		ret = request_threaded_irq(rt286->i2c->irq, NULL, rt286_irq,
			IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "rt286", rt286);
+7 −0
Original line number Diff line number Diff line
@@ -117,6 +117,12 @@
	VERB_CMD(AC_VERB_SET_COEF_INDEX, RT286_VENDOR_REGISTERS, 0)
#define RT286_PROC_COEF\
	VERB_CMD(AC_VERB_SET_PROC_COEF, RT286_VENDOR_REGISTERS, 0)
#define RT286_SET_GPIO_MASK\
	VERB_CMD(AC_VERB_SET_GPIO_MASK, RT286_AUDIO_FUNCTION_GROUP, 0)
#define RT286_SET_GPIO_DIRECTION\
	VERB_CMD(AC_VERB_SET_GPIO_DIRECTION, RT286_AUDIO_FUNCTION_GROUP, 0)
#define RT286_SET_GPIO_DATA\
	VERB_CMD(AC_VERB_SET_GPIO_DATA, RT286_AUDIO_FUNCTION_GROUP, 0)

/* Index registers */
#define RT286_A_BIAS_CTRL1	0x01
@@ -131,6 +137,7 @@
#define RT286_POWER_CTRL3	0x0f
#define RT286_MIC1_DET_CTRL	0x19
#define RT286_MISC_CTRL1	0x20
#define RT286_GPIO_CTRL		0x29
#define RT286_IRQ_CTRL		0x33
#define RT286_PLL_CTRL1		0x49
#define RT286_CBJ_CTRL1		0x4f
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ config SND_PXA910_SOC
	  Marvell PXA910 reference platform.

config SND_SOC_TTC_DKB
	bool "SoC Audio support for TTC DKB"
	tristate "SoC Audio support for TTC DKB"
	depends on SND_PXA910_SOC && MACH_TTC_DKB && I2C=y
	select PXA_SSP
	select SND_PXA_SOC_SSP
+1 −15
Original line number Diff line number Diff line
@@ -259,20 +259,6 @@ static const struct snd_kcontrol_new wm8731_corgi_controls[] = {
		corgi_set_spk),
};

/*
 * Logic for a wm8731 as connected on a Sharp SL-C7x0 Device
 */
static int corgi_wm8731_init(struct snd_soc_pcm_runtime *rtd)
{
	struct snd_soc_codec *codec = rtd->codec;
	struct snd_soc_dapm_context *dapm = &codec->dapm;

	snd_soc_dapm_nc_pin(dapm, "LLINEIN");
	snd_soc_dapm_nc_pin(dapm, "RLINEIN");

	return 0;
}

/* corgi digital audio interface glue - connects codec <--> CPU */
static struct snd_soc_dai_link corgi_dai = {
	.name = "WM8731",
@@ -281,7 +267,6 @@ static struct snd_soc_dai_link corgi_dai = {
	.codec_dai_name = "wm8731-hifi",
	.platform_name = "pxa-pcm-audio",
	.codec_name = "wm8731.0-001b",
	.init = corgi_wm8731_init,
	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
		   SND_SOC_DAIFMT_CBS_CFS,
	.ops = &corgi_ops,
@@ -300,6 +285,7 @@ static struct snd_soc_card corgi = {
	.num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets),
	.dapm_routes = corgi_audio_map,
	.num_dapm_routes = ARRAY_SIZE(corgi_audio_map),
	.fully_routed = true,
};

static int corgi_probe(struct platform_device *pdev)
Loading