12 Dec, 2016

4 commits


02 Dec, 2016

3 commits


01 Dec, 2016

1 commit

  • It's often the case that a codec driver will need to control its
    own pins. However, if a name_prefix has been applied to this codec it
    must be included in the name passed to any of the snd_soc_dapm_x_pin()
    functions.

    The behaviour of the existing pin control functions is reasonable, since
    you may want to search for a fully-specified name within the scope of an
    entire card. This means that we can't apply the prefix in these functions
    because it will break card-scope searches.

    Constructing a prefixed string "manually" in codec drivers leads to a lot
    of repetition of the same code.

    To make this tidier in codec drivers this patch adds a new set of
    equivalent functions that take a struct snd_soc_component instead of a
    dapm context and automatically add the component's name_prefix to the
    given name. This makes it a simple change in codec drivers to be
    prefix-safe.

    The new functions are not quite trivial enough to be inlines and the
    compiler won't be able to compile-away any part of them.

    Although it looks somewhat inefficient to have to allocate a temporary
    buffer and combine strings, the current design of the widget list
    doesn't lend itself to a more optimized implementation - it's a single
    list of all widgets on a card and is searched linearly for a matching
    string. As pin state changes are generally low-frequency events it's
    unlikely to be a significant issue - at least not enough to rewrite the
    widget list handling just for this.

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

    Richard Fitzgerald
     

11 Nov, 2016

5 commits


05 Nov, 2016

1 commit

  • Define the API to find an existing DAI link of the soc card by matching
    the ID, name and stream name.

    Some cards may use unique ID for each DAI link, so matching ID is enough,
    and name or stream name are not necessary. But user need to specify name
    or stream name as well if not sure whether link ID is unique since most
    cards use 0 as the default link ID.

    Topology can use this API to find an existing BE link and configure it.

    Signed-off-by: Mengdong Lin
    Signed-off-by: Mark Brown

    Mengdong Lin
     

24 Oct, 2016

3 commits


30 Sep, 2016

1 commit


09 Aug, 2016

1 commit

  • snd_soc_pcm_set_drvdata() will set driver data to rtd->dev,
    but driver data of rtd->dev is already used as "rtd" on
    soc_post_component_init().

    static int soc_post_component_init(xxx)
    {
    ...
    dev_set_drvdata(rtd->dev, rtd);
    ...
    }

    To remove confusion, this patch removes snd_soc_pcm_set/get_drvdata().

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

    Kuninori Morimoto
     

08 Aug, 2016

1 commit

  • codec driver and component driver has duplicated callback functions,
    and codec side functions are just copied to component side when
    register timing. This was quick-hack, but no longer needed.
    This patch removes codec side duplicated callback function.

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

    Kuninori Morimoto
     

30 May, 2016

1 commit

  • 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: Srinivas Kandagatla
    Signed-off-by: Mark Brown

    Srinivas Kandagatla
     

13 May, 2016

1 commit


21 Apr, 2016

2 commits

  • 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: Mengdong Lin
    Signed-off-by: Mark Brown

    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: Mengdong Lin
    Signed-off-by: Mark Brown

    Mengdong Lin
     

16 Feb, 2016

1 commit

  • Topology will create FE DAIs dynamically from the PCM objects,
    and register them to the component.

    A PCM topoplogy object describes a FE DAI and DAI link. Later
    patch will add FE DAI links as well.

    Change tplg load ops for DAI:
    - Only process a DAI.
    - Pass the DAI driver pointer to the component driver for
    extra initialization.

    Signed-off-by: Mengdong Lin
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Mengdong Lin
     

11 Jan, 2016

3 commits

  • Mark Brown
     
  • ASoC: Updates for v4.5

    This is quite a busy release on the driver front with a lot of new
    drivers being added but comparatively quiet on the core side with only
    one big change going in and that a fairly straightforward refactoring.

    - Conversion of the array of DAI links to a list by Mengdong Lin,
    supporting dynamically adding and removing DAI links.
    - Some more fixes for the topology code, though it is still not final
    and ready for enabling in production. We really need to get to the
    point where that can be done.
    - A pile of changes for Intel SkyLake drivers which hopefully deliver
    some useful initial functionality for systems with this chipset,
    though there is more work still to come.
    - New drivers for a number of Imagination Technologies IPs.
    - Lots of new features and cleanups for the Renesas drivers.
    - ANC support for WM5110.
    - New driver for Atmel class D speaker drivers.
    - New drivers for Cirrus CS47L24 and WM1831.
    - New driver for Dialog DA7128.
    - New drivers for Realtek RT5659 and RT56156.
    - New driver for Rockchip RK3036.
    - New driver for TI PC3168A

    # gpg: Signature made Wed 23 Dec 2015 00:42:40 GMT using RSA key ID 5D5487D0
    # gpg: Good signature from "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: aka "Mark Brown "
    # gpg: WARNING: This key is not certified with a trusted signature!
    # gpg: There is no indication that the signature belongs to the owner.
    # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB
    # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0

    Mark Brown
     
  • Mark Brown
     

10 Jan, 2016

