25 Jun, 2019

1 commit


06 Feb, 2019

2 commits

  • The trigger and set_params callbacks are called from 3 and 2 separate
    loops respectively, tidy up the code a little by factoring these out
    into helper functions.

    Signed-off-by: Charles Keepax
    Signed-off-by: Mark Brown

    Charles Keepax
     
  • For callbacks configuring the state of the components (trigger,
    set_params, ack and set_metadata) simplify the code a little and make
    intention clearer by aborting as soon as an error is encountered. The
    operation has already failed and there is nothing to be gained from
    processing the callbacks on additional components. The operations
    currently abort after the callbacks, so this simply shortens the
    error path.

    For callbacks returning information from the driver (copy,
    get_metadata, pointer, get_codec_caps, get_caps and get_params)
    only look for the first callback provided, currently the code will
    call every callback only returning the information provided by the
    last. Since we can only return one set of data, it makes no sense to
    request the data from every component. Again this just makes the
    currently supported feature set a little more clear.

    Signed-off-by: Charles Keepax
    Signed-off-by: Mark Brown

    Charles Keepax
     

21 Sep, 2018

1 commit


07 Aug, 2018

1 commit

  • For some reason order of startup/hw_params/prepare are reversed
    in dynamic compress usecase when compared to dpcm usecase. This is
    a issue with platforms like QCOM where it expects the BE to be
    initialized before FE.

    Interestingly the compress trigger callback order is inline with dpcm.

    Am not 100% sure why the compress audio case has been reversed.
    This patch is making the order inline with dpcm.

    If the reverse ordering is just co-incendental then this change
    makes sense and will avoid inventing some new mechanism to cope
    with ordering.

    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Mark Brown

    Srinivas Kandagatla
     

02 Jul, 2018

1 commit


11 May, 2018

2 commits


26 Apr, 2018

3 commits

  • There are 2 loops calling open and 4 loops calling free for all the
    components on a DAI link. Factor out these loops into helper functions
    to make the code a little clearer.

    Signed-off-by: Charles Keepax
    Acked-by: Vinod Koul
    Signed-off-by: Mark Brown

    Charles Keepax
     
  • As all drivers have been moved over to the new generic component
    code remove the now unused platform specific code.

    Signed-off-by: Charles Keepax
    Acked-by: Vinod Koul
    Signed-off-by: Mark Brown

    Charles Keepax
     
  • The core should only call free on a component if said component has
    already had open called on it. This is not presently the case and most
    compressed drivers in the kernel assume it will be. This causes null
    pointer dereferences in the drivers as they attempt clean up for stuff
    that was never put in place.

    This is fixed by aborting calling open callbacks once a failure is
    encountered and then during clean up only iterating through the
    component list to that point.

    This is a fairly quick fix to the issue, to allow backporting. There
    is more refactoring to follow to tidy the code up a little.

    Fixes: 9e7e3738ab0e ("ASoC: snd_soc_component_driver has snd_compr_ops")
    Signed-off-by: Charles Keepax
    Acked-by: Vinod Koul
    Signed-off-by: Mark Brown

    Charles Keepax
     

26 Jan, 2018

4 commits

  • The error message prints are a little inconsisent, tidy them up to be a
    little more consistent with current style recommendations.

    Signed-off-by: Charles Keepax
    Signed-off-by: Mark Brown

    Charles Keepax
     
  • Signed-off-by: Charles Keepax
    Signed-off-by: Mark Brown

    Charles Keepax
     
  • …roonie/sound into asoc-compress

    Mark Brown
     
  • The soc_compr_copy callback is currently broken. Since the
    changes to move the compr_ops over to the component the return
    value is not correctly propagated, always returning zero on
    success rather than the number of bytes copied. This causes
    user-space to stall continuously reading as it does not believe
    it has received any data.

    Furthermore, the changes to move the compr_ops over to the
    component iterate through the list of components and will call
    the copy callback for any that have compressed ops. There isn't
    currently any consensus on the mechanism to combine the results
    of multiple copy callbacks.

    To fix this issue for now halt searching the component list when
    we locate a copy callback and return the result of that single
    callback. Additional work should probably be done to look at the
    other ops, tidy things up, and work out if we want to support
    multiple components on a single compressed, but this is the only
    fix required to get things working again.

    Fixes: 9e7e3738ab0e ("ASoC: snd_soc_component_driver has snd_compr_ops")
    Signed-off-by: Charles Keepax
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Charles Keepax
     

05 Dec, 2017

1 commit


23 Oct, 2017

1 commit

  • Platform will be replaced into Component in the future.
    snd_soc_platform_driver has snd_compr_ops, but snd_soc_component_driver
    doesn't have. To prepare for replacing, this patch adds snd_compr_ops on
    component driver.

    platform will be replaced into component, and its code will be removed.
    But during replacing, both platform and component process code exists.
    To keep compatibility, to avoid platform NULL access and to avoid
    platform/component duplicate operation during replacing process, this
    patch has such code. Some of this code will be removed when platform was
    removed.

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Mark Brown

    Kuninori Morimoto
     

