16 Jan, 2015

6 commits

  • commit 3475c3d034d7f276a474c8bd53f44b48c8bf669d upstream.

    Flush the FIFOs when the stream is prepared for use. This avoids
    an inadvertent swapping of the left/right channels if the FIFOs are
    not empty at startup.

    Signed-off-by: Andrew Jackson
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Andrew Jackson
     
  • commit 681a19560378213a193c424881b2180a783b81ae upstream.

    When the codec is connected using i2c, it will only auto-increment
    register addresses if msb (0x80) of the register address byte is set.

    [Fixes cache sync if multiple adjacent registers are updated -- broonie]

    Signed-off-by: Peter Rosin
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Peter Rosin
     
  • commit bbc686b34650b0f54affe9d9a637ccbe02b03760 upstream.

    Fix off by one read beyond the end of a table.

    Reported-by: David Binderman
    Signed-off-by: Jyri Sarha
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Jyri Sarha
     
  • commit 48826ee590da03e9882922edf96d8d27bdfe9552 upstream.

    Commit 5fe5b767dc6f ("ASoC: dapm: Do not pretend to support controls for non
    mixer/mux widgets") revealed ill-defined control in a route between
    "STENL Mux" and DACs in max98090.c:

    max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACL
    max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACL
    max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACL
    max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACR
    max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACR
    max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACR

    Since there is no control between "STENL Mux" and DACs the control name must
    be NULL not "NULL".

    Signed-off-by: Jarkko Nikula
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Jarkko Nikula
     
  • commit 50c0f21b42dd4cd02b51f82274f66912d9a7fa32 upstream.

    Make sure to check the version field of the firmware header to make sure to
    not accidentally try to parse a firmware file with a different layout.
    Trying to do so can result in loading invalid firmware code to the device.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Lars-Peter Clausen
     
  • commit 077661b6ed24e530dabc9db3ab3ae48fbaf19679 upstream.

    The of_node_put() call in eukrea_tlv320_probe() may take an
    uninitialized pointer, as compiler spotted out:
    sound/soc/fsl/eukrea-tlv320.c:221:14: warning: 'ssi_np' may be used uninitialized in this function [-Wuninitialized]

    This patch adds the proper NULL initializations as a fix.
    (codec_np is also NULL initialized just for consistency.)

    Fixes: 66f232908de2 ('ASoC: eukrea-tlv320: Add DT support')
    Signed-off-by: Takashi Iwai
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

18 Nov, 2014

3 commits


17 Nov, 2014

1 commit


14 Nov, 2014

1 commit

  • On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound to happen
    5 seconds after the end of a playback.

    The SMALL_POP bit should fix this, but its definition is incorrect:
    according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not
    bit 1.

    Fix the definition accordingly and enable the bit as intended per the code
    comment.

    After applying this change, no loud 'click' sound is heard after playback

    Signed-off-by: Fabio Estevam
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Fabio Estevam
     

12 Nov, 2014

1 commit

  • In commit a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver"),
    the I2C part of the CS42L51 was moved to a separate file, but the
    definition of the of_device_id array was left in the driver file
    itself, no longer connected to the platform_driver structure using the
    .of_match_table pointer.

    This commit exports the of_device_id array in cs42l51, and uses it as
    .of_match_able in cs42l51-i2c.c. This solution was suggested by Brian
    Austin.

    Fixes: a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver")
    Signed-off-by: Thomas Petazzoni
    Acked-by: Brian Austin
    Signed-off-by: Mark Brown
    Cc:

    Thomas Petazzoni
     

06 Nov, 2014

3 commits


05 Nov, 2014

2 commits

  • The Baytrail-based chromebooks have a 20MHz mclk, the code was setting
    the divisor incorrectly in this case. According to the 98090
    datasheet, the divisor should be set to DIV1 for 10
    Signed-off-by: Mark Brown

    Dylan Reid
     
  • DPCM can update the FE/BE connection states totally asynchronously
    from the FE's PCM state. Most of FE/BE state changes are protected by
    mutex, so that they won't race, but there are still some actions that
    are uncovered. For example, suppose to switch a BE while a FE's
    stream is running. This would call soc_dpcm_runtime_update(), which
    sets FE's runtime_update flag, then sets up and starts BEs, and clears
    FE's runtime_update flag again.

    When a device emits XRUN during this operation, the PCM core triggers
    snd_pcm_stop(XRUN). Since the trigger action is an atomic ops, this
    isn't blocked by the mutex, thus it kicks off DPCM's trigger action.
    It eventually updates and clears FE's runtime_update flag while
    soc_dpcm_runtime_update() is running concurrently, and it results in
    confusion.

    Usually, for avoiding such a race, we take a lock. There is a PCM
    stream lock for that purpose. However, as already mentioned, the
    trigger action is atomic, and we can't take the lock for the whole
    soc_dpcm_runtime_update() or other operations that include the lengthy
    jobs like hw_params or prepare.

    This patch provides an alternative solution. This adds a way to defer
    the conflicting trigger callback to be executed at the end of FE/BE
    state changes. For doing it, two things are introduced:

    - Each runtime_update state change of FEs is protected via PCM stream
    lock.
    - The FE's trigger callback checks the runtime_update flag. If it's
    not set, the trigger action is executed there. If set, mark the
    pending trigger action and returns immediately.
    - At the exit of runtime_update state change, it checks whether the
    pending trigger is present. If yes, it executes the trigger action
    at this point.

    Reported-and-tested-by: Qiao Zhou
    Signed-off-by: Takashi Iwai
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Takashi Iwai
     

30 Oct, 2014

1 commit

  • Commit 14621c7e5e72 ("ASoC: Consolidate CPU and CODEC DAI lookup")
    consolidated the lookup of CPU DAIs and CODEC DAIs into a single function.
    When matching a component by name for CODEC DAIs the code previous to the
    patch compared the name in the DAI link table with component->name. For CPU
    DAIs the code compared to dev_name(component->dev). The newly introduced
    function ended up using the later as well.

    For most components dev_name(component->dev) and component->name are the
    same. The main notable exception are I2C devices where the driver name and
    the device name are concatenated to form the component name. By using
    dev_name(component->dev) instead of component->name the patch broke the
    matching of I2C CODECs by name.

    This patch restores the original behavior by using component->name instead
    of dev_name(component->dev). This will be safe even for CPU DAIs since for
    CPU DAIs both are the same.

    Fixes: 14621c7e5e72 ("ASoC: Consolidate CPU and CODEC DAI lookup")
    Reported-by: Dmitry Eremin-Solenikov
    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

29 Oct, 2014

4 commits


28 Oct, 2014

2 commits

  • The convention for i2c_device_id name does not need to have company prefix.

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

    Axel Lin
     
  • Kernel dump (WARN_ON) ocurred during system boot-up inside regmap_write():

    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 47 at kernel/locking/lockdep.c:2744 lockdep_trace_alloc+0xe8/0x108()
    DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))
    Modules linked in:
    CPU: 0 PID: 47 Comm: kworker/u2:2 Not tainted 3.18.0-rc1-10245-gb75d289-dirty #56
    Workqueue: deferwq deferred_probe_work_func
    Backtrace:
    [] (dump_backtrace) from [] (show_stack+0x18/0x1c)
    r6:8097c73c r5:8097c73c r4:00000000 r3:be33ba80
    [] (show_stack) from [] (dump_stack+0x8c/0xa4)
    [] (dump_stack) from [] (warn_slowpath_common+0x70/0x94)
    r6:80062838 r5:00000009 r4:bd827b30 r3:be33ba80
    [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x38/0x40)
    r8:00000004 r7:00000001 r6:000080d0 r5:60000193 r4:bd826010
    [] (warn_slowpath_fmt) from [] (lockdep_trace_alloc+0xe8/0x108)
    r3:80831590 r2:8082e160
    [] (lockdep_trace_alloc) from [] (kmem_cache_alloc+0x28/0x134)
    r5:000080d0 r4:be001f00
    [] (kmem_cache_alloc) from [] (regcache_rbtree_write+0x15c/0x648)
    r10:00000000 r9:0000001c r8:00000004 r7:00000001 r6:00000000 r5:bd819a00
    r4:00000000 r3:811aea88
    [] (regcache_rbtree_write) from [] (regcache_write+0x5c/0x64)
    r10:be3f9f88 r9:00000000 r8:00000004 r7:00000001 r6:00000000 r5:00000001
    r4:bd819a00
    [] (regcache_write) from [] (_regmap_raw_write+0x134/0x5f4)
    r6:be3f9f84 r5:00000001 r4:bd819a00 r3:00000001
    [] (_regmap_raw_write) from [] (_regmap_bus_raw_write+0x74/0x94)
    r10:00000000 r9:00000001 r8:be3fb080 r7:bd819a00 r6:00000001 r5:00000000
    r4:bd819a00
    [] (_regmap_bus_raw_write) from [] (_regmap_write+0x60/0x9c)
    r6:00000001 r5:00000000 r4:bd819a00 r3:8038b59c
    [] (_regmap_write) from [] (regmap_write+0x48/0x68)
    r7:bd81ad80 r6:00000001 r5:00000000 r4:bd819a00
    [] (regmap_write) from [] (fsl_asrc_dai_probe+0x34/0x104)
    r6:bd888628 r5:be3fb080 r4:be3b4410 r3:be3b442c
    ------------[ dump end ]------------

    =============================================================================
    2741 /*
    2742 * Oi! Can't be having __GFP_FS allocations with IRQs disabled.
    2743 */
    2744 if (DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)))
    2745 return;
    =============================================================================

    By looking at 2744 line, we can get that it's because regcache_rbtree_write()
    would call kmalloc() with GFP flag if it couldn't find an existing block to
    insert nodes while this kmalloc() call is inside a spin_lock_irq_save pair,
    i.e. IRQs disabled.

    Even though this may be a bug that should be fixed, I still try to send this
    patch as a quick fix (work around) since it does no harm to assign default
    values of every registers when using regcache.

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

    Nicolin Chen
     

