08 Jan, 2012

1 commit

  • This is a follow up on 53dea36c70c1857 which fixes the other affected
    pcm engines.

    Description from 53dea36c70c1857:
    Don't rely on the codec's channels_min information to decide wheter or
    not allocate a substream's DMA buffer. Rather check if the substream
    itself was allocated previously.

    Without this patch I was seeing null-pointer dereferenc in atmel-pcm.

    Signed-off-by: Joachim Eastwood
    Signed-off-by: Mark Brown

    Joachim Eastwood
     

23 Dec, 2011

1 commit


20 Dec, 2011

2 commits

  • This driver is parameterized in two ways:

    a) Platform data, which supplies the set of GPIOs used by the driver.
    These GPIOs can now be parsed out of device tree.

    b) Machine-specific DAPM route arrays embedded into the ASoC machine
    driver itself. Historically, the driver picks the appropriate array
    to use using machine_is_*(). The driver now requires this array to
    be parsed from device tree when instantiated through device tree,
    using the core ASoC support for this parsing.

    Based on work by John Bonesio, but significantly reworked since then.

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

    Stephen Warren
     
  • At this stage only Toshiba AC100/Dynabook supported.

    Signed-off-by: Leon Romanovsky
    Signed-off-by: Andrey Danin
    Acked-by: Stephen Warren
    Signed-off-by: Mark Brown

    Leon Romanovsky
     

08 Dec, 2011

1 commit

  • Move DAS routing setup into the DAS driver itself. This removes the need
    to duplicate this in each machine driver, of which we'll soon have three.

    An added advantage is that the machine drivers no longer call the Tegra20-
    specific DAS functions by name, so the machine driver no longer needs to
    be split up into Tegra20 and Tegra30 versions.

    If individual machine drivers need a different routing setup to this
    default, they can still call the DAS functions to set that up.

    Long-term, DAS will be a codec driver, and user-space will be able to
    control its routing, possibly within constraints that the machine driver
    sets up. Configuring the DAS routing from the DAS driver is a very slight
    move in that direction.

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

    Stephen Warren
     

30 Nov, 2011

1 commit


29 Nov, 2011

2 commits


24 Nov, 2011

3 commits

  • Set card.fully_routed to request the ASoC core calculated unused codec
    pins, and call snd_soc_dapm_nc_pin() for them. Remove the open-coded
    calls.

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

    Stephen Warren
     
  • Set card.fully_routed to request the ASoC core calculated unused codec
    pins, and call snd_soc_dapm_nc_pin() for them. Remove the open-coded
    calls.

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

    Stephen Warren
     
  • When devices are instantiated from device-tree, pdev->id is set to -1.
    Rework the driver so it doesn't depend on the ID.

    Tegra I2S instantiated from board files are configured with pdev
    name "tegra-i2s" and ID 0 or 1. The driver core then names the
    device "tegra-i2s.0" or "tegra-i2s.1". This is not changing.

    When a device is instantiated from device-tree, it will have
    pdev->name="" and pdev->id=-1. For this reason, the pdev->id value is
    not something we can rely on.

    This patch doesn't actually change any names though:

    When a device is instantiated from device-tree, the overall device name
    will be "${unit_address}.${node_name}". This causes issues such as
    clk_get() failures due to lack of a device-name match. To solve that,
    AUXDATA was invented, to force a specific device name, thus allowing
    dev_name() to return the same as the non-device-tree case. Tegra
    currently uses AUXDATA for the I2S controllers. Eventually, AUXDATA will
    go away, most likely replaced by phandle-based references within the
    device tree.

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

    Stephen Warren
     

23 Nov, 2011

8 commits


01 Nov, 2011

1 commit


18 Oct, 2011

1 commit

  • Fixes the following sparse warnings:

    sound/soc/tegra/tegra_das.c:215:8: warning: Using plain integer as NULL pointer
    sound/soc/tegra/tegra_das.c:237:8: warning: Using plain integer as NULL pointer
    sound/soc/tegra/tegra_pcm.c:370:32: warning: symbol 'tegra_pcm_platform' was not declared. Should it be static?

    Signed-off-by: Olof Johansson
    Acked-by: Stephen Warren
    Signed-off-by: Mark Brown

    Olof Johansson
     

08 Oct, 2011

1 commit


03 Oct, 2011

2 commits


24 Aug, 2011

