1. 27 May, 2020 2 commits
  2. 26 May, 2020 3 commits
  3. 19 May, 2020 1 commit
  4. 18 May, 2020 3 commits
    • Scott Bahling's avatar
      ALSA: iec1712: Initialize STDSP24 properly when using the model=staudio option · b0cb0990
      Scott Bahling authored
      The ST Audio ADCIII is an STDSP24 card plus extension box. With commit
      e8a91ae1 ("ALSA: ice1712: Add support for STAudio ADCIII") we
      enabled the ADCIII ports using the model=staudio option but forgot
      this part to ensure the STDSP24 card is initialized properly.
      
      Fixes: e8a91ae1 ("ALSA: ice1712: Add support for STAudio ADCIII")
      Signed-off-by: default avatarScott Bahling <sbahling@suse.com>
      Cc: <stable@vger.kernel.org>
      BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1048934
      Link: https://lore.kernel.org/r/20200518175728.28766-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b0cb0990
    • Christian Lachner's avatar
      ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Xtreme · d9e8fe0c
      Christian Lachner authored
      The Gigabyte X570 Aorus Xtreme motherboard with ALC1220 codec
      requires a similar workaround for Clevo laptops to enforce the
      DAC/mixer connection path. Set up a quirk entry for that.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205275Signed-off-by: default avatarChristian Lachner <gladiac@gmail.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20200518053844.42743-2-gladiac@gmail.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d9e8fe0c
    • Brent Lu's avatar
      ALSA: pcm: fix incorrect hw_base increase · e7513c57
      Brent Lu authored
      There is a corner case that ALSA keeps increasing the hw_ptr but DMA
      already stop working/updating the position for a long time.
      
      In following log we can see the position returned from DMA driver does
      not move at all but the hw_ptr got increased at some point of time so
      snd_pcm_avail() will return a large number which seems to be a buffer
      underrun event from user space program point of view. The program
      thinks there is space in the buffer and fill more data.
      
      [  418.510086] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 4096 avail 12368
      [  418.510149] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 6910 avail 9554
      ...
      [  418.681052] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 15102 avail 1362
      [  418.681130] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 16464 avail 0
      [  418.726515] sound pcmC0D5p: pos 96 hw_ptr 16464 appl_ptr 16464 avail 16368
      
      This is because the hw_base will be increased by runtime->buffer_size
      frames unconditionally if the hw_ptr is not updated for over half of
      buffer time. As the hw_base increases, so does the hw_ptr increased
      by the same number.
      
      The avail value returned from snd_pcm_avail() could exceed the limit
      (buffer_size) easily becase the hw_ptr itself got increased by same
      buffer_size samples when the corner case happens. In following log,
      the buffer_size is 16368 samples but the avail is 21810 samples so
      CRAS server complains about it.
      
      [  418.851755] sound pcmC0D5p: pos 96 hw_ptr 16464 appl_ptr 27390 avail 5442
      [  418.926491] sound pcmC0D5p: pos 96 hw_ptr 32832 appl_ptr 27390 avail 21810
      
      cras_server[1907]: pcm_avail returned frames larger than buf_size:
      sof-glkda7219max: :0,5: 21810 > 16368
      
      By updating runtime->hw_ptr_jiffies each time the HWSYNC is called,
      the hw_base will keep the same when buffer stall happens at long as
      the interval between each HWSYNC call is shorter than half of buffer
      time.
      
      Following is a log captured by a patched kernel. The hw_base/hw_ptr
      value is fixed in this corner case and user space program should be
      aware of the buffer stall and handle it.
      
      [  293.525543] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 4096 avail 12368
      [  293.525606] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 6880 avail 9584
      [  293.525975] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 10976 avail 5488
      [  293.611178] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 15072 avail 1392
      [  293.696429] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 16464 avail 0
      ...
      [  381.139517] sound pcmC0D5p: pos 96 hw_ptr 96 appl_ptr 16464 avail 0
      Signed-off-by: default avatarBrent Lu <brent.lu@intel.com>
      Reviewed-by: default avatarJaroslav Kysela <perex@perex.cz>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/1589776238-23877-1-git-send-email-brent.lu@intel.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e7513c57
  5. 14 May, 2020 1 commit
  6. 12 May, 2020 4 commits
  7. 10 May, 2020 1 commit
  8. 07 May, 2020 1 commit
  9. 04 May, 2020 1 commit
  10. 03 May, 2020 3 commits
  11. 01 May, 2020 1 commit
  12. 30 Apr, 2020 2 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID · 547d2c9c
      Takashi Iwai authored
      The USB vendor ID of NuPrime DAC-10 is not 16b0 but 16d0.
      
      Fixes: f656891c ("ALSA: usb-audio: add more quirks for DSD interfaces")
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20200430124755.15940-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      547d2c9c
    • Arnd Bergmann's avatar
      ALSA: opti9xx: shut up gcc-10 range warning · 5ce00760
      Arnd Bergmann authored
      gcc-10 points out a few instances of suspicious integer arithmetic
      leading to value truncation:
      
      sound/isa/opti9xx/opti92x-ad1848.c: In function 'snd_opti9xx_configure':
      sound/isa/opti9xx/opti92x-ad1848.c:322:43: error: overflow in conversion from 'int' to 'unsigned char' changes value from '(int)snd_opti9xx_read(chip, 3) & -256 | 240' to '240' [-Werror=overflow]
        322 |   (snd_opti9xx_read(chip, reg) & ~(mask)) | ((value) & (mask)))
            |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      sound/isa/opti9xx/opti92x-ad1848.c:351:3: note: in expansion of macro 'snd_opti9xx_write_mask'
        351 |   snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(3), 0xf0, 0xff);
            |   ^~~~~~~~~~~~~~~~~~~~~~
      sound/isa/opti9xx/miro.c: In function 'snd_miro_configure':
      sound/isa/opti9xx/miro.c:873:40: error: overflow in conversion from 'int' to 'unsigned char' changes value from '(int)snd_miro_read(chip, 3) & -256 | 240' to '240' [-Werror=overflow]
        873 |   (snd_miro_read(chip, reg) & ~(mask)) | ((value) & (mask)))
            |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      sound/isa/opti9xx/miro.c:1010:3: note: in expansion of macro 'snd_miro_write_mask'
       1010 |   snd_miro_write_mask(chip, OPTi9XX_MC_REG(3), 0xf0, 0xff);
            |   ^~~~~~~~~~~~~~~~~~~
      
      These are all harmless here as only the low 8 bit are passed down
      anyway. Change the macros to inline functions to make the code
      more readable and also avoid the warning.
      
      Strictly speaking those functions also need locking to make the
      read/write pair atomic, but it seems unlikely that anyone would
      still run into that issue.
      
      Fixes: 1841f613 ("[ALSA] Add snd-miro driver")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20200429190216.85919-1-arnd@arndb.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5ce00760
  13. 29 Apr, 2020 1 commit
  14. 28 Apr, 2020 1 commit
  15. 27 Apr, 2020 1 commit
  16. 26 Apr, 2020 1 commit
  17. 24 Apr, 2020 4 commits
  18. 23 Apr, 2020 3 commits
  19. 22 Apr, 2020 1 commit
    • Takashi Iwai's avatar
      ALSA: usb-audio: Add connector notifier delegation · fef66ae7
      Takashi Iwai authored
      It turned out that ALC1220-VB USB-audio device gives the interrupt
      event to some PCM terminals while those don't allow the connector
      state request but only the actual I/O terminals return the request.
      The recent commit 7dc3c5a0 ("ALSA: usb-audio: Don't create jack
      controls for PCM terminals") excluded those phantom terminals, so
      those events are ignored, too.
      
      My first thought was that this could be easily deduced from the
      associated terminals, but some of them have even no associate terminal
      ID, hence it's not too trivial to figure out.
      
      Since the number of such terminals are small and limited, this patch
      implements another quirk table for the simple mapping of the
      connectors.  It's not really scalable, but let's hope that there will
      be not many such funky devices in future.
      
      Fixes: 7dc3c5a0 ("ALSA: usb-audio: Don't create jack controls for PCM terminals")
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206873
      Link: https://lore.kernel.org/r/20200422113320.26664-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      fef66ae7
  20. 21 Apr, 2020 5 commits