1. 29 Sep, 2015 10 commits
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: move PCM substream constraint to AM824 layer · bc8500da
      Takashi Sakamoto authored
      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: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      bc8500da
    • 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: rename 'amdtp' to 'amdtp-stream' to prepare for functional separation · d67c46b9
      Takashi Sakamoto authored
      In later commit, data block processing layer will be newly added. This
      layer will be named as 'amdtp-am824'.
      
      This commit renames current amdtp file to amdtp-stream, to distinguish it
      from the new layer.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d67c46b9
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: add support arbitrary value for fmt/fdf fields in CIP header · 414ba022
      Takashi Sakamoto authored
      Some vendor specific protocol uses its own value for fmt/fdf fields in
      CIP header.
      
      This commit support to set arbitrary values for the fields.
      
      In IEC 61883-6, NO-DATA code is defined for FDF field. A packet with this
      code includes no data even if it includes some data blocks. This commit
      still leaves a condition to handle this special packet.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      414ba022
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: add helper functions as interfaces between packet... · 20e44577
      Takashi Sakamoto authored
      ALSA: firewire-lib: add helper functions as interfaces between packet streaming layer and data block processing layer
      
      ALSA PCM framework uses PCM buffer with a concept of 'period' to
      synchronize userspace operations to hardware for nearly-realtime
      processing. Each driver implements snd_pcm_period_elapsed() to tell across
      of the period boundary to ALSA PCM middleware. To call the function, some
      drivers utilize hardware interrupt handlers, the others count handled PCM
      frames.
      
      Drivers for sound units on IEEE 1394 bus are the latter. They use two
      buffers; PCM buffer and DMA buffer for IEEE 1394 isochronous packet. PCM
      frames are copied between these two buffers and 'amdtp_stream' structure
      counts the handled PCM frames. Then, snd_pcm_period_elapsed() is called if
      required.
      
      Essentially, packet streaming layer should not be responsible for PCM
      frame processing. The PCM frame processing should be handled in each data
      block processing layer as a result of handling data blocks. Although, PCM
      frame counting is a common work for all of protocols which ALSA firewire
      stack is going to support.
      
      This commit adds two new helper functions as interfaces between packet
      streaming layer to data block processing layer. In future, each data block
      processing layer implements these functions. The packet streaming layer
      calls data block processing layer per packet by calling the functions. The
      data block processing layer processes data blocks and PCM frames, and
      returns the number of processed PCM frames. Then the packet streaming layer
      calculates handled PCM frames and calls snd_pcm_period_elapsed().
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      20e44577
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: add a member of frame_multiplier instead of double_pcm_frames · 6a4e89ff
      Takashi Sakamoto authored
      In future commit, interface between data block processing layer and packet
      stream processing layer is defined. These two layers communicate the
      number of data blocks and the number of PCM frames.
      
      The data block processing layer has a responsibility for calculating the
      number of PCM frames. Therefore, 'dual wire' of Dice quirk should be
      handled in data block processing layer.
      
      This commit adds a member of 'frame_multiplier'. This member represents
      the ratio of the number of PCM frames against the number of data blocks.
      Usually, the value of this member is 1, while it's 2 in Dice's 'dual wire'.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6a4e89ff
    • 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
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: arrange structure for AMDTP stream · 10b2b6dc
      Takashi Sakamoto authored
      In later commit, some members related to AM824 data format will be moved
      from AMDTP stream structure to data block structure. This commit is a
      preparation for it. Additionally, current layout of AMDTP stream structure
      is a bit mess by several extensions. This commit also arranges the layout.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      10b2b6dc
  2. 24 Sep, 2015 2 commits
    • Takashi Iwai's avatar
      ALSA: hda - Disable power_save_node for Thinkpads · 7f57d803
      Takashi Iwai authored
      Lenovo Thinkpads with recent Realtek codecs seem suffering from click
      noises at power transition since the introduction of widget power
      saving in 4.1 kernel.  Although this might be solved by some delays in
      appropriate points, as a quick workaround, just disable the
      power_save_node feature for now.  The gain it gives is relatively
      small, and this makes the situation back to pre 4.1 time.
      
      This patch ended up with a bit more code changes than usual because
      the existing fixup for Thinkpads is highly chained.  Instead of adding
      yet another chain, combine a few of them into a single fixup entry, as
      a gratis cleanup.
      
      Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=943982
      Cc: <stable@vger.kernel.org> # v4.1+
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7f57d803
    • Takashi Iwai's avatar
      ALSA: hda/tegra - async probe for avoiding module loading deadlock · 83510441
      Takashi Iwai authored
      The Tegra HD-audio controller driver causes deadlocks when loaded as a
      module since the driver invokes request_module() at binding with the
      codec driver.  This patch works around it by deferring the probe in a
      work like Intel HD-audio controller driver does.  Although hovering
      the codec probe stuff into udev would be a better solution, it may
      cause other regressions, so let's try this band-aid fix until the more
      proper solution gets landed.
      Reported-by: default avatarThierry Reding <treding@nvidia.com>
      Tested-by: default avatarThierry Reding <treding@nvidia.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      83510441
  3. 23 Sep, 2015 3 commits
  4. 22 Sep, 2015 1 commit
  5. 19 Sep, 2015 5 commits
  6. 18 Sep, 2015 1 commit
  7. 16 Sep, 2015 1 commit
    • Robert Jarzmik's avatar
      ASoC: fix broken pxa SoC support · 3c8f7710
      Robert Jarzmik authored
      The previous fix of pxa library support, which was introduced to fix the
      library dependency, broke the previous SoC behavior, where a machine
      code binding pxa2xx-ac97 with a coded relied on :
       - sound/soc/pxa/pxa2xx-ac97.c
       - sound/soc/codecs/XXX.c
      
      For example, the mioa701_wm9713.c machine code is currently broken. The
      "select ARM" statement wrongly selects the soc/arm/pxa2xx-ac97 for
      compilation, as per an unfortunate fate SND_PXA2XX_AC97 is both declared
      in sound/arm/Kconfig and sound/soc/pxa/Kconfig.
      
      Fix this by ensuring that SND_PXA2XX_SOC correctly triggers the correct
      pxa2xx-ac97 compilation.
      
      Fixes: 846172df ("ASoC: fix SND_PXA2XX_LIB Kconfig warning")
      Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      3c8f7710
  8. 14 Sep, 2015 5 commits
  9. 11 Sep, 2015 4 commits
  10. 10 Sep, 2015 1 commit
  11. 09 Sep, 2015 2 commits
  12. 07 Sep, 2015 1 commit
    • Johan Rastén's avatar
      ALSA: usb-audio: Change internal PCM order · 5ee20bc7
      Johan Rastén authored
      New PCMs will now be added to the end of the chip's PCM list instead of to the
      front. This changes the way streams are combined so that the first capture
      stream will now be merged with the first playback stream instead of the last.
      
      This fixes a problem with ASUS U7. Cards with one playback stream and cards
      without capture streams should be unaffected by this change.
      
      Exception added for M-Audio Audiophile USB (tm) since it seems to have a fix to
      swap capture stream numbering in alsa-lib conf/cards/USB-audio.conf
      Signed-off-by: default avatarJohan Rastén <johan@oljud.se>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5ee20bc7
  13. 05 Sep, 2015 3 commits
  14. 04 Sep, 2015 1 commit