]> Git Repo - J-linux.git/commitdiff
Merge tag 'sound-fix-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
authorLinus Torvalds <[email protected]>
Sat, 6 May 2023 15:07:11 +0000 (08:07 -0700)
committerLinus Torvalds <[email protected]>
Sat, 6 May 2023 15:07:11 +0000 (08:07 -0700)
Pull sound fixes from Takashi Iwai:
 "A collection of small fixes for rc1.

  The only (LOC-wise) dominant change was ASoC Qualcomm fix, but most of
  it was merely a code shuffling.

  Another significant change here is for ALSA PCM core; it received a
  revert and a series of fixes for PCM auto-silencing where it caused a
  regression in the previous PR for rc1.

  Others are all small: ASoC Intel fixes, various quirks for ASoC AMD,
  HD-audio and USB-audio, the continued legacy emu10k1 code cleanup, and
  some documentation updates"

* tag 'sound-fix-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits)
  ALSA: pcm: use exit controlled loop in snd_pcm_playback_silence()
  ALSA: pcm: simplify top-up mode init in snd_pcm_playback_silence()
  ALSA: pcm: playback silence - move silence variable updates to separate function
  ALSA: pcm: playback silence - remove extra code
  ALSA: pcm: fix playback silence - correct incremental silencing
  ALSA: pcm: fix playback silence - use the actual new_hw_ptr for the threshold mode
  ALSA: pcm: Revert "ALSA: pcm: rewrite snd_pcm_playback_silence()"
  ALSA: hda/realtek: Fix mute and micmute LEDs for an HP laptop
  ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`
  ALSA: usb-audio: Add quirk for Pioneer DDJ-800
  ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LED
  ASoC: Intel: soc-acpi-cht: Add quirk for Nextbook Ares 8A tablet
  ASoC: amd: yc: Add Asus VivoBook Pro 14 OLED M6400RC to the quirks list for acp6x
  ASoC: codecs: wcd938x: fix accessing regmap on unattached devices
  ALSA: docs: Fix code block indentation in ALSA driver example
  ALSA: docs: Extend module parameters description
  ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41
  ALSA: emu10k1: use more existing defines instead of open-coded numbers
  ASoC: amd: yc: Add ASUS M3402RA into DMI table
  ALSA: hda/realtek: Add quirk for ThinkPad P1 Gen 6
  ...

1  2 
sound/core/pcm_native.c

diff --combined sound/core/pcm_native.c
index 91c87cdb786e81c9f91ded5b0e61af41c950aba8,94185267a7b9212e07b5e7aaf21434a179523b5b..39a65d1415ab1d311754d04af48002779d1adab5
@@@ -958,7 -958,7 +958,7 @@@ static int snd_pcm_sw_params(struct snd
        if (snd_pcm_running(substream)) {
                if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
                    runtime->silence_size > 0)
-                       snd_pcm_playback_silence(substream);
+                       snd_pcm_playback_silence(substream, ULONG_MAX);
                err = snd_pcm_update_state(substream, runtime);
        }
        snd_pcm_stream_unlock_irq(substream);
@@@ -1455,7 -1455,7 +1455,7 @@@ static void snd_pcm_post_start(struct s
        __snd_pcm_set_state(runtime, state);
        if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
            runtime->silence_size > 0)
-               snd_pcm_playback_silence(substream);
+               snd_pcm_playback_silence(substream, ULONG_MAX);
        snd_pcm_timer_notify(substream, SNDRV_TIMER_EVENT_MSTART);
  }
  
@@@ -1916,7 -1916,7 +1916,7 @@@ static void snd_pcm_post_reset(struct s
        runtime->control->appl_ptr = runtime->status->hw_ptr;
        if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK &&
            runtime->silence_size > 0)
-               snd_pcm_playback_silence(substream);
+               snd_pcm_playback_silence(substream, ULONG_MAX);
        snd_pcm_stream_unlock_irq(substream);
  }
  
@@@ -3521,7 -3521,6 +3521,7 @@@ static ssize_t snd_pcm_readv(struct kio
        unsigned long i;
        void __user **bufs;
        snd_pcm_uframes_t frames;
 +      const struct iovec *iov = iter_iov(to);
  
        pcm_file = iocb->ki_filp->private_data;
        substream = pcm_file->substream;
        if (runtime->state == SNDRV_PCM_STATE_OPEN ||
            runtime->state == SNDRV_PCM_STATE_DISCONNECTED)
                return -EBADFD;
 -      if (!iter_is_iovec(to))
 +      if (!to->user_backed)
                return -EINVAL;
        if (to->nr_segs > 1024 || to->nr_segs != runtime->channels)
                return -EINVAL;
 -      if (!frame_aligned(runtime, to->iov->iov_len))
 +      if (!frame_aligned(runtime, iov->iov_len))
                return -EINVAL;
 -      frames = bytes_to_samples(runtime, to->iov->iov_len);
 +      frames = bytes_to_samples(runtime, iov->iov_len);
        bufs = kmalloc_array(to->nr_segs, sizeof(void *), GFP_KERNEL);
        if (bufs == NULL)
                return -ENOMEM;
 -      for (i = 0; i < to->nr_segs; ++i)
 -              bufs[i] = to->iov[i].iov_base;
 +      for (i = 0; i < to->nr_segs; ++i) {
 +              bufs[i] = iov->iov_base;
 +              iov++;
 +      }
        result = snd_pcm_lib_readv(substream, bufs, frames);
        if (result > 0)
                result = frames_to_bytes(runtime, result);
@@@ -3561,7 -3558,6 +3561,7 @@@ static ssize_t snd_pcm_writev(struct ki
        unsigned long i;
        void __user **bufs;
        snd_pcm_uframes_t frames;
 +      const struct iovec *iov = iter_iov(from);
  
        pcm_file = iocb->ki_filp->private_data;
        substream = pcm_file->substream;
        if (runtime->state == SNDRV_PCM_STATE_OPEN ||
            runtime->state == SNDRV_PCM_STATE_DISCONNECTED)
                return -EBADFD;
 -      if (!iter_is_iovec(from))
 +      if (!from->user_backed)
                return -EINVAL;
        if (from->nr_segs > 128 || from->nr_segs != runtime->channels ||
 -          !frame_aligned(runtime, from->iov->iov_len))
 +          !frame_aligned(runtime, iov->iov_len))
                return -EINVAL;
 -      frames = bytes_to_samples(runtime, from->iov->iov_len);
 +      frames = bytes_to_samples(runtime, iov->iov_len);
        bufs = kmalloc_array(from->nr_segs, sizeof(void *), GFP_KERNEL);
        if (bufs == NULL)
                return -ENOMEM;
 -      for (i = 0; i < from->nr_segs; ++i)
 -              bufs[i] = from->iov[i].iov_base;
 +      for (i = 0; i < from->nr_segs; ++i) {
 +              bufs[i] = iov->iov_base;
 +              iov++;
 +      }
        result = snd_pcm_lib_writev(substream, bufs, frames);
        if (result > 0)
                result = frames_to_bytes(runtime, result);
This page took 0.083313 seconds and 4 git commands to generate.