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


24 Nov, 2011

1 commit


23 Nov, 2011

1 commit

  • 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
     

01 Nov, 2011

1 commit


03 Oct, 2011

1 commit


16 Sep, 2011

4 commits

  • Current method for machine driver to register with the ASoC core is to use
    snd_soc_register_card() instead of creating a "soc-audio" platform device.

    Signed-off-by: Mika Westerberg
    Reviewed-by: Ryan Mallon
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Mika Westerberg
     
  • Current method for machine driver to register with the ASoC core is to
    use snd_soc_register_card() instead of creating a "soc-audio" platform device.

    In addition we use platform_device_register_simple() to create a platform
    device for the codec. This function will handle putting and deleting the
    device automatically which simplifies the error handling in the machine
    driver.

    Signed-off-by: Mika Westerberg
    Reviewed-by: Ryan Mallon
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Mika Westerberg
     
  • To get the PCM module loaded automatically by udev et al. we need to add a
    proper MODULE_ALIAS.

    Signed-off-by: Mika Westerberg
    Reviewed-by: Ryan Mallon
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Mika Westerberg
     
  • Current method for machine driver to register with the ASoC core is to use
    snd_soc_register_card() instead of creating a "soc-audio" platform device.

    Signed-off-by: Mika Westerberg
    Reviewed-by: Ryan Mallon
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Mika Westerberg
     

23 Aug, 2011

1 commit

  • Introduce a new label that includes kfree and jump to that one.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    identifier x;
    expression E1!=0,E2,E3,E4;
    statement S;
    iterator I;
    @@

    (
    if (...) { ... when != kfree(x)
    when != x = E3
    when != E3 = x
    * return ...;
    }
    ... when != x = E2
    when != I(...,x,...) S
    if (...) { ... when != x = E4
    kfree(x); ... return ...; }
    )
    //

    Signed-off-by: Julia Lawall
    Acked-by: Alexander Sverdlin
    Reviewed-by: H Hartley Sweeten
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Julia Lawall
     

26 Jul, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    fs: Merge split strings
    treewide: fix potentially dangerous trailing ';' in #defined values/expressions
    uwb: Fix misspelling of neighbourhood in comment
    net, netfilter: Remove redundant goto in ebt_ulog_packet
    trivial: don't touch files that are removed in the staging tree
    lib/vsprintf: replace link to Draft by final RFC number
    doc: Kconfig: `to be' -> `be'
    doc: Kconfig: Typo: square -> squared
    doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
    drivers/net: static should be at beginning of declaration
    drivers/media: static should be at beginning of declaration
    drivers/i2c: static should be at beginning of declaration
    XTENSA: static should be at beginning of declaration
    SH: static should be at beginning of declaration
    MIPS: static should be at beginning of declaration
    ARM: static should be at beginning of declaration
    rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
    Update my e-mail address
    PCIe ASPM: forcedly -> forcibly
    gma500: push through device driver tree
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
    - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
    - drivers/net/r8169.c (just context changes)

    Linus Torvalds
     

24 Jul, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (297 commits)
    ALSA: asihpi - Replace with snd_ctl_boolean_mono_info()
    ALSA: asihpi - HPI version 4.08
    ALSA: asihpi - Add volume mute controls
    ALSA: asihpi - Control name updates
    ALSA: asihpi - Use size_t for sizeof result
    ALSA: asihpi - Explicitly include mutex.h
    ALSA: asihpi - Add new node and message defines
    ALSA: asihpi - Make local function static
    ALSA: asihpi - Fix minor typos and spelling
    ALSA: asihpi - Remove unused structures, macros and functions
    ALSA: asihpi - Remove spurious adapter index check
    ALSA: asihpi - Revise snd_pcm_debug_name, get rid of DEBUG_NAME macro
    ALSA: asihpi - DSP code loader API now independent of OS
    ALSA: asihpi - Remove controlex structs and associated special data transfer code
    ALSA: asihpi - Increase request and response buffer sizes
    ALSA: asihpi - Give more meaningful name to hpi request message type
    ALSA: usb-audio - Add quirk for Roland / BOSS BR-800
    ALSA: hda - Remove a superfluous argument of via_auto_init_output()
    ALSA: hda - Fix indep-HP path (de-)activation for VT1708* codecs
    ALSA: hda - Add documentation for codec-specific mixer controls
    ...

    Linus Torvalds
     

16 Jun, 2011

