28 Sep, 2011

1 commit

  • For almost all machines the DAI format is a constant, always set to the
    same thing. This means that not only should we normally set it on init
    rather than in hw_params() (where it has been for historical reasons) we
    should also allow users to configure this by setting a variable in the
    dai_link structure. The combination of these two will make many machine
    drivers even more data driven.

    Implement a new dai_fmt field in the dai_link doing just that. Since 0 is
    a valid value for many format flags and we need to be able to tell if the
    field is actually set also add one to all the values used to configure
    formats.

    Signed-off-by: Mark Brown

    Mark Brown
     

21 Sep, 2011

1 commit

  • The orginal code does not cover the case that one DAI such as codec
    may be shared between other two DAIs(CPU).
    When do symmetry checking, altough the codec DAI requires symmetry,
    the two CPU DAIs may still be configured to run on different rates.

    We change to check each DAI's state separately instead of only checking
    the dai link to prevent this issue.

    Signed-off-by: Dong Aisheng
    Tested-by: Wolfram Sang
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Dong Aisheng
     

08 Jun, 2011

1 commit

  • Some ASoC components depend on other ASoC components to provide clocks and
    power resources in order to probe() and vice versa for remove().

    Allow components to be ordered so that components can be probed() and removed()
    in sequences that conform to their dependencies.

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

    Liam Girdwood
     

03 Dec, 2010

1 commit


22 Nov, 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
     

20 Mar, 2010

1 commit

  • This fixes a memory corruption when ASoC devices are used in
    full-duplex mode. Specifically for pxa-ssp code, where this pointer
    is dynamically allocated for each direction and destroyed upon each
    stream start.

    All other platforms are fixed blindly, I couldn't even compile-test
    them. Sorry for any breakage I may have caused.

    Reported-by: Sven Neumann
    Reported-by: Michael Hirsch
    Signed-off-by: Daniel Mack
    Acked-by: Peter Ujfalusi
    Acked-by: Jarkko Nikula
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Daniel Mack
     

04 Mar, 2010

1 commit

  • The delay callback can be used by the core to query the delay
    on the dai caused by FIFO or delay in the platform side.
    In case if both CPU and CODEC dai has FIFO the delay reported
    by each will be added to form the full delay on the chain.
    If none of the dai has FIFO, than the delay will be kept as
    zero.

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

    Peter Ujfalusi
     

22 Feb, 2010

1 commit

  • In order for having snd_soc_dais shared among two or more dai_links,
    remove the relatively global runtime field from the struct snd_soc_dai

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

    jassi brar
     

19 Jan, 2010

1 commit


28 Sep, 2009

1 commit


13 Sep, 2009

1 commit

  • The patch adds an interface to set the relationship between audio
    channel number and slot number. The interface should be really useful
    because audio channel n doesn't always use slot n in all platforms. And
    for some devices, the relationship even can change with sound mode
    switch in 2.1,3.1,4.1,5.1,6.1,7.1 etc.

    Signed-off-by: Barry Song
    Signed-off-by: Mark Brown

    Barry Song
     

06 Sep, 2009

1 commit

  • More and more devices feature PLLs and FLLs with the ability to select
    between multiple input clocks. In order to better support these devices
    a new argument, source, has been added to the set_pll() configuration
    API. Using set_clkdiv() is often difficult due to the need to stop the
    PLL/FLL before any reconfiguration can be done.

    Signed-off-by: Mark Brown

    Mark Brown
     

11 Aug, 2009

1 commit


10 Aug, 2009

1 commit


06 Aug, 2009

1 commit

  • Extend set_tdm_slot to allow the user to arbitrarily set the frame width
    and active TX/RX slots.

    Updates magician.c and wm9081.c for the new set_tdm_slot(). wm9081.c
    still doesn't handle the slot_width override.

    While being there, correct an incorrect use of SlotsPerFrm(7) use in
    bitmask on pxa-ssp.c (SSCR0_SlotsPerFrm(x) is (((x) - 1) << 24)) ).

    (this series is meant for Mark's for-2.6.32 branch)

    Signed-off-by: Daniel Ribeiro
    Signed-off-by: Mark Brown

    Daniel Ribeiro
     

23 Jul, 2009

1 commit


14 Jul, 2009

1 commit


14 May, 2009

1 commit


05 May, 2009

1 commit


02 May, 2009

2 commits

  • The defines for TDM and synchronous clocks are not used - they are
    mostly a legacy of the automatic clocking configuration. TDM will
    require configuration of the number of timeslots and which ones to use
    so can't be fit into the DAI format and synchronous mode is handled by
    symmetric_rates (and needs to be done by constraints rather than when
    the DAI format is being configured).

    Signed-off-by: Mark Brown

    Mark Brown
     
  • The AC97 wire format is completely fixed so CODECs don't have any choice
    about the formats they accept but controllers accept a variety of data
    formats and render them down onto the bus. Have a shared define so all
    the CODEC drivers will interoperate with any of our controller drivers.

    Signed-off-by: Mark Brown

    Mark Brown
     

08 Apr, 2009

1 commit

  • Many devices require symmetric configurations of capture and playback
    data formats, often due to shared clocking but sometimes also due to
    other shared playback and record configuration in the device. Start
    providing core support for this by allowing the DAIs or the machine
    to specify that the sample rates used should be kept symmetric.

    A flag symmetric_rates is provided in the snd_soc_dai and
    snd_soc_dai_link structures. If this is set in either of the DAIs or in
    the machine then a constraint will be applied when a stream is already
    open preventing any changes in sample rate.

    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
     

09 Dec, 2008

1 commit

  • Add API calls to register and unregister DAIs with the core. Currently
    these APIs are ineffective. Since multiple DAIs for a given device are
    a common case bulk variants are provided.

    Signed-off-by: Mark Brown

    Mark Brown
     

04 Dec, 2008

1 commit


25 Nov, 2008

1 commit

  • DAI type information is only ever used within ASoC in order to special
    case AC97 and for diagnostic purposes. Since modern CPUs and codecs
    support multi function DAIs which can be configured for several modes
    it is more trouble than it's worth to maintain anything other than a
    flag identifying AC97 DAIs so remove the type field and replace it with
    an ac97_control flag.

    Signed-off-by: Mark Brown

    Mark Brown
     

21 Nov, 2008

2 commits

  • 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
     
  • ASoC v2 factors most of the contents of soc.h out into separate headers,
    including soc-dai.h for the DAI. Factor the existing DAI API out into
    this file in order to prepare for backporting of the ASoC v2 DAI API.
    Also backport some of Liam's improvements to the documentation.

    Signed-off-by: Mark Brown

    Mark Brown