27 Oct, 2014

1 commit


22 Oct, 2014

2 commits


20 Oct, 2014

1 commit


19 Oct, 2014

1 commit

  • Pull slave-dmaengine updates from Vinod Koul:
    "For dmaengine contributions we have:
    - designware cleanup by Andy
    - my series moving device_control users to dmanegine_xxx APIs for
    later removal of device_control API
    - minor fixes spread over drivers mainly mv_xor, pl330, mmp, imx-sdma
    etc"

    * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (60 commits)
    serial: atmel: add missing dmaengine header
    dmaengine: remove FSLDMA_EXTERNAL_START
    dmaengine: freescale: remove FSLDMA_EXTERNAL_START control method
    carma-fpga: move to fsl_dma_external_start()
    carma-fpga: use dmaengine_xxx() API
    dmaengine: freescale: add and export fsl_dma_external_start()
    dmaengine: add dmaengine_prep_dma_sg() helper
    video: mx3fb: use dmaengine_terminate_all() API
    serial: sh-sci: use dmaengine_terminate_all() API
    net: ks8842: use dmaengine_terminate_all() API
    mtd: sh_flctl: use dmaengine_terminate_all() API
    mtd: fsmc_nand: use dmaengine_terminate_all() API
    V4L2: mx3_camer: use dmaengine_pause() API
    dmaengine: coh901318: use dmaengine_terminate_all() API
    pata_arasan_cf: use dmaengine_terminate_all() API
    dmaengine: edma: check for echan->edesc => NULL in edma_dma_pause()
    dmaengine: dw: export probe()/remove() and Co to users
    dmaengine: dw: enable and disable controller when needed
    dmaengine: dw: always export dw_dma_{en,dis}able
    dmaengine: dw: introduce dw_dma_on() helper
    ...

    Linus Torvalds
     

