18 Aug, 2014

1 commit


05 Aug, 2014

1 commit

  • ASoC: Updates for v3.17

    This has been a pretty exciting release in terms of the framework, we've
    finally got support for multiple CODECs attached to a single DAI link
    which has been something there's been interest in as long as I've been
    working on ASoC. A big thanks to Benoit and Misael for their work on
    this.

    Otherwise it's been a fairly standard release for development, including
    more componentisation work from Lars-Peter and a good selection of both
    CODEC and CPU drivers.

    - Support for multiple CODECs attached to a single DAI, enabling
    systems with for example multiple DAC/speaker drivers on a single
    link, contributed by Benoit Cousson based on work from Misael Lopez
    Cruz.
    - Support for byte controls larger than 256 bytes based on the use of
    TLVs contributed by Omair Mohammed Abdullah.
    - More componentisation work from Lars-Peter Clausen.
    - The remainder of the conversions of CODEC drivers to params_width()
    - Drivers for Cirrus Logic CS4265, Freescale i.MX ASRC blocks, Realtek
    RT286 and RT5670, Rockchip RK3xxx I2S controllers and Texas Instruments
    TAS2552.
    - Lots of updates and fixes, especially to the DaVinci, Intel,
    Freescale, Realtek, and rcar drivers.

    Takashi Iwai
     

04 Aug, 2014

8 commits


01 Aug, 2014

1 commit

  • snd_soc_open() will trigger pm_runtime resume() which will then enable
    the regulator and initialization. So we should make sure the MCLK is
    enabled before this resume().

    Previously we let the machine driver get the clock and enable it in
    its probe(). However, considering about power saving, it'll be better
    to enable it when it's going to be used and disable it after using.

    So this patch just simply adds clk_get() and clk_enable() to WM8962
    driver. Meanwhile, it marks clock pointer to NULL if no clock assigned
    to it so it will not break any current function.

    Signed-off-by: Nicolin Chen
    Signed-off-by: Mark Brown

    Nicolin Chen
     

23 Jul, 2014

