axg-fifo.c (22f5680a9cbc7388f97e5386c15c325d6961b958) axg-fifo.c (7b5ce9f0c52a5885d34d46bba62e9eaedc3dd459)
1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2//
3// Copyright (c) 2018 BayLibre, SAS.
4// Author: Jerome Brunet <jbrunet@baylibre.com>
5
6#include <linux/bitfield.h>
7#include <linux/clk.h>
8#include <linux/of_irq.h>

--- 9 unchanged lines hidden (view full) ---

18
19/*
20 * This file implements the platform operations common to the playback and
21 * capture frontend DAI. The logic behind this two types of fifo is very
22 * similar but some difference exist.
23 * These differences are handled in the respective DAI drivers
24 */
25
1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2//
3// Copyright (c) 2018 BayLibre, SAS.
4// Author: Jerome Brunet <jbrunet@baylibre.com>
5
6#include <linux/bitfield.h>
7#include <linux/clk.h>
8#include <linux/of_irq.h>

--- 9 unchanged lines hidden (view full) ---

18
19/*
20 * This file implements the platform operations common to the playback and
21 * capture frontend DAI. The logic behind this two types of fifo is very
22 * similar but some difference exist.
23 * These differences are handled in the respective DAI drivers
24 */
25
26static struct snd_pcm_hardware axg_fifo_hw = {
26static const struct snd_pcm_hardware axg_fifo_hw = {
27 .info = (SNDRV_PCM_INFO_INTERLEAVED |
28 SNDRV_PCM_INFO_MMAP |
29 SNDRV_PCM_INFO_MMAP_VALID |
30 SNDRV_PCM_INFO_BLOCK_TRANSFER |
31 SNDRV_PCM_INFO_PAUSE |
32 SNDRV_PCM_INFO_NO_PERIOD_WAKEUP),
33 .formats = AXG_FIFO_FORMATS,
34 .rate_min = 5512,

--- 6 unchanged lines hidden (view full) ---

41 .periods_max = UINT_MAX,
42
43 /* No real justification for this */
44 .buffer_bytes_max = 1 * 1024 * 1024,
45};
46
47static struct snd_soc_dai *axg_fifo_dai(struct snd_pcm_substream *ss)
48{
27 .info = (SNDRV_PCM_INFO_INTERLEAVED |
28 SNDRV_PCM_INFO_MMAP |
29 SNDRV_PCM_INFO_MMAP_VALID |
30 SNDRV_PCM_INFO_BLOCK_TRANSFER |
31 SNDRV_PCM_INFO_PAUSE |
32 SNDRV_PCM_INFO_NO_PERIOD_WAKEUP),
33 .formats = AXG_FIFO_FORMATS,
34 .rate_min = 5512,

--- 6 unchanged lines hidden (view full) ---

41 .periods_max = UINT_MAX,
42
43 /* No real justification for this */
44 .buffer_bytes_max = 1 * 1024 * 1024,
45};
46
47static struct snd_soc_dai *axg_fifo_dai(struct snd_pcm_substream *ss)
48{
49 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(ss);
49 struct snd_soc_pcm_runtime *rtd = ss->private_data;
50
51 return snd_soc_rtd_to_cpu(rtd, 0);
52}
53
54static struct axg_fifo *axg_fifo_data(struct snd_pcm_substream *ss)
55{
56 struct snd_soc_dai *dai = axg_fifo_dai(ss);
57

--- 338 unchanged lines hidden ---
50
51 return snd_soc_rtd_to_cpu(rtd, 0);
52}
53
54static struct axg_fifo *axg_fifo_data(struct snd_pcm_substream *ss)
55{
56 struct snd_soc_dai *dai = axg_fifo_dai(ss);
57

--- 338 unchanged lines hidden ---