1 commit

  • I no longer work at Bluewater Systems. Update my email address accordingly. I
    have deleted my email address from C files rather than change it. This
    was suggested by several people, since the commit from my new email
    address will cause scripts/get_maintainer.pl to function properly. I
    have not added the .mailmap entry as suggested by Joe because I think
    it is no longer necessary if I touch all the files which had my name
    in them.

    Signed-off-by: Ryan Mallon
    Cc: Andre Renaud
    Cc: H Hartley Sweeten
    Cc: Russell King
    Cc: Nicolas Ferre
    Cc: Andrew Victor
    Cc: David Woodhouse
    Cc: Anton Vorontsov
    Cc: Paul Mundt
    Cc: Liam Girdwood
    Cc: Mark Brown
    Cc: Alan Cox
    Cc: Joe Perches
    Cc: Jesper Juhl
    Cc: Andrew Morton
    Cc: trivial@kernel.org
    Cc: linux-kernel@vger.kernel.org
    Reviewed-by: Jesper Juhl
    Signed-off-by: Jiri Kosina

    Ryan Mallon
     

09 Jun, 2011

1 commit

  • Now that we have the EP93xx DMA engine driver in place, we convert the ASoC
    drivers (I2S, AC97 and PCM) to take advantage of this new API. There are no
    functional changes.

    Signed-off-by: Mika Westerberg
    Acked-by: H Hartley Sweeten
    Acked-by: Liam Girdwood
    Acked-by: Mark Brown
    Acked-by: Vinod Koul
    Signed-off-by: Grant Likely

    Mika Westerberg
     

08 Jun, 2011

1 commit


09 Mar, 2011

3 commits


08 Mar, 2011

1 commit


04 Feb, 2011

1 commit


24 Jan, 2011

1 commit


17 Jan, 2011

