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

Unverified Commit b5e806ae authored by Mark Brown's avatar Mark Brown
Browse files

Merge branch 'asoc-5.0' into asoc-linus

parents 5908e6b7 8af6c521
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ Required properties:
                Documentation/devicetree/bindings/regulator/regulator.txt

Optional properties:
 - reset-gpio:  the reset pin for the chip, for more details consult
 - reset-gpios: the reset pin for the chip, for more details consult
                Documentation/devicetree/bindings/gpio/gpio.txt

 - DVDD-supply: supply voltage for the digital core, please consult
@@ -40,7 +40,7 @@ Examples:
		AVDD-supply = <&regulator>;
		DVDD-supply = <&regulator_digital>;

		reset_gpio = <&gpio 10 GPIO_ACTIVE_LOW>;
		reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
	};

	adau1977_i2c: adau1977@11 {
@@ -50,5 +50,5 @@ Examples:
		AVDD-supply = <&regulator>;
		DVDD-supply = <&regulator_digital>;

		reset_gpio = <&gpio 10 GPIO_ACTIVE_LOW>;
		reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
	};
+4 −4
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ struct pcm186x_priv {
	bool is_master_mode;
};

static const DECLARE_TLV_DB_SCALE(pcm186x_pga_tlv, -1200, 4000, 50);
static const DECLARE_TLV_DB_SCALE(pcm186x_pga_tlv, -1200, 50, 0);

static const struct snd_kcontrol_new pcm1863_snd_controls[] = {
	SOC_DOUBLE_R_S_TLV("ADC Capture Volume", PCM186X_PGA_VAL_CH1_L,
@@ -158,7 +158,7 @@ static const struct snd_soc_dapm_widget pcm1863_dapm_widgets[] = {
	 * Put the codec into SLEEP mode when not in use, allowing the
	 * Energysense mechanism to operate.
	 */
	SND_SOC_DAPM_ADC("ADC", "HiFi Capture", PCM186X_POWER_CTRL, 1,  0),
	SND_SOC_DAPM_ADC("ADC", "HiFi Capture", PCM186X_POWER_CTRL, 1,  1),
};

static const struct snd_soc_dapm_widget pcm1865_dapm_widgets[] = {
@@ -184,8 +184,8 @@ static const struct snd_soc_dapm_widget pcm1865_dapm_widgets[] = {
	 * Put the codec into SLEEP mode when not in use, allowing the
	 * Energysense mechanism to operate.
	 */
	SND_SOC_DAPM_ADC("ADC1", "HiFi Capture 1", PCM186X_POWER_CTRL, 1,  0),
	SND_SOC_DAPM_ADC("ADC2", "HiFi Capture 2", PCM186X_POWER_CTRL, 1,  0),
	SND_SOC_DAPM_ADC("ADC1", "HiFi Capture 1", PCM186X_POWER_CTRL, 1,  1),
	SND_SOC_DAPM_ADC("ADC2", "HiFi Capture 2", PCM186X_POWER_CTRL, 1,  1),
};

static const struct snd_soc_dapm_route pcm1863_dapm_routes[] = {
+21 −17
Original line number Diff line number Diff line
@@ -3422,6 +3422,23 @@ static int wm_adsp_buffer_free(struct wm_adsp *dsp)
	return 0;
}

static int wm_adsp_buffer_get_error(struct wm_adsp_compr_buf *buf)
{
	int ret;

	ret = wm_adsp_buffer_read(buf, HOST_BUFFER_FIELD(error), &buf->error);
	if (ret < 0) {
		adsp_err(buf->dsp, "Failed to check buffer error: %d\n", ret);
		return ret;
	}
	if (buf->error != 0) {
		adsp_err(buf->dsp, "Buffer error occurred: %d\n", buf->error);
		return -EIO;
	}

	return 0;
}

int wm_adsp_compr_trigger(struct snd_compr_stream *stream, int cmd)
{
	struct wm_adsp_compr *compr = stream->runtime->private_data;
@@ -3443,6 +3460,10 @@ int wm_adsp_compr_trigger(struct snd_compr_stream *stream, int cmd)
			}
		}

		ret = wm_adsp_buffer_get_error(compr->buf);
		if (ret < 0)
			break;

		wm_adsp_buffer_clear(compr->buf);

		/* Trigger the IRQ at one fragment of data */
@@ -3518,23 +3539,6 @@ static int wm_adsp_buffer_update_avail(struct wm_adsp_compr_buf *buf)
	return 0;
}

static int wm_adsp_buffer_get_error(struct wm_adsp_compr_buf *buf)
{
	int ret;

	ret = wm_adsp_buffer_read(buf, HOST_BUFFER_FIELD(error), &buf->error);
	if (ret < 0) {
		adsp_err(buf->dsp, "Failed to check buffer error: %d\n", ret);
		return ret;
	}
	if (buf->error != 0) {
		adsp_err(buf->dsp, "Buffer error occurred: %d\n", buf->error);
		return -EIO;
	}

	return 0;
}

int wm_adsp_compr_handle_irq(struct wm_adsp *dsp)
{
	struct wm_adsp_compr_buf *buf;
+4 −3
Original line number Diff line number Diff line
@@ -398,7 +398,8 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
		break;
	case SND_SOC_DAIFMT_RIGHT_J:
		/* Data on rising edge of bclk, frame high, right aligned */
		xccr |= ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP | ESAI_xCR_xWA;
		xccr |= ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP;
		xcr  |= ESAI_xCR_xWA;
		break;
	case SND_SOC_DAIFMT_DSP_A:
		/* Data on rising edge of bclk, frame high, 1clk before data */
@@ -455,12 +456,12 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
		return -EINVAL;
	}

	mask = ESAI_xCR_xFSL | ESAI_xCR_xFSR;
	mask = ESAI_xCR_xFSL | ESAI_xCR_xFSR | ESAI_xCR_xWA;
	regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, mask, xcr);
	regmap_update_bits(esai_priv->regmap, REG_ESAI_RCR, mask, xcr);

	mask = ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP | ESAI_xCCR_xFSP |
		ESAI_xCCR_xFSD | ESAI_xCCR_xCKD | ESAI_xCR_xWA;
		ESAI_xCCR_xFSD | ESAI_xCCR_xCKD;
	regmap_update_bits(esai_priv->regmap, REG_ESAI_TCCR, mask, xccr);
	regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR, mask, xccr);

