Commit df37d941 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge tag 'asoc-fix-v5.4-rc6' of...

Merge tag 'asoc-fix-v5.4-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.4

These are a collection of fixes since v5.4-rc4 that have accumilated,
they're all driver specific and there's nothing major in here so it's
probably not essential to actually send them but I'll leave that call to
you.
parents e7af6307 9508ef5a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -528,7 +528,7 @@ static int snd_compress_check_input(struct snd_compr_params *params)
{
	/* first let's check the buffer parameter's */
	if (params->buffer.fragment_size == 0 ||
	    params->buffer.fragments > INT_MAX / params->buffer.fragment_size ||
	    params->buffer.fragments > U32_MAX / params->buffer.fragment_size ||
	    params->buffer.fragments == 0)
		return -EINVAL;

+1 −1
Original line number Diff line number Diff line
@@ -410,8 +410,8 @@ static void hdac_hda_codec_remove(struct snd_soc_component *component)
		return;
	}

	snd_hdac_ext_bus_link_put(hdev->bus, hlink);
	pm_runtime_disable(&hdev->dev);
	snd_hdac_ext_bus_link_put(hdev->bus, hlink);
}

static const struct snd_soc_dapm_route hdac_hda_dapm_routes[] = {
+5 −7
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ struct hdmi_codec_priv {
	uint8_t eld[MAX_ELD_BYTES];
	struct snd_pcm_chmap *chmap_info;
	unsigned int chmap_idx;
	struct mutex lock;
	unsigned long busy;
	struct snd_soc_jack *jack;
	unsigned int jack_status;
};
@@ -390,8 +390,8 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream,
	struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
	int ret = 0;

	ret = mutex_trylock(&hcp->lock);
	if (!ret) {
	ret = test_and_set_bit(0, &hcp->busy);
	if (ret) {
		dev_err(dai->dev, "Only one simultaneous stream supported!\n");
		return -EINVAL;
	}
@@ -419,7 +419,7 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream,

err:
	/* Release the exclusive lock on error */
	mutex_unlock(&hcp->lock);
	clear_bit(0, &hcp->busy);
	return ret;
}

@@ -431,7 +431,7 @@ static void hdmi_codec_shutdown(struct snd_pcm_substream *substream,
	hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;
	hcp->hcd.ops->audio_shutdown(dai->dev->parent, hcp->hcd.data);

	mutex_unlock(&hcp->lock);
	clear_bit(0, &hcp->busy);
}

static int hdmi_codec_hw_params(struct snd_pcm_substream *substream,
@@ -811,8 +811,6 @@ static int hdmi_codec_probe(struct platform_device *pdev)
		return -ENOMEM;

	hcp->hcd = *hcd;
	mutex_init(&hcp->lock);

	daidrv = devm_kcalloc(dev, dai_count, sizeof(*daidrv), GFP_KERNEL);
	if (!daidrv)
		return -ENOMEM;
+2 −2
Original line number Diff line number Diff line
@@ -960,11 +960,11 @@ static int max98373_i2c_probe(struct i2c_client *i2c,

	/* Power on device */
	if (gpio_is_valid(max98373->reset_gpio)) {
		ret = gpio_request(max98373->reset_gpio, "MAX98373_RESET");
		ret = devm_gpio_request(&i2c->dev, max98373->reset_gpio,
					"MAX98373_RESET");
		if (ret) {
			dev_err(&i2c->dev, "%s: Failed to request gpio %d\n",
				__func__, max98373->reset_gpio);
			gpio_free(max98373->reset_gpio);
			return -EINVAL;
		}
		gpio_direction_output(max98373->reset_gpio, 0);
+2 −2
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ struct pm8916_wcd_analog_priv {
};

static const char *const adc2_mux_text[] = { "ZERO", "INP2", "INP3" };
static const char *const rdac2_mux_text[] = { "ZERO", "RX2", "RX1" };
static const char *const rdac2_mux_text[] = { "RX1", "RX2" };
static const char *const hph_text[] = { "ZERO", "Switch", };

static const struct soc_enum hph_enum = SOC_ENUM_SINGLE_VIRT(
@@ -321,7 +321,7 @@ static const struct soc_enum adc2_enum = SOC_ENUM_SINGLE_VIRT(

/* RDAC2 MUX */
static const struct soc_enum rdac2_mux_enum = SOC_ENUM_SINGLE(
			CDC_D_CDC_CONN_HPHR_DAC_CTL, 0, 3, rdac2_mux_text);
			CDC_D_CDC_CONN_HPHR_DAC_CTL, 0, 2, rdac2_mux_text);

static const struct snd_kcontrol_new spkr_switch[] = {
	SOC_DAPM_SINGLE("Switch", CDC_A_SPKR_DAC_CTL, 7, 1, 0)
Loading