3 commits

  • We have now everything in place to actual let a component register controls. Add
    a function which allows to do so.

    Also update snd_soc_add_codec_controls() and snd_soc_platform_controls() to use
    this new function internally. And while we are at it also change the
    num_controls parameter of those two functions from int to unsigned int.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • Both the snd_soc_codec and snd_soc_platform struct do have a pointer to the
    parent card and both handle this pointer in mostly the same way. This patch
    moves the card field to the component level which will allow further code
    consolidation between platforms and CODECS.

    Since there are only a handful of users of the snd_soc_codec struct's card field
    (and none of the snd_soc_platform's) these are update in this patch as well,
    which allows it to be removed from the snd_soc_codec struct.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • The platform_dev_list was added in commit f0fba2ad1b ("ASoC: multi-component -
    ASoC Multi-Component Support") and while platforms are added and remove from
    that list it is otherwise unused. This patch removes it again.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

18 Jul, 2014

1 commit

  • Support the TI TAS2552 Class D amplifier.

    The TAS2552 is a high efficiency Class-D audio
    power amplifier with advanced battery current
    management and an integrated Class-G boost
    The device constantly measures the
    current and voltage across the load and provides a
    digital stream of this information.

    Signed-off-by: Dan Murphy
    Signed-off-by: Mark Brown

    Dan Murphy
     

17 Jul, 2014

3 commits

  • Add a function helper to factorize the hw_params code.

    Suggested by Lars-Peter Clausen

    Signed-off-by: Benoit Cousson
    Tested-by: Lars-Peter Clausen
    Reviewed-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Benoit Cousson
     
  • DAI link assumes a one to one mapping between CPU DAI and CODEC. In
    some cases, the same CPU DAI can be connected to several codecs.
    This is the case for example, if you connect two mono codecs to the
    same I2S link in order to have a stereo card.
    The current ASoC implementation does not allow such setup.

    Add support for DAI links composed of a single CPU DAI and multiple
    CODECs. Sound cards have to pass the CODECs array in the corresponding
    DAI link through a new 'snd_soc_dai_link_component' struct. Each CODEC in
    this array is described in the same manner single CODEC DAIs are
    (either DT/OF node or codec_name).

    Multi-codec links are not supported in the case of CODEC to CODEC links.
    Just print a warning if it happens.

    Based on an original code done by Misael.

    Signed-off-by: Benoit Cousson
    Signed-off-by: Misael Lopez Cruz
    Signed-off-by: Fabien Parent
    Tested-by: Lars-Peter Clausen
    Reviewed-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Benoit Cousson
     
  • ALSA supports arbitrary length TLVs for each kcontrol that can be used
    to pass metadata about the control (e.g. volumes, enum information). The
    same transport mechanism is now used for arbitrary length data by
    defining a new helper.

    Signed-off-by: Omair Mohammed Abdullah
    Signed-off-by: Vinod Koul
    Signed-off-by: Mark Brown

    Omair Mohammed Abdullah
     

15 Jul, 2014

1 commit


10 Jul, 2014

1 commit

  • For applications which need to synchronise with external timebases such
    as broadcast TV applications the kernel monotonic time is not optimal as
    it includes adjustments from NTP and so may still include discontinuities
    due to that. A raw monotonic time which does not include any adjustments
    is available in the kernel from getrawmonotonic() so provide userspace with
    a new timestamp type SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW which provides
    timestamps based on this as an option.

    [dropped tstamp_type assignment code, as it's no longer needed -- tiwai]

    Reported-by: Daniel Thompson
    Signed-off-by: Mark Brown
    Acked-by: Jaroslav Kysela
    Signed-off-by: Takashi Iwai

    Mark Brown
     

07 Jul, 2014

1 commit

  • Adds an equivalent of SOC_ENUM_EXT for value enums

    Strictly speaking SOC_ENUM_EXT can also be used to define
    a value enum since the only difference is the get and set
    functions. But this doesn't look good in code because it is
    inconsistent with the normal control definitions. Adding a
    specific SOC_VALUE_ENUM_EXT is better for code clarity.

    Signed-off-by: Richard Fitzgerald
    Signed-off-by: Mark Brown

    Richard Fitzgerald
     

05 Jul, 2014

1 commit

  • This patch adds Realtek ALC286 codec driver.

    ALC286 is a dual mode codec, which can run as HD-A or I2S mode.
    It is controlled by HD-A verb commands via I2C protocol.
    The following is the I/O difference between ALC286 and general I2S codecs.
    1. A HD-A verb command contains three parts, NID, VID, and PID.
    And an I2S command contains only two parts: address and data.
    2. Not only the register address is written, but the read command also
    includes the entire write command.
    3. rt286 uses different registers for read and write the same bits.

    We map verb command to regmap structure. However, we read most registers from
    cache to prevent the asymmetry read/write issue in rt286.

    Signed-off-by: Bard Liao
    Signed-off-by: Gustaw Lewandowski
    Signed-off-by: Mark Brown

    Bard Liao
     

03 Jul, 2014

1 commit


28 Jun, 2014

1 commit

  • Sound data needs to be sent to R-Car sound SSI when playback.
    But, there are 2 interfaces for it.
    1st is SSITDR/SSIRDR which are mapped on SSI.
    2nd is SSIn_BUSIF which are mapped on SSIU.

    2nd SSIn_BUSIF is used when DMA transfer,
    and it is always used if sound data came from via SRC.
    But, we can use it when SSI+DMA case too.
    (Current driver is assuming 1st SSITDR/SSIRDR for it)

    2nd SSIn_BUSIF can be used as FIFO.
    This is very helpful/useful for SSI+DMA.

    But DMA address / DMA ID are not same between 1st/2nd cases.
    This patch care about these settings.

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Mark Brown

    Kuninori Morimoto
     

22 Jun, 2014

9 commits

  • The platform field in the snd_soc_dapm_widget and snd_soc_dapm_context structs
    is now unused can be removed. New code that wants to get the platform for a
    widget or dapm context should use snd_soc_dapm_to_platform(w->dapm) or
    snd_soc_dapm_to_platform(dapm).

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • The DAI DAPM context was added in commit be09ad90 ("ASoC: core: Add platform DAI
    widget mapping") and the only user was removed again in commit ae10e7e8f ("ASoC:
    core: Only add platform DAI widgets once."). Now that we have a per component
    DAPM context it is unlikely that we'll need the DAI DAPM context again.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • This patch adds stream_event() and seq_notifier() callbacks similar to those
    found in the snd_soc_codec_driver and snd_soc_platform driver struct to the
    snd_soc_component_driver struct. This is meant to unify the handling of these
    callbacks across different types of components and will eventually allow their
    removal from the CODEC and platfrom driver structs.

    The new callbacks are slightly different from the old ones in that they take a
    snd_soc_component as a parameter rather than a snd_soc_dapm_context. This was
    done since otherwise casting from the DAPM context to the component would
    typically be the first thing to do in the callback. And the interface becomes
    slightly cleaner by passing a snd_soc_component to all callbacks in the
    snd_soc_component_driver struct.

    The patch also already removes the stream_event() callback from the
    snd_soc_codec_driver and snd_soc_platform_driver structs as it is currently
    unused.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • The snd_soc_platform dapm field is not accessed outside of the ASoC core. Switch
    it over to using the snd_soc_component DAPM context.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • This patch adds full DAPM support at the component level. Previously there was
    only full DAPM support for CODECs and partial DAPM support (e.g. no Mixers nor
    MUXs) for platforms. Having DAPM support at the component level will allow all
    types of components to use DAPM and also help in consolidating the DAPM support
    between CODECs and platforms.

    Since the DAPM context is directly embedded into the snd_soc_codec and
    snd_soc_platform struct and the 'dapm' field is directly referenced in a lot of
    drivers moving the field just right now is not possible without causing code
    churn. The approach this patch takes is to add two new fields to the component
    struct. One field which is the pointer to the actual DAPM context used by the
    component and one DAPM context that will be used as the default if no other
    context was specified. For CODECs and platforms the pointer is initialized to
    point to the CODEC or platform DAPM context. All generic code when referencing
    a component's DAPM struct will go via the pointer. This will make it possible to
    eventually seamlessly move the DAPM context from snd_soc_codec and
    snd_soc_platform struct over once all direct references have been eliminated.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • Currently the DAPM code directly looks at the CODEC driver struct to get a
    handle to the set_bias_level() callback. This patch adds a new set_bias_level()
    callback to the DAPM context struct. The DAPM code will use this new callback
    instead of the CODEC callback. For CODECs the new callback is set up to call the
    CODEC specific set_bias_level callback(). Not looking directly at the CODEC
    driver struct will allow non CODEC DAPM contexts to implement a set_bias_level()
    callback.

    This is also similar to how the seq_notifier() and stream_event() callbacks are
    currently handled.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • Currently only pins in CODEC DAPM contexts are automatically marked as
    non-connected if the card has the fully_routed flag set. This makes sense since
    widgets which qualify for auto-disconnection are only found in CODEC DAPM
    contexts. But with componentisation this is going to change, so consider all
    widgets for auto-disconnection.

    Also it is probably faster to walk the widgets list only once rather than once
    for each CODEC.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • The component struct already has a name and id field which are initialized to
    the same values as the same fields in the CODEC and platform structs. So remove
    them from the CODEC and platform structs and used the ones from the component
    struct instead.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     
  • Move the name_prefix from the CODEC struct to the component struct. This will
    eventually allow to specify prefixes for all types of components. It is also
    necessary to make the DAPM code component type independent (i.e. a DAPM context
    does not need to know whether it belongs to a CODEC or a platform or something
    else).

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

18 Jun, 2014

1 commit

  • The user-control put and get handlers as well as the tlv do not protect against
    concurrent access from multiple threads. Since the state of the control is not
    updated atomically it is possible that either two write operations or a write
    and a read operation race against each other. Both can lead to arbitrary memory
    disclosure. This patch introduces a new lock that protects user-controls from
    concurrent access. Since applications typically access controls sequentially
    than in parallel a single lock per card should be fine.

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Jaroslav Kysela
    Cc:
    Signed-off-by: Takashi Iwai

    Lars-Peter Clausen
     

12 Jun, 2014

1 commit


03 Jun, 2014

5 commits