Skip to content
  1. Feb 07, 2019
  2. Feb 05, 2019
  3. Feb 04, 2019
  4. Feb 02, 2019
  5. Jan 31, 2019
  6. Jan 30, 2019
    • Takashi Iwai's avatar
      ALSA: hda - Use standard device registration for beep · 45571bb8
      Takashi Iwai authored
      
      
      Currently the registration and free of beep input device was done
      manually from the register and the disconnect callbacks of the
      assigned codec object.  This seems working in most cases, but this may
      be a cause of some races at probe.  Moreover, due to these manual
      calls, the total code became unnecessarily lengthy.
      
      This patch rewrites the beep registration code to follow the standard
      sound device object style.  This allows us reducing the code, in
      addition to avoiding the nested device registration calls.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      45571bb8
    • Takashi Iwai's avatar
      Merge branch 'topic/hda-pm-state' into for-next · 9a19c902
      Takashi Iwai authored
      
      
      Pull HD-audio PM fixes.  They are applied on top of the latest 5.0
      development branch.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9a19c902
    • Takashi Iwai's avatar
      ALSA: hda/realtek - Apply ALC294 hp init also for S4 resume · f6ef4e0e
      Takashi Iwai authored
      
      
      The init sequence for ALC294 headphone stuff is needed not only for
      the boot up time but also for the resume from hibernation, where the
      device is switched from the boot kernel without sound driver to the
      suspended image.  Since we record the PM event in the device
      power_state field, we can now recognize the call pattern and apply the
      sequence conditionally.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f6ef4e0e
    • Takashi Iwai's avatar
      ALSA: hda - Record the current power state before suspend/resume calls · 98081ca6
      Takashi Iwai authored
      
      
      Currently we deal with single codec and suspend codec callbacks for
      all S3, S4 and runtime PM handling.  But it turned out that we want
      distinguish the call patterns sometimes, e.g. for applying some init
      sequence only at probing and restoring from hibernate.
      
      This patch slightly modifies the common PM callbacks for HD-audio
      codec and stores the currently processed PM event in power_state of
      the codec's device.power field, which is currently unused.  The codec
      callback can take a look at this event value and judges which purpose
      it's being called.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      98081ca6
  7. Jan 29, 2019
    • Kailang Yang's avatar
      ALSA: hda/realtek - Fixed hp_pin no value · 693abe11
      Kailang Yang authored
      Fix hp_pin always no value.
      
      [More notes on the changes:
      
       The hp_pin value that is referred in alc294_hp_init() is always zero
       at the moment the function gets called, hence this is actually
       useless as in the current code.
      
       And, this kind of init sequence should be called from the codec init
       callback, instead of the parser function.  So, the first fix in this
       patch to move the call call into its own init_hook.
      
       OTOH, this function is needed to be called only once after the boot,
       and it'd take too long for invoking at each resume (where the init
       callback gets called).  So we add a new flag and invoke this only
       once as an additional fix.
      
       The one case is still not covered, though: S4 resume.  But this
       change itself won't lead to any regression in that regard, so we
       leave S4 issue as is for now and fix it later.  -- tiwai ]
      
      Fixes: bde1a745
      
       ("ALSA: hda/realtek - Fixed headphone issue for ALC700")
      Signed-off-by: default avatarKailang Yang <kailang@realtek.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      693abe11
    • Jussi Laako's avatar
      ALSA: usb-audio: Cleanup DSD whitelist · 202e69e6
      Jussi Laako authored
      
      
      XMOS/Thesycon family of USB Audio Class firmware flags DSD altsetting
      separate from the PCM ones. Thus the DSD altsetting can be auto-detected
      based on the flag and doesn't need maintaining specific altsetting
      whitelist.
      
      In addition, static VID:PID-to-altsetting whitelisting causes problems
      when firmware update changes the altsetting, or same VID:PID is reused
      for another device that has different kind of firmware.
      
      This patch removes existing explicit whitelist mappings for XMOS VID
      (0x20b1) and Thesycon VID (0x152a).
      
      Also corrects placement of Hegel HD12 and NuPrime DAC-10 to keep list
      sorted based on VID.
      
      Signed-off-by: default avatarJussi Laako <jussi@sonarnerd.net>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      202e69e6
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · 286406c2
      Takashi Iwai authored
      
      
      Pull 5.0 branch for further development of USB-audio quirks
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      286406c2
  8. Jan 28, 2019
    • Takashi Sakamoto's avatar
      ALSA: dice: add support for Solid State Logic Duende Classic/Mini · b2e9e1c8
      Takashi Sakamoto authored
      
      
      Duende Classic was produced by Solid State Logic in 2006, as a
      first model of Duende DSP series. The following model, Duende Mini
      was produced in 2008. They are designed to receive isochronous
      packets for PCM frames via IEEE 1394 bus, perform signal processing by
      downloaded program, then transfer isochronous packets for converted
      PCM frames.
      
      These two models includes the same embedded board, consists of several
      ICs below:
       - Texus Instruments Inc, TSB41AB3 for physical layer of IEEE 1394 bus
       - WaveFront semiconductor, DICE II STD ASIC for link/protocol layer
       - Altera MAX 3000A CPLD for programs
       - Analog devices, SHARC ADSP-21363 for signal processing (4 chips)
      
      This commit adds support for the two models to ALSA dice driver. Like
      support for the other devices, packet streaming is just available.
      Userspace applications should be developed if full features became
      available; e.g. program uploader and parameter controller.
      
      $ ./hinawa-config-rom-printer /dev/fw1
      { 'bus-info': { 'adj': False,
                      'bmc': False,
                      'chip_ID': 349771402425,
                      'cmc': True,
                      'cyc_clk_acc': 255,
                      'generation': 1,
                      'imc': True,
                      'isc': True,
                      'link_spd': 2,
                      'max_ROM': 1,
                      'max_rec': 512,
                      'name': '1394',
                      'node_vendor_ID': 20674,
                      'pmc': False},
        'root-directory': [ ['VENDOR', 20674],
                            ['DESCRIPTOR', 'Solid State Logic'],
                            ['MODEL', 112],
                            ['DESCRIPTOR', 'Duende board'],
                            [ 'NODE_CAPABILITIES',
                              { 'addressing': {'64': True, 'fix': True, 'prv': True},
                                'misc': {'int': False, 'ms': False, 'spt': True},
                                'state': { 'atn': False,
                                           'ded': False,
                                           'drq': True,
                                           'elo': False,
                                           'init': False,
                                           'lst': True,
                                           'off': False},
                                'testing': {'bas': False, 'ext': False}}],
                            [ 'UNIT',
                              [ ['SPECIFIER_ID', 20674],
                                ['VERSION', 1],
                                ['MODEL', 112],
                                ['DESCRIPTOR', 'Duende board']]]]}
      
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b2e9e1c8
  9. Jan 26, 2019
    • Takashi Iwai's avatar
      ALSA: pcm: Fix tight loop of OSS capture stream · e190161f
      Takashi Iwai authored
      
      
      When the trigger=off is passed for a PCM OSS stream, it sets the
      start_threshold of the given substream to the boundary size, so that
      it won't be automatically started.  This can be problematic for a
      capture stream, unfortunately, as detected by syzkaller.  The scenario
      is like the following:
      
      - In __snd_pcm_lib_xfer() that is invoked from snd_pcm_oss_read()
        loop, we have a check whether the stream was already started or the
        stream can be auto-started.
      - The function at this check returns 0 with trigger=off since we
        explicitly disable the auto-start.
      - The loop continues and repeats calling __snd_pcm_lib_xfer() tightly,
        which may lead to an RCU stall.
      
      This patch fixes the bug by simply allowing the wait for non-started
      stream in the case of OSS capture.  For native usages, it's supposed
      to be done by the caller side (which is user-space), hence it returns
      zero like before.
      
      (In theory, __snd_pcm_lib_xfer() could wait even for the native API
       usage cases, too; but I'd like to stay in a safer side for not
       breaking the existing stuff for now.)
      
      Reported-by: default avatar <syzbot+fbe0496f92a0ce7b786c@syzkaller.appspotmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e190161f
    • Olek Poplavsky's avatar
      ALSA: usb-audio: Add Opus #3 to quirks for native DSD support · 9e696664
      Olek Poplavsky authored
      
      
      This patch adds quirk VID/PID IDs for the Opus #3 DAP (made by 'The Bit')
      in order to enable Native DSD support.
      
      [ NOTE: this could be handled in the generic way with fp->dvd_raw if
        we add 0x10cb to the vendor whitelist, but since 0x10cb shows a
        different vendor name (Erantech), put to the individual entry at
        this time -- tiwai ]
      
      Signed-off-by: default avatarOlek Poplavsky <woodenbits@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9e696664
    • Takashi Iwai's avatar
      ALSA: pcm: Use the common error path in __snd_pcm_lib_xfer() · 315d9f1b
      Takashi Iwai authored
      
      
      An open-coded error path in __snd_pcm_lib_xfer() can be replaced with
      the simple goto to the common error path.  This also makes the error
      handling more consistent, i.e. when some samples have been already
      processed, return that size instead of the error code.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      315d9f1b
  10. Jan 25, 2019