1 commit

  • Changelog:
    1. I2S module of EP93xx should be feed by 32bit DMA transfers. This is
    hardware limitation and that's the way original Cirrus's driver worked.
    This will fix distorted sound playback and make capture actually work in
    present ep93xx drivers.

    I've found, that author of code, on which modern ep93xx-i2s.c and
    ep93xx-pcm.c are based, had faced this problem also in 2007:
    http://blog.gmane.org/gmane.linux.ports.arm.cirrus/month=20070101/page=3

    Now SoC code uses his developments, but not overcomes the hardware
    issues. Some details from EP93xx users guide:

    Both I2S transmitter and receiver have similar 16x32bit FIFO, where they
    store 8 samples for both left and right channels. The FIFO is always
    32bit wide and should be properly aligned if you use samples of other
    width. Transmitter and receiver have configuration registers for
    selection of I2S word length (16, 24, 32). They are I2STXWrdLen and
    I2SRXWrdLen.

    Yes, EP93xx DMA can do byte, word and quad-word transfers. The width for
    transfers to and from peripherals is selected by particular module
    configuration. Lucky AC97 module has such configuration: AC97RXCRx
    registers, bit CM (Compact mode enable) switches between 16 and 32 bit
    samples. AC97TXCRx registers have the same bits for transmitters.
    ep93xx-ac97.c enables this compact mode and so has all the rights to use
    S16_LE format.
    No one has found such a configuration in I2S module until now in any
    Cirrus manuals. I2S module always feeds it's 32bit wide FIFO with 32bit
    samples consecutively for left and right channels. You cannot use 32-bit
    DMA transfers to transfer two 16-bit samples.

    So we can use two formats for AC97, but should remove all but S32_LE for
    I2S. Always using 32 bit chunks is not a problem for I2S, the codec I
    use uses less bits too (24), it's permitted by I2S standard.

    In proposed patch formats list shortened to just S32_LE, this makes all
    the DMA transactions right, while ALSA will do all sample format
    translation for us.

    2. Incorrect setting of LRCLK (2 times slower) in original ep93xx-i2s.c
    masks the first problem.

    DMA takes two 16 bit samples instead of one, overall sound speed seems
    to be normal, but you get actually 4000 sampling rate instead of
    requested 8000 and therefore some noise... This is also the reason why
    the capture function not worked at all in this driver...

    If we take a look into I2S specification, we will figure that LRCLK MUST
    be equal to sample rate, if we are talking about stereo (in mono too,
    but it's not our case at all).

    In proposed patch SCLK and LRCLK rates are corrected, assuming we always
    send 32 bits * 2 channels to codec.

    Signed-off-by: Alexander Sverdlin
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Alexander Sverdlin
     

09 Dec, 2010

1 commit


25 Nov, 2010

2 commits


22 Nov, 2010

1 commit


06 Nov, 2010

1 commit

  • Decoupling Dynamic Audio Power Management (DAPM) from codec devices is
    required when developing ASoC further. Such as for other ASoC components to
    have DAPM widgets or when extending DAPM to handle cross-device paths.

    This patch decouples DAPM related variables from struct snd_soc_codec and
    moves them to new struct snd_soc_dapm_context that is used to encapsulate
    DAPM context of a device. ASoC core and API of DAPM functions are modified
    to use DAPM context instead of codec.

    This patch does not change current functionality and a large part of changes
    come because of structure and internal API changes.

    Core implementation is from Liam Girdwood with some
    minor core changes, codecs and machine driver conversions from
    Jarkko Nikula .

    Signed-off-by: Liam Girdwood
    Signed-off-by: Jarkko Nikula
    Cc: Nicolas Ferre
    Cc: Manuel Lauss
    Cc: Mike Frysinger
    Cc: Cliff Cai
    Cc: Kevin Hilman
    Cc: Ryan Mallon
    Cc: Timur Tabi
    Cc: Sascha Hauer
    Cc: Lars-Peter Clausen
    Cc: Arnaud Patard (Rtp)
    Cc: Wan ZongShun
    Cc: Eric Miao
    Cc: Jassi Brar
    Cc: Daniel Gloeckner
    Cc: Kuninori Morimoto
    Signed-off-by: Mark Brown

    Liam Girdwood
     

15 Oct, 2010

2 commits


12 Aug, 2010

1 commit

  • This patch extends the ASoC API to allow sound cards to have more than one
    CODEC and more than one platform DMA controller. This is achieved by dividing
    some current ASoC structures that contain both driver data and device data into
    structures that only either contain device data or driver data. i.e.

    struct snd_soc_codec ---> struct snd_soc_codec (device data)
    +-> struct snd_soc_codec_driver (driver data)

    struct snd_soc_platform ---> struct snd_soc_platform (device data)
    +-> struct snd_soc_platform_driver (driver data)

    struct snd_soc_dai ---> struct snd_soc_dai (device data)
    +-> struct snd_soc_dai_driver (driver data)

    struct snd_soc_device ---> deleted

    This now allows ASoC to be more tightly aligned with the Linux driver model and
    also means that every ASoC codec, platform and (platform) DAI is a kernel
    device. ASoC component private data is now stored as device private data.

    The ASoC sound card struct snd_soc_card has also been updated to store lists
    of it's components rather than a pointer to a codec and platform. The PCM
    runtime struct soc_pcm_runtime now has pointers to all its components.

    This patch adds DAPM support for ASoC multi-component and removes struct
    snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
    or runtime PCM level basis rather than using snd_soc_socdev.

    Other notable multi-component changes:-

    * Stream operations now de-reference less structures.
    * close_delayed work() now runs on a DAI basis rather than looping all DAIs
    in a card.
    * PM suspend()/resume() operations can now handle N CODECs and Platforms
    per sound card.
    * Added soc_bind_dai_link() to bind the component devices to the sound card.
    * Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
    DAI link components.
    * sysfs entries can now be registered per component per card.
    * snd_soc_new_pcms() functionailty rolled into dai_link_probe().
    * snd_soc_register_codec() now does all the codec list and mutex init.

    This patch changes the probe() and remove() of the CODEC drivers as follows:-

    o Make CODEC driver a platform driver
    o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
    o Removed all static codec pointers (drivers now support > 1 codec dev)
    o snd_soc_register_pcms() now done by core.
    o snd_soc_register_dai() folded into snd_soc_register_codec().

    CS4270 portions:
    Acked-by: Timur Tabi

    Some TLV320aic23 and Cirrus platform fixes.
    Signed-off-by: Ryan Mallon

    TI CODEC and OMAP fixes
    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Janusz Krzysztofik
    Signed-off-by: Jarkko Nikula

    Samsung platform and misc fixes :-
    Signed-off-by: Chanwoo Choi
    Signed-off-by: Joonyoung Shim
    Signed-off-by: Kyungmin Park
    Reviewed-by: Jassi Brar
    Signed-off-by: Seungwhan Youn

    MPC8610 and PPC fixes.
    Signed-off-by: Timur Tabi

    i.MX fixes and some core fixes.
    Signed-off-by: Sascha Hauer

    J4740 platform fixes:-
    Signed-off-by: Lars-Peter Clausen

    CC: Tony Lindgren
    CC: Nicolas Ferre
    CC: Kevin Hilman
    CC: Sascha Hauer
    CC: Atsushi Nemoto
    CC: Kuninori Morimoto
    CC: Daniel Gloeckner
    CC: Manuel Lauss
    CC: Mike Frysinger
    CC: Arnaud Patard
    CC: Wan ZongShun

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

    Liam Girdwood
     

09 Jun, 2010

1 commit


07 Jun, 2010

1 commit