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

Commit 6a4bfa7c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "Nothing too exciting as a new year's start here: most of fixes are for
  ASoC, a boot crash fix on OMAP for deferred probe, a few driver
  specific fixes (Intel, dwc, rockchip, rt5677), in addition to typo
  fixes in kerneldoc comments for PCM"

* tag 'sound-3.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: pcm: Fix kerneldoc for params_*() functions
  ASoC: rockchip: i2s: fix maxburst of dma data to 4
  ASoC: rockchip: i2s: fix error defination of transmit data level
  ASoC: Intel: correct the fixed free block allocation
  ASoC: rt5677: fixed rt5677_dsp_vad_put rt5677_dsp_vad_get panic
  ASoC: Intel: Fix BYTCR machine driver MODULE_ALIAS
  ASoC: Intel: Fix BYTCR firmware name
  ASoC: dwc: Iterate over all channels
  ASoC: dwc: Ensure FIFOs are flushed to prevent channel swap
  ASoC: Intel: Add I2C dependency to two new machines
  ASoC: dapm: Remove snd_soc_of_parse_audio_routing() due to deferred probe
parents d7e19bd8 62f64a88
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -857,7 +857,7 @@ static inline unsigned int params_channels(const struct snd_pcm_hw_params *p)
}
}


/**
/**
 * params_channels - Get the sample rate from the hw params
 * params_rate - Get the sample rate from the hw params
 * @p: hw params
 * @p: hw params
 */
 */
static inline unsigned int params_rate(const struct snd_pcm_hw_params *p)
static inline unsigned int params_rate(const struct snd_pcm_hw_params *p)
@@ -866,7 +866,7 @@ static inline unsigned int params_rate(const struct snd_pcm_hw_params *p)
}
}


/**
/**
 * params_channels - Get the period size (in frames) from the hw params
 * params_period_size - Get the period size (in frames) from the hw params
 * @p: hw params
 * @p: hw params
 */
 */
static inline unsigned int params_period_size(const struct snd_pcm_hw_params *p)
static inline unsigned int params_period_size(const struct snd_pcm_hw_params *p)
@@ -875,7 +875,7 @@ static inline unsigned int params_period_size(const struct snd_pcm_hw_params *p)
}
}


/**
/**
 * params_channels - Get the number of periods from the hw params
 * params_periods - Get the number of periods from the hw params
 * @p: hw params
 * @p: hw params
 */
 */
static inline unsigned int params_periods(const struct snd_pcm_hw_params *p)
static inline unsigned int params_periods(const struct snd_pcm_hw_params *p)
@@ -884,7 +884,7 @@ static inline unsigned int params_periods(const struct snd_pcm_hw_params *p)
}
}


/**
/**
 * params_channels - Get the buffer size (in frames) from the hw params
 * params_buffer_size - Get the buffer size (in frames) from the hw params
 * @p: hw params
 * @p: hw params
 */
 */
static inline unsigned int params_buffer_size(const struct snd_pcm_hw_params *p)
static inline unsigned int params_buffer_size(const struct snd_pcm_hw_params *p)
@@ -893,7 +893,7 @@ static inline unsigned int params_buffer_size(const struct snd_pcm_hw_params *p)
}
}


/**
/**
 * params_channels - Get the buffer size (in bytes) from the hw params
 * params_buffer_bytes - Get the buffer size (in bytes) from the hw params
 * @p: hw params
 * @p: hw params
 */
 */
