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

Merge tag 'asoc-fix-v6.3-rc1' of...

Merge tag 'asoc-fix-v6.3-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.3

More fixes that came in since -rc1, a lot from Intel - looks like
they've been busy test.  Everything is driver specific.
parents ff447886 e041a2a5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -968,6 +968,8 @@ int da7219_aad_init(struct snd_soc_component *component)
	INIT_WORK(&da7219_aad->hptest_work, da7219_aad_hptest_work);
	INIT_WORK(&da7219_aad->jack_det_work, da7219_aad_jack_det_work);

	mutex_init(&da7219_aad->jack_det_mutex);

	ret = request_threaded_irq(da7219_aad->irq, da7219_aad_pre_irq_thread,
				   da7219_aad_irq_thread,
				   IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+11 −0
Original line number Diff line number Diff line
@@ -428,8 +428,13 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream,
{
	struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
	bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
	bool has_capture = !hcp->hcd.no_i2s_capture;
	bool has_playback = !hcp->hcd.no_i2s_playback;
	int ret = 0;

	if (!((has_playback && tx) || (has_capture && !tx)))
		return 0;

	mutex_lock(&hcp->lock);
	if (hcp->busy) {
		dev_err(dai->dev, "Only one simultaneous stream supported!\n");
@@ -468,6 +473,12 @@ static void hdmi_codec_shutdown(struct snd_pcm_substream *substream,
				struct snd_soc_dai *dai)
{
	struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
	bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
	bool has_capture = !hcp->hcd.no_i2s_capture;
	bool has_playback = !hcp->hcd.no_i2s_playback;

	if (!((has_playback && tx) || (has_capture && !tx)))
		return;

	hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;
	hcp->hcd.ops->audio_shutdown(dai->dev->parent, hcp->hcd.data);
+6 −5
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ enum {

struct tx_mute_work {
	struct tx_macro *tx;
	u32 decimator;
	u8 decimator;
	struct delayed_work dwork;
};

@@ -635,7 +635,7 @@ static int tx_macro_mclk_enable(struct tx_macro *tx,
	return 0;
}

static bool is_amic_enabled(struct snd_soc_component *component, int decimator)
static bool is_amic_enabled(struct snd_soc_component *component, u8 decimator)
{
	u16 adc_mux_reg, adc_reg, adc_n;

@@ -849,7 +849,7 @@ static int tx_macro_enable_dec(struct snd_soc_dapm_widget *w,
			       struct snd_kcontrol *kcontrol, int event)
{
	struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
	unsigned int decimator;
	u8 decimator;
	u16 tx_vol_ctl_reg, dec_cfg_reg, hpf_gate_reg, tx_gain_ctl_reg;
	u8 hpf_cut_off_freq;
	int hpf_delay = TX_MACRO_DMIC_HPF_DELAY_MS;
@@ -1064,7 +1064,8 @@ static int tx_macro_hw_params(struct snd_pcm_substream *substream,
			      struct snd_soc_dai *dai)
{
	struct snd_soc_component *component = dai->component;
	u32 decimator, sample_rate;
	u32 sample_rate;
	u8 decimator;
	int tx_fs_rate;
	struct tx_macro *tx = snd_soc_component_get_drvdata(component);

@@ -1128,7 +1129,7 @@ static int tx_macro_digital_mute(struct snd_soc_dai *dai, int mute, int stream)
{
	struct snd_soc_component *component = dai->component;
	struct tx_macro *tx = snd_soc_component_get_drvdata(component);
	u16 decimator;
	u8 decimator;

	/* active decimator not set yet */
	if (tx->active_decimator[dai->id] == -1)
+4 −0
Original line number Diff line number Diff line
@@ -294,6 +294,10 @@ config SND_SOC_IMX_SGTL5000
	  Say Y if you want to add support for SoC audio on an i.MX board with
	  a sgtl5000 codec.

	  Note that this is an old driver. Consider enabling
	  SND_SOC_FSL_ASOC_CARD and SND_SOC_SGTL5000 to use the newer
	  driver.

config SND_SOC_IMX_SPDIF
	tristate "SoC Audio support for i.MX boards with S/PDIF"
	select SND_SOC_IMX_PCM_DMA
+21 −0
Original line number Diff line number Diff line
@@ -117,6 +117,26 @@ static void avs_da7219_codec_exit(struct snd_soc_pcm_runtime *rtd)
	snd_soc_component_set_jack(asoc_rtd_to_codec(rtd, 0)->component, NULL, NULL);
}

static int
avs_da7219_be_fixup(struct snd_soc_pcm_runtime *runrime, struct snd_pcm_hw_params *params)
{
	struct snd_interval *rate, *channels;
	struct snd_mask *fmt;

	rate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
	channels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
	fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);

	/* The ADSP will convert the FE rate to 48k, stereo */
	rate->min = rate->max = 48000;
	channels->min = channels->max = 2;

	/* set SSP0 to 24 bit */
	snd_mask_none(fmt);
	snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S24_LE);
	return 0;
}

static int avs_create_dai_link(struct device *dev, const char *platform_name, int ssp_port,
			       struct snd_soc_dai_link **dai_link)
{
@@ -148,6 +168,7 @@ static int avs_create_dai_link(struct device *dev, const char *platform_name, in
	dl->num_platforms = 1;
	dl->id = 0;
	dl->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS;
	dl->be_hw_params_fixup = avs_da7219_be_fixup;
	dl->init = avs_da7219_codec_init;
	dl->exit = avs_da7219_codec_exit;
	dl->nonatomic = 1;
Loading