1. 24 10月, 2016 3 次提交
  2. 27 9月, 2016 1 次提交
  3. 26 9月, 2016 1 次提交
    • T
      ALSA: control: cage TLV_DB_RANGE_HEAD in kernel land because it was obsoleted · 318824d3
      Takashi Sakamoto 提交于
      In commit bf1d1c9b ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()"), the new
      macro was added so that "dB range information can be specified without
      having to count the items manually for TLV_DB_RANGE_HEAD()". In short,
      TLV_DB_RANGE_HEAD macro was obsoleted.
      
      In commit 46e860f7 ("ALSA: rename TLV-related macros so that they're
      friendly to user applications"), TLV-related macros are exposed for
      applications in user land to get content of data structured by
      Type/Length/Value shape. The commit managed to expose TLV-related macros
      as many as possible, while obsoleted TLV_DB_RANGE_HEAD() was included to
      the list of exposed macros.
      
      This situation brings some confusions to application developers because
      they might think all exposed macros have their own purpose and useful for
      applications.
      
      For the reason, this commit moves TLV_DB_RANGE_HEAD macro from UAPI header
      to a header for kernel land, again. The above commit is done within the
      same development period for kernel 4.9, thus not published yet. This
      commit might certainly brings no confusions to user land.
      
      Reference: commit bf1d1c9b ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()")
      Reference: commit 46e860f7 ("ALSA: rename TLV-related macros so that they're friendly to user applications")
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      318824d3
  4. 25 9月, 2016 1 次提交
  5. 15 9月, 2016 2 次提交
    • T
      ALSA: rename TLV-related macros so that they're friendly to user applications · 46e860f7
      Takashi Sakamoto 提交于
      In a previous commit, some macros newly appeared to UAPI header for TLV
      packet. These macros have short names and they easily bring name conflist
      to applications. The conflict can be avoided to rename them with a proper
      prefix.
      
      For this purpose, this commit renames these macros with prefix
      'SNDRV_CTL_TLVD_'.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      46e860f7
    • T
      ALSA: control: move layout of TLV payload to UAPI header · 398fa4db
      Takashi Sakamoto 提交于
      In ALSA control interface, each element set can have threshold level
      information. This information is transferred between drivers/applications,
      in a shape of tlv packet. The layout of this packet is defined in
      'uapi/sound/asound.h' (struct snd_ctl_tlv):
      
      struct snd_ctl_tlv {
          unsigned int numid;
          unsigned int length;
          unsigned int tlv[0];
      };
      
      Data in the payload (struct snd_ctl_tlv.tlv) is expected to be filled
      according to our own protocol. This protocol is described in
      'include/sound/tlv.h'. A layout of the payload is expected as:
      
      struct snd_ctl_tlv.tlv[0]: one of SNDRV_CTL_TLVT_XXX
      struct snd_ctl_tlv.tlv[1]: Length of data
      struct snd_ctl_tlv.tlv[2...]: data
      
      Unfortunately, the macro is not exported to user land yet, thus
      applications cannot get to know the protocol.
      
      Additionally, ALSA control core has a feature called as 'user-defined'
      element set. This allows applications to add/remove arbitrary element sets
      with elements to control devices. Elements in the element set can be
      operated by the same way as the ones added by in-kernel implementation.
      
      For threshold level information of 'user-defined' element set, applications
      need to register the information to an element set. However, as described
      above, layout of the payload is closed in kernel land. This is quite
      inconvenient, too.
      
      This commit moves the protocol to UAPI header for TLV.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      398fa4db
  6. 24 8月, 2016 1 次提交
  7. 11 8月, 2016 2 次提交
  8. 09 8月, 2016 6 次提交
  9. 08 8月, 2016 5 次提交
  10. 16 7月, 2016 2 次提交
  11. 05 7月, 2016 1 次提交
  12. 01 7月, 2016 1 次提交
  13. 30 6月, 2016 1 次提交
    • K
      ASoC: add new simple-card-utils.c · abd3147e
      Kuninori Morimoto 提交于
      Current ALSA SoC has simple-card driver which is supporting both
      platform and DT probe.
      Now, some sound cards driver are created based on simple-card.
      They have similar feature or function, but implemented separately
      on each drivers. This is a waste of code.
      OTOH, merging these driver into same driver is highly risk,
      because it will be very difficult to keep compatibility.
      More over, ALSA SoC want to have graph base of DT feature in the
      future. Maybe it want to use simple-card like feature / function.
      Because of these background, this patch creates simple-card
      helper utils, and provides common function to each drivers.
      1st is asoc_simple_card_parse_daifmt()
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      abd3147e
  14. 28 6月, 2016 2 次提交
    • K
      ASoC: hdmi-codec: callback function will be called with private data · efc9194b
      Kuninori Morimoto 提交于
      Current hdmi-codec driver is assuming that it will be registered
      from HDMI driver. Because of this assumption, each callback function
      has struct device pointer which is parent device (= HDMI).
      Then, it can use dev_get_drvdata() to get private data.
      
      OTOH, on some SoC/HDMI case, SoC has VIDEO/SOUND and HDMI IPs.
      This case, it needs SoC VIDEO, SoC SOUND and HDMI video, HDMI codec
      driver. In DesignWare HDMI IP case, SoC VIDEO (= DRM/KMS) driver tries
      to bind DesignWare HDMI video driver, and HDMI codec driver
      (= hdmi-codec). This case, above "parent device" of HDMI codec driver
      is DRM/KMS driver and its "device" already has private data.
      
      And, from DT and ASoC CPU/Codec/Card binding point of view, HDMI codec
      (= hdmi-codec) needs to have "parent device" (= DRM/KMS), otherwise,
      it never detect sound card.
      
      Because of these reasons, some driver can't use dev_get_drvdata() to
      get private data on hdmi-codec driver. This patch add new void pointer
      on hdmi_codec_pdata for private data, and callback function will be
      called with it.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      efc9194b
    • P
      ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver. · 3333cb71
      Paul Handrigan 提交于
      Initial commit of the Cirrus Logic cs35l33 8V boosted class D
      amplifier.
      Signed-off-by: NPaul Handrigan <Paul.Handrigan@cirrus.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      3333cb71
  15. 13 6月, 2016 1 次提交
    • C
      ALSA: compress: Add function to indicate the stream has gone bad · a4f2d87c
      Charles Keepax 提交于
      Currently, the avail IOCTL doesn't pass any error status, which
      means typically on error it simply shows no data available. This
      can lead to situations where user-space is waiting indefinitely
      for data that will never come as the DSP has suffered an
      unrecoverable error.
      
      Add snd_compr_stop_error which end drivers can call to indicate
      the stream has suffered an unrecoverable error and stop it. The
      avail and poll IOCTLs are then updated to report if the stream is
      in an error state to user-space. Allowing the error to propagate
      out. Processing of the actual snd_compr_stop needs to be deferred
      to a worker thread as the end driver may detect the errors during
      an existing operation callback.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Acked-by: NVinod Koul <vinod.koul@intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      a4f2d87c
  16. 03 6月, 2016 1 次提交
  17. 30 5月, 2016 2 次提交
    • S
      ASoC: Introduce SOC_SINGLE_S8_TLV() macro · dcc0799b
      Srinivas Kandagatla 提交于
      This patch introduces SOC_SINGLE_S8_TLV() macro for volume control
      on chips which supports both negative and positive gains with sign
      bit on a 8 bit register, Gain ranges from -128 to +127 with a
      predefined step size.
      Currently we only have support to DOUBLE_S8_TLV() which does not fit
      for cases where we just have separate gain control register for each
      channel.
      
      One of the Qualcomm SOC msm8916 has such gain control register whose gain
      range is from -38.4dB to +38.4dB with step size of 0.3dB.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      dcc0799b
    • P
      ASoC: dapm: support user-defined stop condition in dai_get_connected_widgets · 6742064a
      Piotr Stankiewicz 提交于
      Certain situations may warrant examining DAPM paths only to a certain
      arbitrary point, as opposed to always following them to the end. For
      instance, when establishing a connection between a front-end DAI link
      and a back-end DAI link in a DPCM path, it does not make sense to walk
      the DAPM graph beyond the first widget associated with a back-end link.
      
      This patch introduces a mechanism which lets a user of
      dai_get_connected_widgets supply a function which will be called for
      every node during the graph walk. When invoked, this function can
      execute arbitrary logic to decide whether the walk, given a DAPM widget
      and walk direction, should be terminated at that point or continued
      as normal.
      Signed-off-by: NPiotr Stankiewicz <piotrs@opensource.wolfsonmicro.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      6742064a
  18. 13 5月, 2016 1 次提交
  19. 12 5月, 2016 1 次提交
  20. 28 4月, 2016 1 次提交
    • M
      ASoC: dmaengine_pcm: Add support for packed transfers · 73fe01cf
      Matthias Reichl 提交于
      dmaengine_pcm currently only supports setups where FIFO reads/writes
      correspond to exactly one sample, eg 16-bit sample data is transferred
      via 16-bit FIFO accesses, 32-bit data via 32-bit accesses.
      
      This patch adds support for setups with fixed width FIFOs where
      multiple samples are packed into a larger word.
      
      For example setups with a 32-bit wide FIFO register that expect
      16-bit sample transfers to be done with the left+right sample data
      packed into a 32-bit word.
      
      Support for packed transfers is controlled via the
      SND_DMAENGINE_PCM_DAI_FLAG_PACK flag in snd_dmaengine_dai_dma_data.flags
      
      If this flag is set dmaengine_pcm doesn't put any restriction on the
      supported formats and sets the DMA transfer width to undefined.
      
      This means control over the constraints is now transferred to the DAI
      driver and it's responsible to provide proper configuration and
      check for possible corner cases that aren't handled by the ALSA core.
      Signed-off-by: NMatthias Reichl <hias@horus.com>
      Acked-by: NLars-Peter Clausen <lars@metafoo.de>
      Tested-by: NMartin Sperl <kernel@martin.sperl.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      73fe01cf
  21. 26 4月, 2016 1 次提交
    • T
      ALSA: hda - Update BCLK also at hotplug for i915 HSW/BDW · bb03ed21
      Takashi Iwai 提交于
      The recent bug report suggests that BCLK setup for i915 HSW/BDW needs
      to be updated at each HDMI hotplug, not only at initialization and
      resume.  That is, we need to update HSW_EM4 and HSW_EM5 registers at
      ELD notification, too.  Otherwise the HDMI audio may be out of sync
      and played in a wrong pitch.
      
      However, the HDA codec driver has no access to the controller
      registers, and currently the code managing these registers is in
      hda_intel.c, i.e. local to the controller driver.  For allowing the
      explicit BCLK update from the codec driver, as in this patch, the
      former haswell_set_bclk() in hda_intel.c is moved to hdac_i915.c and
      exposed as snd_hdac_i915_set_bclk().  This is called from both the HDA
      controller driver and intel_pin_eld_notify() in HDMI codec driver.
      
      Along with this change, snd_hdac_get_display_clk() gets dropped as
      it's no longer used.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91410
      Cc: <stable@vger.kernel.org> # v4.5+
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bb03ed21
  22. 21 4月, 2016 3 次提交
    • T
      ALSA: hda - Fix possible race on regmap bypass flip · 3194ed49
      Takashi Iwai 提交于
      HD-audio driver uses regmap cache bypass feature for reading a raw
      value without the cache.  But this is racy since both the cached and
      the uncached reads may occur concurrently.  The former is done via the
      normal control API access while the latter comes from the proc file
      read.
      
      Even though the regmap itself has the protection against the
      concurrent accesses, the flag set/reset is done without the
      protection, so it may lead to inconsistent state of bypass flag that
      doesn't match with the current read and occasionally result in a
      kernel WARNING like:
        WARNING: CPU: 3 PID: 2731 at drivers/base/regmap/regcache.c:499 regcache_cache_only+0x78/0x93
      
      One way to work around such a problem is to wrap with a mutex.  But in
      this case, the solution is simpler: for the uncached read, we just
      skip the regmap and directly calls its accessor.  The verb execution
      there is protected by itself, so basically it's safe to call
      individually.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3194ed49
    • M
      ASoC: Export snd_soc_find_dai() · 305e9020
      Mengdong Lin 提交于
      This API can be used by topology to find an existing BE dai by name
      and further configure it.
      
      Topology will also check DAI ID to avoid wrong match.
      Signed-off-by: NMengdong Lin <mengdong.lin@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      305e9020
    • M
      ASoC: Change DAI link's be_id to a generic id · 2f0ad491
      Mengdong Lin 提交于
      The generic ID can be used by topology:
      - Toplogy can create FE links and set their ID, machine drivers will
        be notified and check this ID for machine-specific init.
      - Toplogy can use the ID to find existing BE & CC links and further
        configure them.
      Signed-off-by: NMengdong Lin <mengdong.lin@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      2f0ad491