1. 03 Jan, 2017 1 commit
  2. 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: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      eb4a378f
  3. 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: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      99d73559
  4. 14 Nov, 2015 2 commits
  5. 29 Sep, 2015 4 commits
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: rename parameter setting function for AM824 with FDF field · 51c29fd2
      Takashi Sakamoto authored
      The value of FDF field in CIP header is protocol-dependent. Thus, it's
      better to allow data block processing layer to decide the value in any
      timing.
      
      In AM824 data format, the value of FDF field in CIP header indicates
      N-flag and Nominal Sampling Frequency Code (sfc). The N-flag is for
      switching 'Clock-based rate control mode' and 'Command-based rate control
      mode'. In our implementation, 'Clock-based rate control mode' is just
      supported. Therefore, When sampling transfer frequency is decided, then
      the FDF can be set.
      
      This commit replaces 'amdtp_stream_set_parameters' with
      'amdtp_am824_set_parameters' to set the FDF. This is the same timing
      to decide the ration between the number of data blocks and the number of
      PCM frames.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      51c29fd2
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: add data block processing layer for AM824 format · 5955815e
      Takashi Sakamoto authored
      This commit adds data block processing layer for AM824 format. The new
      layer initializes streaming layer with its value for fmt field.
      
      Currently, most implementation of data block processing still remains
      streaming layer. In later commits, these codes will be moved to the layer.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5955815e
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: add an argument for Dice's dual wire mode · 27ec83b5
      Takashi Sakamoto authored
      In IEC 61883-6, one data block represents one event. In ALSA, the event is
      one PCM frame. Therefore, when processing one data block, current
      implementation counts one PCM frame.
      
      On the other hand, Dice platform has a quirk called as 'dual wire' at
      higher sampling rate. In detail, see comment of commit 6eb6c81e
      ("ALSA: dice: Split stream functionality into a file").
      
      Currently, to handle this quirk, AMDTP stream structure has a
      'double_pcm_frames' member. When this is enabled, two PCM frames are
      counted. Each driver set this flag by accessing the structure member
      directly.
      
      In future commit, some members related to AM824 data block will be moved
      to specific structure, to separate packet streaming layer and data block
      processing layer. The access will be limited by opaque pointer.
      
      For this reason, this commit adds an argument into
      amdtp_stream_set_parameter() to set the flag.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      27ec83b5
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: return error code when amdtp_stream_set_parameters() detects error · 547e631c
      Takashi Sakamoto authored
      Currently, amdtp_stream_set_parameters() returns no error even if wrong
      arguments are given. This is not good for streaming layer because drivers
      can continue processing ignoring capability of streaming layer.
      
      This commit changes this function to return error code.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      547e631c
  6. 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 TSB43CB43(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: default avatarJohannes Oertei <johannes.oertel@uni-due.de>
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default 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: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      c85523d1
  7. 27 Jul, 2015 1 commit
    • Takashi Sakamoto's avatar
      ALSA: fireworks: add support for AudioFire2 quirk · 9c6893e0
      Takashi Sakamoto authored
      Fireworks uses TSB43CB43(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: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9c6893e0
  8. 23 Feb, 2015 2 commits
  9. 16 Jan, 2015 1 commit
  10. 04 Jun, 2014 1 commit
  11. 27 May, 2014 1 commit
  12. 26 May, 2014 9 commits