1. 29 9月, 2015 4 次提交
    • T
      ALSA: firewire-lib: add helper functions to set positions of data channels · f65be911
      Takashi Sakamoto 提交于
      In IEC 61883-6, several types of data are available in AM824 format. The
      data is transferred in each data channel. The position of data channel in
      data block differs depending on model.
      
      Current implementation has an array to map the index of data channel in an
      data block to the position of actual data channel. The implementation
      allows each driver to access the mapping directly.
      
      In later commit, the mapping is in specific structure pushed into an
      opaque pointer. Helper functions are required.
      
      This commit adds the helper functions for this purpose. In IEC 61883-6,
      AM824 format supports many data types, while this specification easily
      causes over-engineering. Current AM824 implementation is allowed to handle
      two types of data, Multi Bit Linear Audio data (=PCM samples) and MIDI
      conformant data (=MIDI messages).
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f65be911
    • T
      ALSA: firewire-lib: move PCM substream constraint to AM824 layer · bc8500da
      Takashi Sakamoto 提交于
      In IEC 61883-6, PCM frames are transferred in Multi Bit Linear Audio data
      channel. The data channel transfers 16/20/24 bit PCM samples. Thus, PCM
      substream has a constrain about it.
      
      This commit moves codes related to the constraint from packet streaming
      layer to AM824 data block processing layer.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bc8500da
    • T
      ALSA: firewire-lib: rename parameter setting function for AM824 with FDF field · 51c29fd2
      Takashi Sakamoto 提交于
      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: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      51c29fd2
    • T
      ALSA: firewire-lib: add data block processing layer for AM824 format · 5955815e
      Takashi Sakamoto 提交于
      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: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5955815e