09 Dec, 2012

1 commit


04 Apr, 2012

1 commit

  • In order to support CODECCODEC links remove the assumption that there
    is only a single CODEC on a DAI link by removing the use of the CODEC
    pointer in the rtd from the CODEC drivers. They are already being passed
    their DAI whenever they are passed an rtd and can get the CODEC from
    there.

    Signed-off-by: Mark Brown

    Mark Brown
     

27 Dec, 2011

1 commit


20 Dec, 2011

1 commit


05 Dec, 2011

3 commits


02 Dec, 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
     

29 Dec, 2010

1 commit

  • The multi-component patch(commit f0fba2ad1) moved the allocation of the
    register cache from the driver to the ASoC core. Most drivers where adjusted to
    this, but there are quite a few drivers left which now have an unused reg_cache field in
    their private device struct.
    This patch removes these unused fields.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

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
     

08 Sep, 2010

1 commit


31 Aug, 2010

1 commit

  • Disable some codec modules in standby mode, completely disable
    codec in off mode to save some power.
    Fix suspend/resume: mark mixer regs as dirty on resume to
    restore mixer values, otherwise driver produces no sound
    (master is muted by default).

    Signed-off-by: Vasily Khoruzhick
    Acked-by: Marek Vasut
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Vasily Khoruzhick
     

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
     

10 May, 2010

1 commit


17 Apr, 2010

1 commit

  • One of the features of the multi CODEC work is that it embeds a struct
    device in the CODEC to provide diagnostics via a sysfs class rather than
    via the device tree, at which point it's much better to use the struct
    device private data rather than having two places to store it. Provide
    an accessor function to allow this change to be made more easily, and
    update all the CODEC drivers are updated.

    To ensure use of the accessor the private data structure member is
    renamed, meaning that if code developed with older an older core that
    still uses private_data is merged it will fail to build.

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

    Mark Brown
     

07 Mar, 2010

1 commit

  • Rename for_each_bit to for_each_set_bit in the kernel source tree. To
    permit for_each_clear_bit(), should that ever be added.

    The patch includes a macro to map the old for_each_bit() onto the new
    for_each_set_bit(). This is a (very) temporary thing to ease the migration.

    [akpm@linux-foundation.org: add temporary for_each_bit()]
    Suggested-by: Alexey Dobriyan
    Suggested-by: Andrew Morton
    Signed-off-by: Akinobu Mita
    Cc: "David S. Miller"
    Cc: Russell King
    Cc: David Woodhouse
    Cc: Artem Bityutskiy
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

13 Nov, 2009

1 commit


04 Nov, 2009

1 commit

  • snd_soc_init_card() is always called as the last part of the CODEC probe
    function so we can factor it out into the core card setup rather than
    have each CODEC replicate the code to do the initialiastation. This will
    be required to support multiple CODECs per card.

    Signed-off-by: Mark Brown

    Mark Brown
     

16 Jun, 2009

1 commit

  • This patch mostly follows commit 5998102b9095fdb7c67755812038612afea315c5
    "ASoC: Refactor WM8731 device registration" to make UDA1380 use standard
    device instantiation. Similarly, the I2C device registration temporarily
    moves into the magician machine driver before it will find its final
    resting place in the board file.

    At the same time, platform specific configuration is moved to platform data
    and common power/reset GPIO handling moves into the codec driver.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Mark Brown

    Philipp Zabel
     

12 Mar, 2009

1 commit

  • Merge Eric Maio's patch to merge snd_soc_dai_ops out of line. Fixed
    merge issues and updated drivers, plus an issue with the ops for the two
    s3c2443 AC97 DAIs having been merged.

    Signed-off-by: Mark Brown

    Mark Brown
     

05 Mar, 2009