+24 −0
Original line number Diff line number Diff line
@@ -255,6 +255,30 @@ static int rsnd_gen2_probe(struct rsnd_priv *priv)
		RSND_GEN_M_REG(SSI_MODE,		0xc,	0x80),
		RSND_GEN_M_REG(SSI_CTRL,		0x10,	0x80),
		RSND_GEN_M_REG(SSI_INT_ENABLE,		0x18,	0x80),
		RSND_GEN_S_REG(SSI9_BUSIF0_MODE,	0x48c),
		RSND_GEN_S_REG(SSI9_BUSIF0_ADINR,	0x484),
		RSND_GEN_S_REG(SSI9_BUSIF0_DALIGN,	0x488),
		RSND_GEN_S_REG(SSI9_BUSIF1_MODE,	0x4a0),
		RSND_GEN_S_REG(SSI9_BUSIF1_ADINR,	0x4a4),
		RSND_GEN_S_REG(SSI9_BUSIF1_DALIGN,	0x4a8),
		RSND_GEN_S_REG(SSI9_BUSIF2_MODE,	0x4c0),
		RSND_GEN_S_REG(SSI9_BUSIF2_ADINR,	0x4c4),
		RSND_GEN_S_REG(SSI9_BUSIF2_DALIGN,	0x4c8),
		RSND_GEN_S_REG(SSI9_BUSIF3_MODE,	0x4e0),
		RSND_GEN_S_REG(SSI9_BUSIF3_ADINR,	0x4e4),
		RSND_GEN_S_REG(SSI9_BUSIF3_DALIGN,	0x4e8),
		RSND_GEN_S_REG(SSI9_BUSIF4_MODE,	0xd80),
		RSND_GEN_S_REG(SSI9_BUSIF4_ADINR,	0xd84),
		RSND_GEN_S_REG(SSI9_BUSIF4_DALIGN,	0xd88),
		RSND_GEN_S_REG(SSI9_BUSIF5_MODE,	0xda0),
		RSND_GEN_S_REG(SSI9_BUSIF5_ADINR,	0xda4),
		RSND_GEN_S_REG(SSI9_BUSIF5_DALIGN,	0xda8),
		RSND_GEN_S_REG(SSI9_BUSIF6_MODE,	0xdc0),
		RSND_GEN_S_REG(SSI9_BUSIF6_ADINR,	0xdc4),
		RSND_GEN_S_REG(SSI9_BUSIF6_DALIGN,	0xdc8),
		RSND_GEN_S_REG(SSI9_BUSIF7_MODE,	0xde0),
		RSND_GEN_S_REG(SSI9_BUSIF7_ADINR,	0xde4),
		RSND_GEN_S_REG(SSI9_BUSIF7_DALIGN,	0xde8),
	};

	static const struct rsnd_regmap_field_conf conf_scu[] = {
Loading