2 commits

  • aux_dev is mainly used by the machine driver to specify analog devices,
    which are registered as codecs. Making it more like a generic component
    can help the machine driver to use it to specify any component with
    topology info by name.

    Details:
    - Remove the stub 'rtd_aux' array from the soc card.
    - Add a list 'aux_comp_list' to store the components of aux_devs.
    And add a list head 'list_aux' to struct snd_soc_component, for adding
    such components to the above list.
    - Add a 'init' ops to a component for machine specific init.
    soc_bind_aux_dev() will set it to be aux_dev's init. And it will be
    called when probing the component.
    - soc_bind_aux_dev() will also search components by name of an aux_dev,
    since it may not be a codec.
    - Move probing of aux_devs before checking new DAI links brought by
    topology.
    - Move removal of aux_devs later than removal of links. Because topology
    of aux components may register DAIs and the DAI drivers will go with
    removal of the aux components, we want soc_remove_link_dais() to remove
    the DAIs at first.

    Signed-off-by: Mengdong Lin
    Signed-off-by: Mark Brown

    Mengdong Lin
     
  • Define API snd_soc_register_dai() to add a DAI dynamically and
    create the DAI widgets. Topology can use this API to register DAIs
    when probing a component with topology info. These DAIs's playback
    & capture widgets will be freed when the sound card is unregistered
    and the DAIs will be freed when cleaning up the component.

    And a dobj is embedded into the struct snd_soc_dai_driver. Topology
    can use the dobj to find the DAI drivers created by it and free them
    when the topology component is removed.

    Signed-off-by: Mengdong Lin
    Signed-off-by: Mark Brown

    Mengdong Lin
     

31 Dec, 2015

1 commit

  • snd_soc_dapm_mutex_lock currently uses the un-nested call which can
    cause lockdep warnings when called from control handlers (a relatively
    common usage) and using modules. As creating the control causes a
    potential mutex inversion with the handler, creating the control will
    take the controls_rwsem under the dapm_mutex and accessing the control
    will take the dapm_mutex under controls_rwsem.

    All the users look like they want to be using the runtime class of the
    lock anyway, so this patch just changes snd_soc_dapm_mutex_lock to use
    the nested call, with the SND_SOC_DAPM_CLASS_RUNTIME class.

    Fixes: f6d5e586b416 ("ASoC: dapm: Add helpers to lock/unlock DAPM mutex")
    Signed-off-by: Charles Keepax
    Signed-off-by: Mark Brown

    Charles Keepax
     

23 Dec, 2015

3 commits


13 Dec, 2015

1 commit


09 Dec, 2015

2 commits

  • A machine driver can register the two ops.

    When a DAI link is added or removed by a component's topology, the
    ASoC core can call the ops to notify the machine driver for extra
    intialization or destruction.

    E.g. topology can create FE DAI links from a cpu DAI component, and
    the machine driver may define an add_dai_link ops to set machine-specific
    .init ops for the DAI link.

    Signed-off-by: Mengdong Lin
    Signed-off-by: Mark Brown

    Mengdong Lin
     
  • Implement a dai link list for the soc card.

    Add APIs to add/remove a DAI links dynamically, e.g. by topology.

    And a dobj is embedded into the struct snd_soc_dai_link. Topology can
    use the dobj to find the links created by it and remove them when the
    topology component is unloaded.

    The predefined DAI links are reserved to keep backward compatibility.
    And they will also be added to the list.

    Signed-off-by: Mengdong Lin
    Signed-off-by: Mark Brown

    Mengdong Lin
     

25 Nov, 2015

1 commit


19 Nov, 2015

1 commit

  • Currently the number of DAI links is statically defined by the machine
    driver at build time using an array. This makes it difficult to shrink/
    grow the number of DAI links at runtime in order to reflect any changes
    in topology.

    We can change the DAI link array in the core to a list so that PCMs and
    FE DAI links can be added and deleted at runtime to reflect changes in
    use case and DSP topology. The machine driver can still register DAI links
    as an array.

    As the 1st step, this patch change the PCM runtime array to a list. A new
    PCM runtime is added to the list when a DAI link is bound successfully.

    Later patches will further implement the DAI link list.

    More:
    - define snd_soc_new/free_pcm_runtime() to create/free a runtime.
    - define soc_add_pcm_runtime() to add a runtime to the rtd list.
    - define soc_remove_pcm_runtimes() to clean up the runtime list.

    - traverse the rtd list to probe the link components and dais.

    - Add a field "num" to PCM runtime struct, used to specify the device
    number when creating the pcm device, and for a soc card to access
    its dai_props array.

    - The following 3rd party machine/platform drivers iterate the rtd list
    to check the runtimes:
    sound/soc/intel/atom/sst-mfld-platform-pcm.c
    sound/soc/intel/boards/cht_bsw_rt5645.c
    sound/soc/intel/boards/cht_bsw_rt5672.c
    sound/soc/intel/boards/cht_bsw_max98090_ti.c

    Signed-off-by: Mengdong Lin
    Signed-off-by: Mark Brown

    Mengdong Lin
     

18 Nov, 2015

1 commit

  • Add kcontrol to the tlv callbacks in soc_bytes_ext, as it is
    needed for referencing the corresponding control in the driver
    code

    Also fix the only upstream user in topology core

    Signed-off-by: Mythri P K
    Signed-off-by: Jeeja KP
    Signed-off-by: Vinod Koul
    Signed-off-by: Mark Brown

    Mythri P K