Commit graph

15 commits

Author SHA1 Message Date
Hin-Tak Leung
19067f3333 Second/Alternative change to correct for 5.5+ change in trigger order
The idea is the same as the previous attempt: calls ac101_trigger() just
before set_clock(1).

https://github.com/respeaker/seeed-voicecard/issues/290
    6mics / linear 4 mics: fails to record against v5.10 kernel
https://github.com/raspberrypi/linux/issues/4279
    [regression] alsa system call blocks on record between 5.4.83 and 5.5.19

In v5.5,

commit 4378f1fbe924054a09ff0d4e39e1a581b9245252
Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
Date:   Fri Sep 27 10:16:46 2019 +0300

    ASoC: soc-pcm: Use different sequence for start/stop trigger

    On stream stop currently we stop the DMA first followed by the CPU DAI.
    This can cause underflow (playback) or overflow (capture) on the DAI side
    as the DMA is no longer feeding data while the DAI is still active.
    It can be observed easily if the DAI side does not have FIFO (or it is
    disabled) to survive the time while the DMA is stopped, but still can
    happen on relatively slow CPUs when relatively high sampling rate is used:
    the FIFO is drained between the time the DMA is stopped and the DAI is
    stopped.

    It can only fixed by using different sequence within trigger for 'stop' and
    'start':
    case SNDRV_PCM_TRIGGER_START:
    case SNDRV_PCM_TRIGGER_RESUME:
    case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
            Trigger order: dai_link, DMA, CPU DAI then the codec

    case SNDRV_PCM_TRIGGER_STOP:
    case SNDRV_PCM_TRIGGER_SUSPEND:
    case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
            Trigger order: codec, CPU DAI, DMA then dai_link

    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
    Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Link: https://lore.kernel.org/r/20190927071646.22319-1-peter.ujfalusi@ti.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-27 02:49:25 +01:00
respeaker
b98fce84e0 Add: compatible to linux-4.18 or higher 2019-03-14 03:13:25 +00:00
turmary
95f4fe0688 Fix: remove spin lock in machine trigger 2018-11-27 09:47:44 +00:00
turmary
0965139ead Optimize: simplify AC101 debug message 2018-11-07 15:29:06 -10:00
Peter.Yang
d0d9107c91 Move: simple-audio-card -> seeed-voicecard, module removing & inserting again supported 2018-04-04 09:36:18 +00:00
Peter.Yang
d660a92d73 Add: headset detection for 6-Mics Circular Array Kit and 4-Mics Linear Array Kit 2018-04-02 08:43:20 +00:00
Peter.Yang
8211f4c000 Fix: 4MIC recording by portaudio & pyaudio 2018-04-02 07:59:17 +00:00
Peter.Yang
7e1f29af35 Fix: clear the "PuPu" noise again after ac101 as Master 2018-03-24 11:05:46 +00:00
Peter.Yang
d3d95d0296 Fix: i2c access fail & channels miss order 2018-03-24 10:01:33 +00:00
Peter.Yang
22f495491a Fix: ac101 as master, ac108 pll source from ac101 bclk 2018-03-23 03:25:52 +00:00
Peter.Yang
235485652b Optimize: names & disable sample rate 96K 2018-03-13 08:30:43 +00:00
Peter.Yang
b8f9bb38fd Move: register access from i2c_master_XXX to regmap_XXX 2018-02-27 09:05:55 +00:00
Peter.Yang
2f31ac4ea4 Fix: ac101 stereo widgets get/put interface 2018-02-27 02:58:10 +00:00
peter.yang
18eec1abfa Merge: ac108 & ac101 as single codec module 2018-02-10 15:16:01 +08:00
peter.yang
fa4b566d9a Move: rename ac108 -> ac10x 2018-02-10 11:36:18 +08:00