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

Commit 05e20542 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge branch 'fix/asoc' into for-linus

parents 7ab1fc0a 33195500
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -848,9 +848,10 @@ int atmel_ssc_set_audio(int ssc_id)
	if (IS_ERR(ssc))
		pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n",
			PTR_ERR(ssc));
	else
	else {
		ssc_pdev->dev.parent = &(ssc->pdev->dev);
		ssc_free(ssc);
	}

	ret = platform_device_add(ssc_pdev);
	if (ret < 0)
+2 −2
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ static struct snd_soc_dai_link bf5xx_ad1836_dai[] = {
		.cpu_dai_name = "bfin-tdm.0",
		.codec_dai_name = "ad1836-hifi",
		.platform_name = "bfin-tdm-pcm-audio",
		.codec_name = "ad1836.0",
		.codec_name = "spi0.4",
		.ops = &bf5xx_ad1836_ops,
	},
	{
@@ -84,7 +84,7 @@ static struct snd_soc_dai_link bf5xx_ad1836_dai[] = {
		.cpu_dai_name = "bfin-tdm.1",
		.codec_dai_name = "ad1836-hifi",
		.platform_name = "bfin-tdm-pcm-audio",
		.codec_name = "ad1836.0",
		.codec_name = "spi0.4",
		.ops = &bf5xx_ad1836_ops,
	},
};
+7 −7
Original line number Diff line number Diff line
@@ -145,22 +145,22 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream,
	/* bit size */
	switch (params_format(params)) {
	case SNDRV_PCM_FORMAT_S16_LE:
		word_len = 3;
		word_len = AD1836_WORD_LEN_16;
		break;
	case SNDRV_PCM_FORMAT_S20_3LE:
		word_len = 1;
		word_len = AD1836_WORD_LEN_20;
		break;
	case SNDRV_PCM_FORMAT_S24_LE:
	case SNDRV_PCM_FORMAT_S32_LE:
		word_len = 0;
		word_len = AD1836_WORD_LEN_24;
		break;
	}

	snd_soc_update_bits(codec, AD1836_DAC_CTRL1,
		AD1836_DAC_WORD_LEN_MASK, word_len);
	snd_soc_update_bits(codec, AD1836_DAC_CTRL1, AD1836_DAC_WORD_LEN_MASK,
		word_len << AD1836_DAC_WORD_LEN_OFFSET);

	snd_soc_update_bits(codec, AD1836_ADC_CTRL2,
		AD1836_ADC_WORD_LEN_MASK, word_len);
	snd_soc_update_bits(codec, AD1836_ADC_CTRL2, AD1836_ADC_WORD_LEN_MASK,
		word_len << AD1836_ADC_WORD_OFFSET);

	return 0;
}
+6 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#define AD1836_DAC_SERFMT_PCK256       (0x4 << 5)
#define AD1836_DAC_SERFMT_PCK128       (0x5 << 5)
#define AD1836_DAC_WORD_LEN_MASK       0x18
#define AD1836_DAC_WORD_LEN_OFFSET     3

#define AD1836_DAC_CTRL2               1
#define AD1836_DACL1_MUTE              0
@@ -51,6 +52,7 @@
#define AD1836_ADCL2_MUTE 		2
#define AD1836_ADCR2_MUTE 		3
#define AD1836_ADC_WORD_LEN_MASK       0x30
#define AD1836_ADC_WORD_OFFSET         5
#define AD1836_ADC_SERFMT_MASK	       (7 << 6)
#define AD1836_ADC_SERFMT_PCK256       (0x4 << 6)
#define AD1836_ADC_SERFMT_PCK128       (0x5 << 6)
@@ -60,4 +62,8 @@

#define AD1836_NUM_REGS                16

#define AD1836_WORD_LEN_24 0x0
#define AD1836_WORD_LEN_20 0x1
#define AD1836_WORD_LEN_16 0x2

#endif
+7 −2
Original line number Diff line number Diff line
@@ -680,20 +680,25 @@ static struct snd_soc_dai_ops wm8804_dai_ops = {
#define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
			SNDRV_PCM_FMTBIT_S24_LE)

#define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
		      SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \
		      SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | \
		      SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000)

static struct snd_soc_dai_driver wm8804_dai = {
	.name = "wm8804-spdif",
	.playback = {
		.stream_name = "Playback",
		.channels_min = 2,
		.channels_max = 2,
		.rates = SNDRV_PCM_RATE_8000_192000,
		.rates = WM8804_RATES,
		.formats = WM8804_FORMATS,
	},
	.capture = {
		.stream_name = "Capture",
		.channels_min = 2,
		.channels_max = 2,
		.rates = SNDRV_PCM_RATE_8000_192000,
		.rates = WM8804_RATES,
		.formats = WM8804_FORMATS,
	},
	.ops = &wm8804_dai_ops,
Loading