1 commit

  • Board file support for Ventana is not yet mainlined, and probably won't
    ever be given the move to Device-Tree. Consequently, the Ventana entry
    is being removed from arch/arm/tools/mach-types in the next merge window,
    since it was registered over a year ago.

    This will also remove function machine_is_ventana(), which is used by
    the ASoC Tegra WM8903 machine driver. This will cause compilation
    failures. Drop Ventana support to resolve this.

    Hopefully, in the not-too-distant future, tegra_wm8903.c will be able to
    configure itself from Device-Tree, and hence we'll be able to re-instate
    Ventana support just by creating a .dts file for the board.

    Also note that Aebl support is in a similar boat. However, that board
    isn't scheduled for deprecation for at least another 5 months, and
    perhaps we will have completely removed non-Device-Tree support from
    tegra_wm8903.c by then and/or adjusted mach-types policy.

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

    Stephen Warren
     

09 Aug, 2011

2 commits

  • Two issues were preventing module snd-soc-tegra-wm8903.ko from being
    removed and re-inserted:

    a) The speaker-enable GPIO is hosted by the WM8903 chip. This GPIO must
    be freed before snd_soc_unregister_card() is called, because that
    triggers wm8903.c:wm8903_remove(), which calls gpiochip_remove(), which
    then fails if any of the GPIOs are in use. To solve this, free all GPIOs
    first, so the code doesn't care where they come from.

    b) We need to call snd_soc_jack_free_gpios() to match the call to
    snd_soc_jack_add_gpios() during initialization. Without this, the
    call to snd_soc_jack_add_gpios() fails during any subsequent modprobe
    and initialization, since the GPIO and IRQ are already registered. In
    turn, this causes the headphone state not to be monitored, so the
    headphone is assumed not to be plugged in, and the audio path to it is
    never enabled.

    Signed-off-by: Stephen Warren
    Cc: stable@kernel.org
    Signed-off-by: Mark Brown

    Stephen Warren
     
  • Not all PCM devices have all sub-streams. Specifically, the SPDIF driver
    only supports playback and hence has no capture substream. Check whether
    a substream exists before dereferencing it, when de-allocating DMA
    buffers in tegra_pcm_deallocate_dma_buffer.

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

    Stephen Warren
     

06 Jul, 2011

1 commit

  • This is a minimal driver for the Tegra SPDIF controller.

    In hardware, the SPDIF output signal is always routed to any active HDMI
    display controllers, and may also be routed to external pins on Tegra
    using the pinmux.

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

    Stephen Warren
     

04 Jul, 2011

3 commits

  • Mark Brown
     
  • The clock needed by the I2S driver is associated with the I2S device name
    in the standard fashion. Hence, use clk_get(dev) instead of clk_get_sys(clk_name).

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

    Stephen Warren
     
  • The I2S controller needs a clock to respond to register writes. Without
    this, register writes will at worst hang the CPU. In practice, I've only
    observed writes being dropped.

    Luckily, the dropped register writes historically had no effect:

    TEGRA_I2S_TIMING: The value we wrote was the reset default.

    TEGRA_I2S_FIFO_SCR: The default was for the FIFOs to request more data
    when one slot was empty. The requested value was for the FIFOs to request
    when four slots were empty. The DMA controller in the mainline kernel is
    configured to burst a single entry at a time into the FIFO, hence there
    was no issue. The only negative effect was on bus efficiency losses due
    to an increased number of arbitration attempts.

    However, in various non-upstream changes, the DMA controller now bursts
    four entries at a time into the FIFO. If there is only space for one
    entry, the data is simply dropped. In practice, this resulted in 3/4 of
    samples being dropped, and playback at 4x the expected rate and pitch.
    By fixing the clocking issue, this is solved.

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

    Stephen Warren
     

08 Jun, 2011

1 commit


30 May, 2011

1 commit


27 May, 2011

1 commit

  • We want the default state of the HP_MUTE signal to be asserted, so that
    the headphones are muted before the first audio playback. Without this,
    the headphones are left unmuted until shortly after the first audio
    playback completes.

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

    Stephen Warren
     

20 May, 2011

1 commit


04 May, 2011

1 commit


26 Apr, 2011

1 commit


21 Apr, 2011

2 commits


20 Apr, 2011

1 commit

  • Replace calls to a variety of registration functions by updating
    struct snd_soc_card snd_soc_tegra_wm8903 to directly point at the
    various control/widget/map tables instead. The ASoC core now
    performs any required registration based on these data fields.

    (Applying Mark's TrimSlice review comments to the existing driver)

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

    Stephen Warren