1. 23 5月, 2015 1 次提交
    • T
      ALSA: firewire-lib: add buffer-over-run protection at receiving more data blocks than expected · a2064710
      Takashi Sakamoto 提交于
      In IEC 61883-6, the number of data blocks in a packet is limited up to
      the value of SYT_INTERVAL. Current implementation is compliant to the
      limitation, while it can cause buffer-over-run when the value of dbs
      field in received packet is illegally large.
      
      This commit adds a validator to detect such illegal packets to prevent
      the buffer-over-run. Actually, the buffer is aligned to the size of memory
       page, thus this issue hardly causes system errors due to the room to page
      alignment, as long as a few packets includes such jumbo payload; i.e.
      a packet to several received packets.
      
      Here, Behringer F-Control Audio 202 (based on OXFW 960) has a quirk to
      postpone transferring isochronous packet till finish handling any
      asynchronous packets. In this case, this model is lazy, transfers no
      packets according to several cycle-start packets. After finishing, this
      model pushes required data in next isochronous packet. As a result, the
      packet include more data blocks than IEC 61883-6 defines.
      
      To continue to support this model, this commit adds a new flag to extend
      the length of calculated payload. This flag allows the size of payload
      5 times as large as IEC 61883-6 defines. As a result, packets from this
      model passed the validator successfully.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a2064710
  2. 10 3月, 2015 1 次提交
  3. 23 2月, 2015 2 次提交
  4. 17 1月, 2015 2 次提交
  5. 10 11月, 2014 1 次提交
    • T
      ALSA: pcm: Add snd_pcm_stop_xrun() helper · 1fb8510c
      Takashi Iwai 提交于
      Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
      lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
      existing open codes with this helper.
      
      The function checks the PCM running state to prevent setting the wrong
      state, too, for more safety.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1fb8510c
  6. 29 8月, 2014 1 次提交
    • T
      ALSA: firewire-lib/dice: add arrangements of PCM pointer and interrupts for Dice quirk · 65845f29
      Takashi Sakamoto 提交于
      In IEC 61883-6, one data block transfers one event. In ALSA, the event equals one PCM frame,
      hence one data block transfers one PCM frame. But Dice has a quirk at higher sampling rate
      (176.4/192.0 kHz) that one data block transfers two PCM frames.
      
      Commit 10550bea ("ALSA: dice/firewire-lib: Keep dualwire mode but obsolete
      CIP_HI_DUALWIRE") moved some codes related to this quirk into Dice driver. But the commit
      forgot to add arrangements for PCM period interrupts and DMA pointer updates. As a result, Dice
      driver cannot work correctly at higher sampling rate.
      
      This commit adds 'double_pcm_frames' parameter to amdtp structure for this quirk. When this
      parameter is set, PCM period interrupts and DMA pointer updates occur at double speed than in
      IEC 61883-6.
      Reported-by: NDaniel Robbins <drobbins@funtoo.org>
      Fixes: 10550bea ("ALSA: dice/firewire-lib: Keep dualwire mode but obsolete CIP_HI_DUALWIRE")
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org> # 3.16
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      65845f29
  7. 02 6月, 2014 1 次提交
    • T
      ALSA: firewire-lib: Use IEC 61883-6 compliant labels for Raw Audio data · a6975f2a
      Takashi Sakamoto 提交于
      According to AM824 in IEC 61883-6:2002, 2 bits in LSB of label for Raw Audio
      data means Valid Length Code (VBL). Ths value is:
      - b00 for 24 bits sample (label is 0x40)
      - b01 for 20 bits sample (label is 0x41)
      - b10 for 16 bits sample (label is 0x42)
      
      But current firewire-lib apply 24 bits label for both of 16/24 bits samples.
      
      As long as developers investigate BeBoB/Fireworks/OXFW/Dice, all of them
      have a behaviour to ignore the label. They can generate correct sound even
      if firewire-lib gives wrong label (i.e. 0xff). On BeBoB, this is not only
      for Raw Audio data channel, but also for IEC 60958 Conformant data channel.
      
      So there is little possibility of regression.
      Acked-by: NClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a6975f2a
  8. 27 5月, 2014 1 次提交
  9. 26 5月, 2014 21 次提交
  10. 22 11月, 2013 1 次提交
    • T
      ALSA: firewire-lib: fix wrong value for FDF field as an empty packet · 82755abf
      Takashi Sakamoto 提交于
      This commit fix out of specification about the value of FDF field in out packet
      with 'no data'. This affects blocking mode.
      
      According to IEC 61883-6, there is two way to generate AMDTP packets include no
      data in blocking mode.
      
      Way 1. an empty packet defined in IEC 61883-1
       - Size of packet is 2 quadlets.
       - The value of FDF is sfc.
       - The packet includes only CIP headers
      
      Way 2. a special non-empty packet defined in IEC 61883-6
       - Size of packet is following to blocking mode
       - The value of FDF is 0xff. This value is 'NO-DATA'. This means 'The receiver'
         must ignore all the data in a CIP with this FDF code'.
       - The packet includes dummy data.
      
      But current implementation is a combination of them.
       - Size of packet is 2 (way 1)
       - FDF = 0xff (way 2)
      This causes BeBoB chipset cannot sound.
      
      This patch applies Way 1.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: Acked-by: Clemens Ladisch <clemens@ladisch.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      82755abf
  11. 21 10月, 2013 4 次提交
  12. 26 9月, 2013 1 次提交
  13. 14 5月, 2012 3 次提交