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
     

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
     

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
     

09 Mar, 2011

2 commits

  • Enable 192kHz sample rate for EP93xx.

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

    Alexander Sverdlin
     
  • Improve EP93xx I2S clocks management.
    Some freqs values are set not exact as they requested for MCLK and
    original code was not able to find divisors for SCLK and LRCLK.
    This code just picks up nearest value from 3 possible variants.
    This patch makes 44100 and 192000 rates working and fixes
    capture function (by selecting SCLK/LRCLK=64 where possible).
    All other rates should work as before.

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

    Alexander Sverdlin
     

08 Mar, 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


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
     

07 Jun, 2010

1 commit