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

Commit 57b252f8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "This time it contains a bunch of small ASoC fixes that slipped from in
  previous updates, in addition to the usual HD-audio fixes and the
  regression fixes for FireWire updates in 3.17.

  All commits are reasonably small fixes"

* tag 'sound-3.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix COEF setups for ALC1150 codec
  ASoC: simple-card: Fix bug of wrong decrement DT node's refcount
  ALSA: hda - Fix digital mic on Acer Aspire 3830TG
  ASoC: omap-twl4030: Fix typo in 2nd dai link's platform_name
  ALSA: firewire-lib/dice: add arrangements of PCM pointer and interrupts for Dice quirk
  ALSA: dice: fix wrong channel mappping at higher sampling rate
  ASoC: cs4265: Fix setting of functional mode and clock divider
  ASoC: cs4265: Fix clock rates in clock map table
  ASoC: rt5677: correct mismatch widget name
  ASoC: rt5640: Do not allow regmap to use bulk read-write operations
  ASoC: tegra: Fix typo in include guard
  ASoC: da732x: Fix typo in include guard
  ASoC: core: fix .info for SND_SOC_BYTES_TLV
  ASoC: rcar: Use && instead of & for boolean expressions
  ASoC: Use dev_set_name() instead of init_name
  ASoC: axi: Fix ADI AXI SPDIF specification
parents 44bf091f 05244d16
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
ADI AXI-SPDIF controller

Required properties:
 - compatible : Must be "adi,axi-spdif-1.00.a"
 - compatible : Must be "adi,axi-spdif-tx-1.00.a"
 - reg : Must contain SPDIF core's registers location and length
 - clocks : Pairs of phandle and specifier referencing the controller's clocks.
   The controller expects two clocks, the clock used for the AXI interface and
+1 −1
Original line number Diff line number Diff line
@@ -277,7 +277,7 @@
	.access = SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE | \
		  SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, \
	.tlv.c = (snd_soc_bytes_tlv_callback), \
	.info = snd_soc_info_bytes_ext, \
	.info = snd_soc_bytes_info_ext, \
	.private_value = (unsigned long)&(struct soc_bytes_ext) \
		{.max = xcount, .get = xhandler_get, .put = xhandler_put, } }
#define SOC_SINGLE_XR_SX(xname, xregbase, xregcount, xnbits, \
+10 −1
Original line number Diff line number Diff line
@@ -507,7 +507,16 @@ static void amdtp_pull_midi(struct amdtp_stream *s,
static void update_pcm_pointers(struct amdtp_stream *s,
				struct snd_pcm_substream *pcm,
				unsigned int frames)
{	unsigned int ptr;
{
	unsigned int ptr;

	/*
	 * In IEC 61883-6, one data block represents one event. In ALSA, one
	 * event equals to one PCM frame. But Dice has a quirk to transfer
	 * two PCM frames in one data block.
	 */
	if (s->double_pcm_frames)
		frames *= 2;

	ptr = s->pcm_buffer_pointer + frames;
	if (ptr >= pcm->runtime->buffer_size)
+1 −0
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ struct amdtp_stream {
	unsigned int pcm_buffer_pointer;
	unsigned int pcm_period_pointer;
	bool pointer_flush;
	bool double_pcm_frames;

	struct snd_rawmidi_substream *midi[AMDTP_MAX_CHANNELS_FOR_MIDI * 8];

+20 −9
Original line number Diff line number Diff line
@@ -567,10 +567,14 @@ static int dice_hw_params(struct snd_pcm_substream *substream,
		return err;

	/*
	 * At rates above 96 kHz, pretend that the stream runs at half the
	 * actual sample rate with twice the number of channels; two samples
	 * of a channel are stored consecutively in the packet. Requires
	 * blocking mode and PCM buffer size should be aligned to SYT_INTERVAL.
	 * At 176.4/192.0 kHz, Dice has a quirk to transfer two PCM frames in
	 * one data block of AMDTP packet. Thus sampling transfer frequency is
	 * a half of PCM sampling frequency, i.e. PCM frames at 192.0 kHz are
	 * transferred on AMDTP packets at 96 kHz. Two successive samples of a
	 * channel are stored consecutively in the packet. This quirk is called
	 * as 'Dual Wire'.
	 * For this quirk, blocking mode is required and PCM buffer size should
	 * be aligned to SYT_INTERVAL.
	 */
	channels = params_channels(hw_params);
	if (rate_index > 4) {
@@ -579,18 +583,25 @@ static int dice_hw_params(struct snd_pcm_substream *substream,
			return err;
		}

		for (i = 0; i < channels; i++) {
			dice->stream.pcm_positions[i * 2] = i;
			dice->stream.pcm_positions[i * 2 + 1] = i + channels;
		}

		rate /= 2;
		channels *= 2;
		dice->stream.double_pcm_frames = true;
	} else {
		dice->stream.double_pcm_frames = false;
	}

	mode = rate_index_to_mode(rate_index);
	amdtp_stream_set_parameters(&dice->stream, rate, channels,
				    dice->rx_midi_ports[mode]);
	if (rate_index > 4) {
		channels /= 2;

		for (i = 0; i < channels; i++) {
			dice->stream.pcm_positions[i] = i * 2;
			dice->stream.pcm_positions[i + channels] = i * 2 + 1;
		}
	}

	amdtp_stream_set_pcm_format(&dice->stream,
				    params_format(hw_params));

Loading