Unverified Commit 39c5c44f authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Merge up fixes

Needed for the Rockchip driver.
parents eaa27e7f 26b9f2fa
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -25,12 +25,12 @@ properties:
      - qcom,sc7280-lpass-cpu

  reg:
    minItems: 2
    minItems: 1
    maxItems: 6
    description: LPAIF core registers

  reg-names:
    minItems: 2
    minItems: 1
    maxItems: 6

  clocks:
@@ -42,12 +42,12 @@ properties:
    maxItems: 10

  interrupts:
    minItems: 2
    minItems: 1
    maxItems: 4
    description: LPAIF DMA buffer interrupt

  interrupt-names:
    minItems: 2
    minItems: 1
    maxItems: 4

  qcom,adsp:
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ AC97
====

AC97 is a five wire interface commonly found on many PC sound cards. It is
now also popular in many portable devices. This DAI has a reset line and time
now also popular in many portable devices. This DAI has a RESET line and time
multiplexes its data on its SDATA_OUT (playback) and SDATA_IN (capture) lines.
The bit clock (BCLK) is always driven by the CODEC (usually 12.288MHz) and the
frame (FRAME) (usually 48kHz) is always driven by the controller. Each AC97
+2 −2
Original line number Diff line number Diff line
@@ -1760,8 +1760,8 @@ static bool arizona_aif_cfg_changed(struct snd_soc_component *component,
	if (bclk != (val & ARIZONA_AIF1_BCLK_FREQ_MASK))
		return true;

	val = snd_soc_component_read(component, base + ARIZONA_AIF_TX_BCLK_RATE);
	if (lrclk != (val & ARIZONA_AIF1TX_BCPF_MASK))
	val = snd_soc_component_read(component, base + ARIZONA_AIF_RX_BCLK_RATE);
	if (lrclk != (val & ARIZONA_AIF1RX_BCPF_MASK))
		return true;

	val = snd_soc_component_read(component, base + ARIZONA_AIF_FRAME_CTRL_1);
+7 −1
Original line number Diff line number Diff line
@@ -119,7 +119,13 @@ static int cs47l92_put_demux(struct snd_kcontrol *kcontrol,
end:
	snd_soc_dapm_mutex_unlock(dapm);

	return snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
	ret = snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
	if (ret < 0) {
		dev_err(madera->dev, "Failed to update demux power state: %d\n", ret);
		return ret;
	}

	return change;
}

static SOC_ENUM_SINGLE_DECL(cs47l92_outdemux_enum,
+22 −8
Original line number Diff line number Diff line
@@ -1984,7 +1984,12 @@ static int rt5640_set_bias_level(struct snd_soc_component *component,
		snd_soc_component_write(component, RT5640_PWR_DIG2, 0x0000);
		snd_soc_component_write(component, RT5640_PWR_VOL, 0x0000);
		snd_soc_component_write(component, RT5640_PWR_MIXER, 0x0000);
		snd_soc_component_write(component, RT5640_PWR_ANLG1, 0x0000);
		if (rt5640->jd_src == RT5640_JD_SRC_HDA_HEADER)
			snd_soc_component_write(component, RT5640_PWR_ANLG1,
				0x0018);
		else
			snd_soc_component_write(component, RT5640_PWR_ANLG1,
				0x0000);
		snd_soc_component_write(component, RT5640_PWR_ANLG2, 0x0000);
		break;

@@ -2393,9 +2398,15 @@ static void rt5640_jack_work(struct work_struct *work)
static irqreturn_t rt5640_irq(int irq, void *data)
{
	struct rt5640_priv *rt5640 = data;
	int delay = 0;

	if (rt5640->jd_src == RT5640_JD_SRC_HDA_HEADER) {
		cancel_delayed_work_sync(&rt5640->jack_work);
		delay = 100;
	}

	if (rt5640->jack)
		queue_delayed_work(system_long_wq, &rt5640->jack_work, 0);
		queue_delayed_work(system_long_wq, &rt5640->jack_work, delay);

	return IRQ_HANDLED;
}
@@ -2588,6 +2599,12 @@ static void rt5640_enable_hda_jack_detect(

	snd_soc_component_update_bits(component, RT5640_DUMMY1, 0x400, 0x0);

	snd_soc_component_update_bits(component, RT5640_PWR_ANLG1,
		RT5640_PWR_VREF2, RT5640_PWR_VREF2);
	usleep_range(10000, 15000);
	snd_soc_component_update_bits(component, RT5640_PWR_ANLG1,
		RT5640_PWR_FV2, RT5640_PWR_FV2);

	rt5640->jack = jack;

	ret = request_irq(rt5640->irq, rt5640_irq,
@@ -2707,17 +2724,14 @@ static int rt5640_probe(struct snd_soc_component *component)

	if (device_property_read_u32(component->dev,
				     "realtek,jack-detect-source", &val) == 0) {
		if (val <= RT5640_JD_SRC_GPIO4) {
		if (val <= RT5640_JD_SRC_GPIO4)
			rt5640->jd_src = val << RT5640_JD_SFT;
		} else if (val == RT5640_JD_SRC_HDA_HEADER) {
		else if (val == RT5640_JD_SRC_HDA_HEADER)
			rt5640->jd_src = RT5640_JD_SRC_HDA_HEADER;
			snd_soc_component_update_bits(component, RT5640_DUMMY1,
				0x0300, 0x0);
		} else {
		else
			dev_warn(component->dev, "Warning: Invalid jack-detect-source value: %d, leaving jack-detect disabled\n",
				 val);
	}
	}

	if (!device_property_read_bool(component->dev, "realtek,jack-detect-not-inverted"))
		rt5640->jd_inverted = true;
Loading