1. 07 2月, 2017 3 次提交
    • T
      ALSA: x86: Fix driver name string overflow · 873ab035
      Takashi Iwai 提交于
      The driver sets card->driver name string over its size (16 bytes).
      Shorten the name string to fit with it.
      
      Also, set more verbose string to card->shortname and ->longname.
      This doesn't have to be identical with card->driver at all.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      873ab035
    • T
      ALSA: x86: Rename had_enable_audio_int() to had_ack_irqs() · 075a1d46
      Takashi Iwai 提交于
      had_enable_audio_int() came from the LPE audio shell set_caps
      callback with ENABLE_INT and DISABLE_INT caps.  I interpreted as these
      correspond to enabling / disabling the audio interface, but the actual
      implementation is only to clear (send ACK) to both BUFFER_DONE and
      BUFFER_UNDERRUN interrupts unconditionally.  And, there is no
      counterpart, DISABLE_INT, code at all.
      
      For avoiding the further misunderstanding, rename the function to the
      more fitting one, had_ack_irqs(), and drop the calls with enable=false
      in allover places.  There is no functional changes at all.
      
      After this patch, there is only one caller at the PCM trigger start.
      Then it's doubtful whether this call is still really needed or not; I
      bet it not, but let's stay in the safer side for now and keep it as
      was.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      075a1d46
    • T
      ALSA: x86: Drop suspicious U24 format support · 3e21a76c
      Takashi Iwai 提交于
      U24 format is declared to be supported by the driver, but this looks
      really doubtful, as there is no corresponding code.  Better to drop
      it.  This format is very uncommon, so there should be practically no
      impact by this change.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3e21a76c
  2. 06 2月, 2017 1 次提交
    • T
      ALSA: x86: Refactor PCM process engine · e1b239f3
      Takashi Iwai 提交于
      This is again a big rewrite of the driver; now it touches the code to
      process PCM stream transfers.
      
      The most fundamental change is that the driver may support more than
      four periods.  Instead of keeping the same index between both the ring
      buffer (with the fixed four buffer descriptors) and the PCM buffer
      periods, we keep difference indices for both (bd_head and pcm_head
      fields).  In addition, when the periods are more than four, we need to
      track both head and next indices.  That is, we now have three indices:
      bd_head, pcm_head and pcm_filled.
      
      Also, the driver works better for periods < 4, too: the remaining BDs
      out of four are marked as invalid, so that the hardware skips those
      BDs in its loop.
      
      By this flexibility, we can use even ALSA-lib dmix plugin, which
      requires 16 periods as default.
      
      The buffer size could be up to 20bit, so the max buffer size was
      increased accordingly.  However, the buffer pre-allocation is kept as
      the old value (600kB) as default.  The reason is the limited number of
      BDs: since it doesn't suffice for the useful SG page management that
      can fit with the usual page allocator like some other drivers, we have
      to still allocate continuous pages, hence we shouldn't take too big
      memories there.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e1b239f3
  3. 05 2月, 2017 4 次提交
  4. 04 2月, 2017 32 次提交