16 Aug, 2017

1 commit

  • For dynamic compress rtd, the codec_dai may not have any actual
    meaning(like snd-soc-dummy-dai), so compress id can just use the
    value of dai_link->stream_name. But for others, its codec_dai
    has actual meaning, so compress id can include codec_dai name.

    Signed-off-by: Peng Donglin
    Signed-off-by: Mark Brown

    Peng Donglin
     

10 Aug, 2017

1 commit


20 Jun, 2017

1 commit

  • Currently compress driver hardcodes direction as playback to get
    substream from the stream. This results in getting the incorrect
    substream for compressed capture usecase.
    To fix this, remove the hardcoding and derive substream based on
    the stream direction.

    Signed-off-by: Satish Babu Patakokila
    Signed-off-by: Banajit Goswami
    Acked-By: Vinod Koul
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Satish Babu Patakokila
     

13 Nov, 2016

1 commit

  • ASoC Compress ops have only platform ops and no DAI ops unlike PCM device
    where we have both platform ops as well as DAI ops.

    So add compress dai ops and add this new structure to the ASoC core to make
    compressed devices a first class ASoC citizen

    Again like PCM ops, drivers are free to implement either or both of
    these ops based on device needs.

    Signed-off-by: Vinod Koul
    Signed-off-by: Mark Brown

    Vinod Koul
     

16 Aug, 2016

1 commit


22 Jun, 2016

1 commit

  • Both soc_compr_pointer and the platform driver pointer callback return
    ints but current soc_compr_pointer always returns 0. Update this so we
    return the actual value from the platform driver callback. This doesn't
    fix any issues simply makes the code more consistent.

    Signed-off-by: Charles Keepax
    Acked-by: Vinod Koul
    Signed-off-by: Mark Brown

    Charles Keepax
     

12 Jan, 2016

1 commit

  • …ie/sound into for-next

    ASoC: Last updates for v4.5

    A bunch more updates for v4.5, mainly driver work:

    - More topology API enhancements from Mengdong Lin working towards
    making everything more component based and being able to specify PCM
    links via topology.
    - Large sets driver updates from Cirrus, Intel (mainly more Skylake
    support) and Renesas.
    - New driver for AMD ACP
    - Rename PCM1792a driver to be generic pcm179x

    Takashi Iwai
     

08 Jan, 2016

1 commit


30 Nov, 2015

1 commit

  • Make snd_compress_new take an id string (like snd_pcm_new).
    This string can be included in the procfs info.

    This patch also updates soc_new_compress() to create an ID
    based on the stream and dai name, as done for PCM streams.

    Signed-off-by: Richard Fitzgerald
    Acked-by: Vinod Koul
    Signed-off-by: Takashi Iwai

    Richard Fitzgerald
     

22 Oct, 2015

1 commit


15 Jan, 2015

1 commit

  • In soc_new_compress() when rtd->dai_link->dynamic is set, we create the pcm
    substreams with this call:

    ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num,
    1, 0, &be_pcm);

    which passes 0 as capture_count leading to

    be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream

    being NULL, hence when trying to set rtd a few lines below we get an oops.

    Fix by using rtd->dai_link->dpcm_playback and rtd->dai_link->dpcm_capture as
    playback_count and capture_count to snd_pcm_new_internal().

    Signed-off-by: Qais Yousef
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Qais Yousef
     

22 Oct, 2014

1 commit


24 Sep, 2014

1 commit

  • Fix double unlock of fe card mutex introduced by patch 8f70e515a8bb
    "ASoC: soc-pcm: fix dpcm_path_get error handling"

    The first unlock is at line 106, and the unlock is at line 149. we
    should remove the first unlock.

    Reported-by: Dan Carpenter
    Signed-off-by: Qiao Zhou
    Signed-off-by: Mark Brown

    Qiao Zhou
     

10 Sep, 2014

1 commit


17 Jul, 2014

1 commit


22 Jun, 2014

1 commit


14 May, 2014

1 commit


13 May, 2014

1 commit

  • This was initially removed in commit 6423c1875 ("ASoC: Remove runtime field from
    DAI"), but was, presumably by accident, brought back in commit f0fba2ad1 ("ASoC:
    multi-component - ASoC Multi-Component Support"). But has never been
    initialized to anything but NULL ever since. This commit removes it again.

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

    Lars-Peter Clausen
     

06 Mar, 2014

2 commits


18 Jan, 2014

1 commit

  • Currently compressed audio streams are statically routed from the /dev
    to the DAI link. Some DSPs can route compressed data to multiple BE DAIs
    like they do for PCM data.

    Add support to allow dynamically routed compressed streams using the existing
    DPCM infrastructure. This patch adds special FE versions of the compressed ops
    that work out the runtime routing.

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

    Liam Girdwood
     

12 Aug, 2013

1 commit


29 Jul, 2013

1 commit