ASoC: davinci-pcm: comments for the conversion to BATCH mode

    In the previous commit 'ASoC: davinci-pcm: convert to BATCH mode', the phase
    offset of 2 was mentioned in the commit message but not well commented in the
    source.

    Add descriptive comments of the phase offset with and without ping-pong
    buffers enabled.

    Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
    Acked-by: Liam Girdwood <lrg@ti.com>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
x86, build: Do not set the root_dev field in bzImage

    This has been obsoleted by the root= commandline and the rdev utility
    for many, many years.  People who still depend on this will surely
    have a copy of the rdev utility around, the rest of the world gets rid
    of another piece of buildhost-dependent data in the build. Thanks to
    Paul Bolle for the build.c cleanup.

    Cc: Paul Bolle <pebolle@tiscali.nl>
    Signed-off-by: Michal Marek <mmarek@suse.cz>
    Link: http://lkml.kernel.org/r/1302607824-24699-1-git-send-email-mmarek@suse.cz
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
ASoC: Fix comment in cs4270 codec driver

    The comment does not reflect reality anymore since the multi-component
    monster patch landed. Things are matched by names now, and not by
    exporting and referencing a struct. Fix it to avoid confusion.

    Signed-off-by: Daniel Mack <zonque@gmail.com>
    Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
    Acked-by: Timur Tabi <timur@freescale.com>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: trivial: typo in atmel_pcm_dma_params strucutre comment

    Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
    Acked-by: Liam Girdwood <lrg@ti.com>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: atmel_ssc_dai: fix ssc error path

    We do not have to free a resource that is not allocated yet.

    Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
    Acked-by: Liam Girdwood <lrg@ti.com>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Convert 7x9 write to use cpu_to_be16()

    Run the data through cpu_to_be16() so it's at least clear what we're up to.

    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Acked-by: Liam Girdwood <lrg@ti.com>
ASoC: Use cpu_to_be16() in 8x16 write

    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Acked-by: Liam Girdwood <lrg@ti.com>
ASoC: Use explicit endianness conversion in snd_soc_16_8_write()

    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
    Acked-by: Liam Girdwood <lrg@ti.com>
ASoC: Tegra: Enable Kaen HP_MUTE at boot

    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 <swarren@nvidia.com>
    Acked-by: Liam Girdwood <lrg@ti.com>
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
perf: Optimize ctx_sched_out()

    Oleg noted that ctx_sched_out() disables the PMU even though it might
    not actually do something, avoid needless PMU-disabling.

    Reported-by: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20110409192141.665385503@chello.nl
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
perf: Clean up 'ctx' reference counting

    Small cleanup to how we refcount in find_get_context(), this also
    allows us to use put_ctx() to free things instead of using kfree().

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20110409192141.719340481@chello.nl
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
perf: Optimize event scheduling locking

    Currently we only hold one ctx->lock at a time, which results in us
    flipping back and forth between cpuctx->ctx.lock and task_ctx->lock.

    Avoid this and gain large atomic regions by holding both locks. We
    nest the task lock inside the cpu lock, since with task scheduling we
    might have to change task ctx while holding the cpu ctx lock.

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20110409192141.769881865@chello.nl
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
perf: Remove task_ctx_sched_in()

    Make task_ctx_sched_*() imply EVENT_ALL, since anything less will not
    actually have scheduled the task in/out at all.

    Since there's no site that schedules all of a task in (due to the
    interleave with flexible cpuctx) we can remove this function.

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20110409192141.817893268@chello.nl
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
perf: Simplify and fix __perf_install_in_context()

    Currently __perf_install_in_context() will try and schedule in the
    event irrespective of our event scheduling rules, that is, we try to
    schedule CPU-pinned, TASK-pinned, CPU-flexible, TASK-flexible, but
    when creating a new event we simply try and schedule it on top of
    whatever is already on the PMU, this can lead to errors for pinned
    events.

    Therefore, simplify things and simply schedule everything out, add the
    event to the corresponding context and schedule everything back in.

    This also nicely handles the case where with
    __ARCH_WANT_INTERRUPTS_ON_CTXSW the IPI can come right in the middle
    of schedule, before we managed to call perf_event_task_sched_in().

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20110409192141.870894224@chello.nl
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
perf: Change and simplify ctx::is_active semantics

    Instead of tracking if a context is active or not, track which events
    of the context are active. By making it a bitmask of
    EVENT_PINNED|EVENT_FLEXIBLE we can simplify some of the scheduling
    routines since it can avoid adding events that are already active.

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20110409192141.930282378@chello.nl
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
perf: Collect the schedule-in rules in one function

    This was scattered out - refactor it into a single function.
    No change in functionality.

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20110409192141.979862055@chello.nl
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
perf: Change close() semantics for group events

    In order to always call list_del_event() on the correct cpu if the
    event is part of an active context and avoid having to do two IPIs,
    change the close() semantics slightly.

    The current perf_event_disable() call would disable a whole group if
    the event that's being closed is the group leader, whereas the new
    code keeps the group siblings enabled.

    People should not rely on this behaviour and I don't think they do,
    but in case we find they do, the fix is easy and we have to take the
    double IPI cost.

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Vince Weaver <vweaver1@eecs.utk.edu>
    Link: http://lkml.kernel.org/r/20110409192142.038377551@chello.nl
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
perf: De-schedule a task context when removing the last event

    Since perf_install_in_context() will now install a context when we
    add the first event, we can de-schedule the context when the last
    event is removed.

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/20110409192142.090431763@chello.nl
    Signed-off-by: Ingo Molnar <mingo@elte.hu>