16 Oct, 2014

1 commit


15 Oct, 2014

1 commit

  • Pull MFD updates from Lee Jones:
    "Changes to existing drivers:
    - DT clean-ups in da9055-core, max14577, rn5t618, arizona, hi6421, stmpe, twl4030
    - Export symbols for use in modules in max14577
    - Plenty of static code analysis/Coccinelle fixes throughout the SS
    - Regmap clean-ups in arizona, wm5102, wm5110, da9052, tps65217, rk808
    - Remove unused/duplicate code in da9052, 88pm860x, ti_ssp, lpc_sch, arizona
    - Bug fixes in ti_am335x_tscadc, da9052, ti_am335x_tscadc, rtsx_pcr
    - IRQ fixups in arizona, stmpe, max14577
    - Regulator related changes in axp20x
    - Pass DMA coherency information from parent => child in MFD core
    - Rename DT document files for consistency
    - Add ACPI support to the MFD core
    - Add Andreas Werner to MAINTAINERS for MEN F21BMC

    New drivers/supported devices:
    - New driver for MEN 14F021P00 Board Management Controller
    - New driver for Ricoh RN5T618 PMIC
    - New driver for Rockchip RK808
    - New driver for HiSilicon Hi6421 PMIC
    - New driver for Qualcomm SPMI PMICs
    - Add support for Intel Braswell in lpc_ich
    - Add support for Intel 9 Series PCH in lpc_ich
    - Add support for Intel Quark ILB in lpc_sch"

    [ Delayed to after the poweer/reset pull due to Kconfig problems with
    recursive Kconfig select/depends-on chains. - Linus ]

    * tag 'mfd-for-linus-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (79 commits)
    mfd: cros_ec: wait for completion of commands that return IN_PROGRESS
    i2c: i2c-cros-ec-tunnel: Set retries to 3
    mfd: cros_ec: move locking into cros_ec_cmd_xfer
    mfd: cros_ec: stop calling ->cmd_xfer() directly
    mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC
    MAINTAINERS: Adds Andreas Werner to maintainers list for MEN F21BMC
    mfd: arizona: Correct mask to allow setting micbias external cap
    mfd: Add ACPI support
    Revert "mfd: wm5102: Manually apply register patch"
    mfd: ti_am335x_tscadc: Update logic in CTRL register for 5-wire TS
    mfd: dt-bindings: atmel-gpbr: Rename doc file to conform to naming convention
    mfd: dt-bindings: qcom-pm8xxx: Rename doc file to conform to naming convention
    mfd: Inherit coherent_dma_mask from parent device
    mfd: Document DT bindings for Qualcomm SPMI PMICs
    mfd: Add support for Qualcomm SPMI PMICs
    mfd: dt-bindings: pm8xxx: Add new compatible string
    mfd: axp209x: Drop the parent supplies field
    mfd: twl4030-power: Use 'ti,system-power-controller' as alternative way to support system power off
    mfd: dt-bindings: twl4030-power: Use the standard property to mark power control
    mfd: syscon: Add Atmel GPBR DT bindings documention
    ...

    Linus Torvalds
     

08 Oct, 2014

9 commits