1 commit

  • Considering the fact that most cpu_dai or codec_dai are using a same
    'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better
    made a pointer instead, to make sharing easier and code a bit cleaner.

    The patch below is rather preliminary since the asoc tree is being
    actively developed, and this touches almost every piece of code,
    (and possibly many others in development need to be changed as
    well). Building of all codecs are OK, yet to every SoC, I didn't test
    that.

    Signed-off-by: Eric Miao
    Acked-by: Timur Tabi
    Signed-off-by: Mark Brown

    Eric Miao
     

03 Mar, 2009

3 commits


04 Feb, 2009

2 commits


27 Jan, 2009

1 commit


09 Jan, 2009

1 commit

  • Many codec drivers were implementing cookie-cutter copies of the function
    that adds kcontrols to the codec.

    This patch moves this code to a common function snd_soc_add_controls() in
    soc-core.c and updates all drivers using copies of this function to use the
    new common version.

    [Edited to raise priority of error log message and document parameters.
    -- broonie]

    Signed-off-by: Ian Molton
    Signed-off-by: Mark Brown

    Ian Molton
     

10 Dec, 2008

1 commit


09 Dec, 2008

1 commit

  • Currently this is done at module probe time since ASoC ties in codec
    device probe to the instantiation of the entire ASoC device. Subsequent
    patches will refactor the codec drivers to handle probing separately.
    Note that the core does not yet use this information.

    AC97 is special since the codec is controlled over the AC97 link but
    we want to give the machine driver a chance to set up the system before
    trying to instantiate since it may need to do configuration before the
    AC97 link will operate

    Signed-off-by: Mark Brown

    Mark Brown
     

02 Dec, 2008

1 commit

  • Currently ASoC card initialisation is completed by a function called
    snd_soc_register_card(). As part of the work to allow independant
    registration of cards, codecs and machines in ASoC v2 a new function of
    the same name has been added so rename the existing function to
    facilitate the merge of v2.

    Signed-off-by: Mark Brown

    Mark Brown
     

21 Nov, 2008

1 commit

  • Liam Girdwood's ASoC v2 work avoids having two different ops structures
    for DAIs by merging the members of struct snd_soc_ops into struct
    snd_soc_dai_ops, allowing per DAI configuration for everything.
    Backport this change.

    This paves the way for future work allowing any combination of DAIs to
    be connected rather than having fixed purpose CODEC and CPU DAIs and
    only allowing CODECCPU interconnections.

    Signed-off-by: Mark Brown

    Mark Brown
     

13 Oct, 2008

1 commit


04 Sep, 2008

2 commits

  • Currently the boiler plate code used by most ASoC codecs to provide a
    placeholder for SPI access suggests making the selection of SPI a
    compile time option which is suboptimal when trying to build kernels
    supporting multiple systems. Change this template to suggest allowing
    runtime selection instead.

    Leave the drivers not yet converted to new style I2C access for now to
    avoid collisions.

    Signed-off-by: Mark Brown
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Mark Brown
     
  • Convert the uda1380 codec driver to the new (standard) device driver
    binding model.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark Brown
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Jean Delvare
     

25 Aug, 2008

1 commit

  • Many SoC audio codec drivers have improper freeing of memory in error
    paths.

    * codec is allocated in the platform device probe function, but is not
    freed there in case of error. Instead it is freed in the i2c device
    probe function's error path. However the success or failure of both
    functions is not linked, so this could result in a double free (if
    the platform device is successfully probed, the i2c device probing
    fails and then the platform driver is unregistered.)

    * codec->private_data is allocated in many platform device probe
    functions but not freed in their error paths.

    This patch hopefully solves all these problems.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark Brown
    Signed-off-by: Takashi Iwai

    Jean Delvare
     

10 Jul, 2008

1 commit


13 Jun, 2008

1 commit

  • The register cache size is used by the codec_reg sysfs file which works in
    terms of the register cache access functions rather than in terms of raw
    access to the cache so the size specified needs to be in terms of the
    number of elements.

    Signed-off-by: Mark Brown
    Cc: Philipp Zabel
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Mark Brown