static inline unsigned int params_buffer_bytes(const struct snd_pcm_hw_params *p)
static inline unsigned int params_buffer_bytes(const struct snd_pcm_hw_params *p)
+5 −4
Original line number Original line Diff line number Diff line
@@ -784,8 +784,8 @@ static unsigned int bst_tlv[] = {
static int rt5677_dsp_vad_get(struct snd_kcontrol *kcontrol,
static int rt5677_dsp_vad_get(struct snd_kcontrol *kcontrol,
		struct snd_ctl_elem_value *ucontrol)
		struct snd_ctl_elem_value *ucontrol)
{
{
	struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
	struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
	struct rt5677_priv *rt5677 = snd_soc_component_get_drvdata(component);


	ucontrol->value.integer.value[0] = rt5677->dsp_vad_en;
	ucontrol->value.integer.value[0] = rt5677->dsp_vad_en;


@@ -795,8 +795,9 @@ static int rt5677_dsp_vad_get(struct snd_kcontrol *kcontrol,
static int rt5677_dsp_vad_put(struct snd_kcontrol *kcontrol,
static int rt5677_dsp_vad_put(struct snd_kcontrol *kcontrol,
		struct snd_ctl_elem_value *ucontrol)
		struct snd_ctl_elem_value *ucontrol)
{
{
	struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
	struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
	struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
	struct rt5677_priv *rt5677 = snd_soc_component_get_drvdata(component);
	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);


	rt5677->dsp_vad_en = !!ucontrol->value.integer.value[0];
	rt5677->dsp_vad_en = !!ucontrol->value.integer.value[0];


+30 −19
Original line number Original line Diff line number Diff line
@@ -209,16 +209,9 @@ static int dw_i2s_hw_params(struct snd_pcm_substream *substream,


	switch (config->chan_nr) {
	switch (config->chan_nr) {
	case EIGHT_CHANNEL_SUPPORT:
	case EIGHT_CHANNEL_SUPPORT:
		ch_reg = 3;
		break;
	case SIX_CHANNEL_SUPPORT:
	case SIX_CHANNEL_SUPPORT:
		ch_reg = 2;
		break;
	case FOUR_CHANNEL_SUPPORT:
	case FOUR_CHANNEL_SUPPORT:
		ch_reg = 1;
		break;
	case TWO_CHANNEL_SUPPORT:
	case TWO_CHANNEL_SUPPORT:
		ch_reg = 0;
		break;
		break;
	default:
	default:
		dev_err(dev->dev, "channel not supported\n");
		dev_err(dev->dev, "channel not supported\n");
@@ -227,19 +220,23 @@ static int dw_i2s_hw_params(struct snd_pcm_substream *substream,


	i2s_disable_channels(dev, substream->stream);
	i2s_disable_channels(dev, substream->stream);


	for (ch_reg = 0; ch_reg < (config->chan_nr / 2); ch_reg++) {
		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
		i2s_write_reg(dev->i2s_base, TCR(ch_reg), xfer_resolution);
			i2s_write_reg(dev->i2s_base, TCR(ch_reg),
				      xfer_resolution);
			i2s_write_reg(dev->i2s_base, TFCR(ch_reg), 0x02);
			i2s_write_reg(dev->i2s_base, TFCR(ch_reg), 0x02);
			irq = i2s_read_reg(dev->i2s_base, IMR(ch_reg));
			irq = i2s_read_reg(dev->i2s_base, IMR(ch_reg));
			i2s_write_reg(dev->i2s_base, IMR(ch_reg), irq & ~0x30);
			i2s_write_reg(dev->i2s_base, IMR(ch_reg), irq & ~0x30);
			i2s_write_reg(dev->i2s_base, TER(ch_reg), 1);
			i2s_write_reg(dev->i2s_base, TER(ch_reg), 1);
		} else {
		} else {
		i2s_write_reg(dev->i2s_base, RCR(ch_reg), xfer_resolution);
			i2s_write_reg(dev->i2s_base, RCR(ch_reg),
				      xfer_resolution);
			i2s_write_reg(dev->i2s_base, RFCR(ch_reg), 0x07);
			i2s_write_reg(dev->i2s_base, RFCR(ch_reg), 0x07);
			irq = i2s_read_reg(dev->i2s_base, IMR(ch_reg));
			irq = i2s_read_reg(dev->i2s_base, IMR(ch_reg));
			i2s_write_reg(dev->i2s_base, IMR(ch_reg), irq & ~0x03);
			i2s_write_reg(dev->i2s_base, IMR(ch_reg), irq & ~0x03);
			i2s_write_reg(dev->i2s_base, RER(ch_reg), 1);
			i2s_write_reg(dev->i2s_base, RER(ch_reg), 1);
		}
		}
	}


	i2s_write_reg(dev->i2s_base, CCR, ccr);
	i2s_write_reg(dev->i2s_base, CCR, ccr);


@@ -263,6 +260,19 @@ static void dw_i2s_shutdown(struct snd_pcm_substream *substream,
	snd_soc_dai_set_dma_data(dai, substream, NULL);
	snd_soc_dai_set_dma_data(dai, substream, NULL);
}
}


static int dw_i2s_prepare(struct snd_pcm_substream *substream,
			  struct snd_soc_dai *dai)
{
	struct dw_i2s_dev *dev = snd_soc_dai_get_drvdata(dai);

	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
		i2s_write_reg(dev->i2s_base, TXFFR, 1);
	else
		i2s_write_reg(dev->i2s_base, RXFFR, 1);

	return 0;
}

static int dw_i2s_trigger(struct snd_pcm_substream *substream,
static int dw_i2s_trigger(struct snd_pcm_substream *substream,
		int cmd, struct snd_soc_dai *dai)
		int cmd, struct snd_soc_dai *dai)
{
{
@@ -294,6 +304,7 @@ static struct snd_soc_dai_ops dw_i2s_dai_ops = {
	.startup	= dw_i2s_startup,
	.startup	= dw_i2s_startup,
	.shutdown	= dw_i2s_shutdown,
	.shutdown	= dw_i2s_shutdown,
	.hw_params	= dw_i2s_hw_params,
	.hw_params	= dw_i2s_hw_params,
	.prepare	= dw_i2s_prepare,
	.trigger	= dw_i2s_trigger,
	.trigger	= dw_i2s_trigger,
};
};


+2 −2
Original line number Original line Diff line number Diff line
@@ -89,7 +89,7 @@ config SND_SOC_INTEL_BROADWELL_MACH


config SND_SOC_INTEL_BYTCR_RT5640_MACH
config SND_SOC_INTEL_BYTCR_RT5640_MACH
	tristate "ASoC Audio DSP Support for MID BYT Platform"
	tristate "ASoC Audio DSP Support for MID BYT Platform"
	depends on X86
	depends on X86 && I2C
	select SND_SOC_RT5640
	select SND_SOC_RT5640
	select SND_SST_MFLD_PLATFORM
	select SND_SST_MFLD_PLATFORM
	select SND_SST_IPC_ACPI
	select SND_SST_IPC_ACPI
@@ -101,7 +101,7 @@ config SND_SOC_INTEL_BYTCR_RT5640_MACH


config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
        tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec"
        tristate "ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec"
        depends on X86_INTEL_LPSS
        depends on X86_INTEL_LPSS && I2C
        select SND_SOC_RT5670
        select SND_SOC_RT5670
        select SND_SST_MFLD_PLATFORM
        select SND_SST_MFLD_PLATFORM
        select SND_SST_IPC_ACPI
        select SND_SST_IPC_ACPI
+1 −1
Original line number Original line Diff line number Diff line
@@ -227,4 +227,4 @@ module_platform_driver(snd_byt_mc_driver);
MODULE_DESCRIPTION("ASoC Intel(R) Baytrail CR Machine driver");
MODULE_DESCRIPTION("ASoC Intel(R) Baytrail CR Machine driver");
MODULE_AUTHOR("Subhransu S. Prusty <subhransu.s.prusty@intel.com>");
MODULE_AUTHOR("Subhransu S. Prusty <subhransu.s.prusty@intel.com>");
MODULE_LICENSE("GPL v2");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:bytrt5640-audio");
MODULE_ALIAS("platform:bytt100_rt5640");
Loading