11 Jan, 2012

1 commit


23 Dec, 2011

1 commit


22 Dec, 2011

1 commit

  • DAI link endpoints and platform (DMA) devices are currently specified
    by name. When instantiating sound cards from device tree, it may be more
    convenient to refer to these devices by phandle in the device tree, and
    for code to describe DAI links using the "struct device_node *"
    ("of_node") those phandles map to.

    This change adds new fields to snd_soc_dai_link which can "name" devices
    using of_node, enhances soc_bind_dai_link() to allow binding based on
    of_node, and enhances snd_soc_register_card() to ensure that illegal
    combinations of name and of_node are not used.

    Signed-off-by: Stephen Warren
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Stephen Warren
     

20 Dec, 2011

2 commits


11 Dec, 2011

1 commit


09 Dec, 2011

1 commit


02 Dec, 2011

1 commit


28 Nov, 2011

1 commit


24 Nov, 2011

1 commit

  • A card is fully routed if the DAPM route table describes all connections on
    the board.

    When a card is fully routed, some operations can be automated by the ASoC
    core. The first, and currently only, such operation is described below, and
    implemented by this patch.

    Codecs often have a large number of external pins, and not all of these pins
    will be connected on all board designs. Some machine drivers therefore call
    snd_soc_dapm_nc_pin() for all the unused pins, in order to tell the ASoC core
    never to activate them.

    However, when a card is fully routed, the information needed to derive the
    set of unused pins is present in card->dapm_routes. In this case, have
    the ASoC core automatically call snd_soc_dapm_nc_pin() for each unused
    codec pin.

    This has been tested with soc/tegra/tegra_wm8903.c and soc/tegra/trimslice.c.

    Signed-off-by: Stephen Warren
    Signed-off-by: Mark Brown

    Stephen Warren
     

23 Nov, 2011

3 commits

  • Mark Brown
     
  • There are cases where there is no working codec on the soc-audio devices,
    and snd_soc_suspend() will skip such device when suspending. Yet its
    counterpart snd_soc_resume() does not check this, causing complaints
    about spinlock lockup:

    [ 176.726087] BUG: spinlock lockup on CPU#0, kworker/0:2/1067, d8ab82a8
    [ 176.732539] [] (unwind_backtrace+0x0/0xec) from [] (dump_stack+0x20/0x24)
    [ 176.741082] [] (dump_stack+0x20/0x24) from [] (do_raw_spin_lock+0x118/0x158)
    [ 176.749882] [] (do_raw_spin_lock+0x118/0x158) from [] (_raw_spin_lock_irqsave+0x5c/0x68)
    [ 176.759723] [] (_raw_spin_lock_irqsave+0x5c/0x68) from [] (__wake_up+0x2c/0x5c)
    [ 176.768781] [] (__wake_up+0x2c/0x5c) from [] (soc_resume_deferred+0x3c/0x2b0)
    [ 176.777666] [] (soc_resume_deferred+0x3c/0x2b0) from [] (process_one_work+0x2e8/0x50c)
    [ 176.787334] [] (process_one_work+0x2e8/0x50c) from [] (worker_thread+0x1c8/0x2e0)
    [ 176.796566] [] (worker_thread+0x1c8/0x2e0) from [] (kthread+0xa4/0xb0)
    [ 176.804843] [] (kthread+0xa4/0xb0) from [] (kernel_thread_exit+0x0/0x8)

    Signed-off-by: Eric Miao
    Signed-off-by: Mark Brown

    Eric Miao
     
  • Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
    introduced the possibility to have constant DAI ops structures, yet this is
    barley used in both existing drivers and also new drivers being submitted,
    although none of them modifies its DAI ops structure. The later is not
    surprising since existing drivers are often used as templates for new drivers.
    So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
    the issue altogether.

    The patch was generated with the following coccinelle semantic patch:
    //
    @@
    identifier ops;
    @@
    -struct snd_soc_dai_ops ops =
    +const struct snd_soc_dai_ops ops =
    { ... };
    //

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

    Lars-Peter Clausen
     

18 Oct, 2011

1 commit


12 Oct, 2011

1 commit


09 Oct, 2011

1 commit


08 Oct, 2011

1 commit

  • Ensure we only have one sync during the initial startup of the card by
    making snd_soc_dapm_sync() a noop on non-instantiated cards. This avoids
    any bounces due to things like jacks reporting their initial state on
    partially initialised cards. The callers that don't also get called at
    runtime should just be removed.

    Signed-off-by: Mark Brown

    Mark Brown
     

06 Oct, 2011

3 commits


04 Oct, 2011

2 commits

  • In order to reduce the number of DAPM power checks we run keep a list of
    widgets which have been changed since the last DAPM run and iterate over
    that rather than the full widget list. Whenever we change the power state
    for a widget we add all the source and sink widgets it has to the dirty
    list, ensuring that all widgets in the path are checked.

    This covers more widgets than we need to as some of the neighbour widgets
    won't be connected but it's simpler as a first step. On one system I tried
    this gave:

    Power Path Neighbour
    Before: 207 1939 2461
    After: 114 1066 1327

    which seems useful.

    Signed-off-by: Mark Brown

    Mark Brown
     
  • The DAI init function may want to do something that needs the widgets to
    be instantiated.

    Signed-off-by: Mark Brown

    Mark Brown
     

28 Sep, 2011

1 commit

  • For almost all machines the DAI format is a constant, always set to the
    same thing. This means that not only should we normally set it on init
    rather than in hw_params() (where it has been for historical reasons) we
    should also allow users to configure this by setting a variable in the
    dai_link structure. The combination of these two will make many machine
    drivers even more data driven.

    Implement a new dai_fmt field in the dai_link doing just that. Since 0 is
    a valid value for many format flags and we need to be able to tell if the
    field is actually set also add one to all the values used to configure
    formats.

    Signed-off-by: Mark Brown

    Mark Brown
     

21 Sep, 2011

2 commits


09 Sep, 2011

1 commit


31 Aug, 2011

4 commits


23 Aug, 2011

3 commits


01 Aug, 2011

1 commit


26 Jul, 2011

1 commit

  • In preparation for Dynamic PCM (AKA DSP) support.

    This adds a callback function to be called at the completion of a DAPM stream
    event.

    This can be used by DSP components to perform calculations based on DAPM graphs
    after completion of stream events.

    Signed-off-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Liam Girdwood
     

19 Jul, 2011

2 commits

  • In one comment, cpu_dai was mentioned although codec_dai was used in the
    code. Also, fix the name for the card dai list which has no seperation
    into card_dai and codec_dai.

    Signed-off-by: Wolfram Sang
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Wolfram Sang
     
  • Since quite a few drivers are not managing to flag the cache as needing
    to be resynced after suspend and it's a reasonable thing to do flag the
    cache as needing sync automatically when suspending.

    The expectation is that systems will mainly only keep the CODEC powered
    when doing audio through the CODEC so we won't actually suspend the
    device anyway; drivers which want to can override this behaviour when
    they resume.

    Signed-off-by: Mark Brown
    Acked-by: Liam Girdwood
    Cc: stable@kernel.org

    Mark Brown
     

09 Jul, 2011

1 commit


06 Jul, 2011

2 commits