1. 29 Sep, 2018 1 commit
  2. 28 May, 2018 1 commit
  3. 11 Feb, 2018 1 commit
    • Linus Torvalds's avatar
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds authored
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: 's avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: 's avatarLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  4. 27 Nov, 2017 1 commit
  5. 22 Aug, 2017 1 commit
  6. 08 Jun, 2017 1 commit
  7. 07 Jun, 2017 1 commit
    • Takashi Sakamoto's avatar
      ALSA: firewire: process packets in 'struct snd_pcm_ops.ack' callback · 875becf8
      Takashi Sakamoto authored
      In recent commit for ALSA PCM core, some arrangement is done for
      'struct snd_pcm_ops.ack' callback. This is called when appl_ptr is
      explicitly moved in intermediate buffer for PCM frames, except for
      some cases described later.
      
      For drivers in ALSA firewire stack, usage of this callback has a merit to
      reduce latency between time of PCM frame queueing and handling actual
      packets in recent isochronous cycle, because no need to wait for software
      IRQ context from isochronous context of OHCI 1394.
      
      If this works well in a case that mapped page frame is used for the
      intermediate buffer, user process should execute some commands for ioctl(2)
      to tell the number of handled PCM frames in the intermediate buffer just
      after handling them. Therefore, at present, with a combination of below
      conditions, this doesn't work as expected and user process should wait for
      the software IRQ context as usual:
       - when ALSA PCM core judges page frame mapping is available for status
         data (struct snd_pcm_mmap_status) and control data
         (struct snd_pcm_mmap_control).
       - user process handles PCM frames by loop just with 'snd_pcm_mmap_begin()'
         and 'snd_pcm_mmap_commit()'.
       - user process uses PCM hw plugin in alsa-lib to operate I/O without
         'sync_ptr_ioctl' option.
      
      Unfortunately, major use case include these three conditions.
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      875becf8
  8. 22 May, 2017 1 commit
    • Takashi Sakamoto's avatar
      ALSA: firewire: remove support for 16 bit PCM samples in playback substream · a02cb8f8
      Takashi Sakamoto authored
      In IEC 61883-6, AM824 is described as format of data block. In this
      format, one data block consists of several data channels, which is aligned
      to 32 bit. One data channel has 8 bit label field and 24 bit data field.
      PCM frames are transferred in Multi Bit Linear Audio (MBLA) data channel.
      This channel can include 16/20/24 bit PCM sample.
      
      As long as I know, models which support IEC 61883-1/6 doesn't allow to
      switch bit length of PCM sample in MBLA data channel. They always
      transmit/receive PCM frames of 24 bit length. This can be seen for the
      other models which support protocols similar to IEC 61883-1/6.
      
      On the other hand, current drivers for these protocols supports 16 bit
      length PCM sample in playback substream. In this case, PCM sample is put
      into the MBLA data channel with 8 bit padding in LSB side. Although 16
      bit PCM sample is major because it's in CD format, this doesn't represent
      device capability as is.
      
      This commit removes support for 16 bit PCM samples in playback substream.
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Acked-by: 's avatarClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      a02cb8f8
  9. 02 Mar, 2017 1 commit
  10. 12 Jan, 2017 1 commit
  11. 05 Jan, 2017 1 commit
  12. 03 Jan, 2017 1 commit
  13. 31 Aug, 2016 1 commit
    • Takashi Sakamoto's avatar
      ALSA: fireworks: accessing to user space outside spinlock · 6b1ca4bc
      Takashi Sakamoto authored
      In hwdep interface of fireworks driver, accessing to user space is in a
      critical section with disabled local interrupt. Depending on architecture,
      accessing to user space can cause page fault exception. Then local
      processor stores machine status and handles the synchronous event. A
      handler corresponding to the event can call task scheduler to wait for
      preparing pages. In a case of usage of single core processor, the state to
      disable local interrupt is worse because it don't handle usual interrupts
      from hardware.
      
      This commit fixes this bug, performing the accessing outside spinlock. This
      commit also gives up counting the number of queued response messages to
      simplify ring-buffer management.
      Reported-by: 's avatarVaishali Thakkar <vaishali.thakkar@oracle.com>
      Cc: stable@vger.kernel.org
      Fixes: 555e8a8f('ALSA: fireworks: Add command/response functionality into hwdep interface')
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      6b1ca4bc
  14. 10 May, 2016 1 commit
    • Takashi Sakamoto's avatar
      ALSA: fireworks: drop reuse of incoming packet parameter for ougoing packet parameter · eb4a378f
      Takashi Sakamoto authored
      On Fireworks board module of Echo Audio, TSB43Cx43A (IceLynx Micro, iCEM)
      is used to process payload of isochronous packets. There's an public
      document of this chip[1]. This document is for firmware programmers to
      transfer/receive AMDTP with IEC60958 data format, however in clause 2.5,
      2.6 and 2.7, we can see system design to utilize the sequence of value in
      SYT field of CIP header. In clause 2.3, we can see the specification of
      Audio Master Clock (MCLK) from iCEM.
      
      Well, this clock is actually not used for sampling clock. This can be
      confirmed when corresponding driver transfer random value as the sequence
      of SYT field. Even if in this case, the unit generates proper sound.
      
      Additionally, in unique command set for this board module, the format
      of CIP is changed; for IEC 61883-6 mode which we use, and for Windows
      Operating System. In the latter mode, the whole 32 bit field in second CIP
      header from Windows driver is used to represent counter of packets (NO-DATA
      code is still used for packets without data blocks). If the master clock
      was physically used by DSP on the board module, the Windows driver must
      have transferred correct sequence of SYT field.
      
      Furthermore, as long as seeing capacities of AudioFire2, AudioFire4,
      AudioFire8, AudioFirePre8 and AudioFire12, these models don't support
      SYT-Match clock source.
      
      Summary, we have no need to relate incoming/outgoing packets. This commit
      drops reusing SYT sequence of incoming packets for outgoing packets.
      
      [1] Using TSB43Cx43A: S/PDIF over 1394 (2003, Texus Instruments
      Incorporated)
      http://www.ti.com/analog/docs/litabsmultiplefilelist.tsp?literatureNumber=slla148&docCategoryId=1&familyId=361Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      eb4a378f
  15. 31 Mar, 2016 1 commit
  16. 28 Mar, 2016 1 commit
  17. 20 Feb, 2016 1 commit
    • Takashi Sakamoto's avatar
      ALSA: fireworks: serialize transactions to update connections at bus reset · 99d73559
      Takashi Sakamoto authored
      In IEC 61883-1, at bus-reset, applications can continue isochronous
      streaming by updating connections. In ALSA fireworks driver, the
      operation is executed in 'update' handler for bus driver.
      
      The connection resources are also changed in process contexts of PCM/MIDI
      applications. Therefore, bus-reset handling has race condition
      against connection. Current ALSA fireworks driver has a bug for the
      condition.
      
      This commit fixes the bug, by expand critical section with mutex. As a
      result, connection updating operation in bus-reset handler and connection
      changing operation in process context are serialized.
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      99d73559
  18. 14 Nov, 2015 2 commits
  19. 19 Oct, 2015 1 commit
    • Takashi Sakamoto's avatar
      ALSA: fireworks: use u32 type for be32_to_cpup() macro · 463543ac
      Takashi Sakamoto authored
      In former commit, snd_efw_command_get_phys_meters() was added to handle
      metering data. The given buffer is used to save transaction result and to
      convert between endianness. But this causes sparse warnings.
      
      fireworks_command.c:269:25: warning: incorrect type in argument 1 (different base types)
      fireworks_command.c:269:25:    expected unsigned int [usertype] *p
      fireworks_command.c:269:25:    got restricted __be32 [usertype] *
      
      This commit fixes this bug.
      
      Fixes: bde8a8f2('ALSA: fireworks: Add transaction and some commands')
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      463543ac
  20. 18 Oct, 2015 1 commit
  21. 29 Sep, 2015 9 commits
  22. 29 Aug, 2015 1 commit
  23. 05 Aug, 2015 2 commits
    • Takashi Sakamoto's avatar
      ALSA: fireworks/firewire-lib: add support for recent firmware quirk · 18f5ed36
      Takashi Sakamoto authored
      Fireworks uses TSb43cb43c(IceLynx-Micro) as its IEC 61883-1/6 interface.
      This chip includes ARM7 core, and loads and runs program. The firmware
      is stored in on-board memory and loaded every powering-on from it.
      
      Echo Audio ships several versions of firmwares for each model. These
      firmwares have each quirk and the quirk changes a sequence of packets.
      
      As long as I investigated, AudioFire2/AudioFire4/AudioFirePre8 have a
      quirk to transfer a first packet with 0x02 in its dbc field. This causes
      ALSA Fireworks driver to detect discontinuity. In this case, firmware
      version 5.7.0, 5.7.3 and 5.8.0 are used.
      
      Payload  CIP      CIP
      quadlets header1  header2
      02       00050002 90ffffff <-
      42       0005000a 90013000
      42       00050012 90014400
      42       0005001a 90015800
      02       0005001a 90ffffff
      42       00050022 90019000
      42       0005002a 9001a400
      42       00050032 9001b800
      02       00050032 90ffffff
      42       0005003a 9001d000
      42       00050042 9001e400
      42       0005004a 9001f800
      02       0005004a 90ffffff
      (AudioFire2 with firmware version 5.7.)
      
      $ dmesg
      snd-fireworks fw1.0: Detect discontinuity of CIP: 00 02
      
      These models, AudioFire8 (since Jul 2009 ) and Gibson Robot Interface
      Pack series uses the same ARM binary as their firmware. Thus, this
      quirk may be observed among them.
      
      This commit adds a new member for AMDTP structure. This member represents
      the value of dbc field in a first AMDTP packet. Drivers can set it with
      a preferred value according to model's quirk.
      Tested-by: 's avatarJohannes Oertei <johannes.oertel@uni-due.de>
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      18f5ed36
    • Takashi Sakamoto's avatar
      Revert "ALSA: fireworks: add support for AudioFire2 quirk" · c85523d1
      Takashi Sakamoto authored
      This reverts commit 9c6893e0.
      
      The fix is superseded by the next commit as a better implementation
      for supporting AudioFire2/AudioFire4/AudioFirePre8 quirks.
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      c85523d1
  24. 27 Jul, 2015 1 commit
    • Takashi Sakamoto's avatar
      ALSA: fireworks: add support for AudioFire2 quirk · 9c6893e0
      Takashi Sakamoto authored
      Fireworks uses TSb43cb43c(IceLynx-Micro) as its IEC 61883-1/6 interface.
      This chip includes ARM7 core, and loads and runs program. The firmware
      is stored in on-board memory and loaded every powering-on.
      
      Echo Audio ships several versions of firmwares for each model. These
      firmwares have each quirk and the quirk changes a sequence of packets.
      
      AudioFire2 has a quirk to transfer a first packet with non-zero in
      its dbc field. This causes ALSA Fireworks driver to detect discontinuity.
      As long as I investigated, firmware 5.7, 5.7.6 and 5.8 have this quirk.
      
      This commit adds a support for the quirk to handle AudioFire2 packets.
      For safe, CIP_SKIP_INIT_DBC_CHECK is applied to all versions of
      AudioFire2's firmwares.
      
      02 00050002 90ffffff <-
      42 0005000a 90013000
      42 00050012 90014400
      42 0005001a 90015800
      02 0005001a 90ffffff
      42 00050022 90019000
      42 0005002a 9001a400
      42 00050032 9001b800
      02 00050032 90ffffff
      42 0005003a 9001d000
      42 00050042 9001e400
      42 0005004a 9001f800
      02 0005004a 90ffffff
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      9c6893e0
  25. 10 Mar, 2015 1 commit
  26. 23 Feb, 2015 3 commits
    • Takashi Sakamoto's avatar
      ALSA: fireworks/bebob/dice/oxfw: make it possible to shutdown safely · dec84316
      Takashi Sakamoto authored
      A part of these drivers, especially BeBoB driver, are programmed to wait
      some events. Thus the drivers should not destroy any data in .remove()
      context.
      
      This commit moves some destructors from 'struct fw_driver.remove()' to
      'struct snd_card.private_free()' to shutdown safely.
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org> # 3.19+
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      dec84316
    • Takashi Sakamoto's avatar
      ALSA: fireworks/bebob/dice/oxfw: allow stream destructor after releasing runtime · d23c2cc4
      Takashi Sakamoto authored
      Currently stream destructor in each driver has a problem to be called in
      a context in which sound card object is released, because the destructors
      call amdtp_stream_pcm_abort() and touch PCM runtime data.
      
      The PCM runtime data is destroyed in application's context with
      snd_pcm_close(), on the other hand PCM substream data is destroyed after
      sound card object is released, in most case after all of ALSA character
      devices are released. When PCM runtime is destroyed and PCM substream is
      remained, amdtp_stream_pcm_abort() touches PCM runtime data and causes
      Null-pointer-dereference.
      
      This commit changes stream destructors and allows each driver to call
      it after releasing runtime.
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org> # 3.19+
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      d23c2cc4
    • Takashi Sakamoto's avatar
      ALSA: fireworks/bebob/dice/oxfw: add reference-counting for FireWire unit · 12ed7192
      Takashi Sakamoto authored
      Fireworks and Dice drivers try to touch instances of FireWire unit after
      sound card object is released, while references to the unit is decremented
      in .remove(). When unplugging during streaming, sound card object is
      released after .remove(), thus Fireworks and Dice drivers causes GPF or
      Null-pointer-dereferencing to application processes because an instance of
      FireWire unit was already released.
      
      This commit adds reference-counting for FireWire unit in drivers to allow
      them to touch an instance of FireWire unit after .remove(). In most case,
      any operations after .remove() may be failed safely.
      Signed-off-by: 's avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org> # 3.19+
      Signed-off-by: 's avatarTakashi Iwai <tiwai@suse.de>
      12ed7192
  27. 16 Jan, 2015 1 commit
  28. 07 Jan, 2015 1 commit