blob: 2a36eea1740dd68d50f00836f552e15cf0d95e8c [file] [log] [blame]
Thomas Gleixner2b27bdc2019-05-29 16:57:50 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Stephen Warren7605eb52011-01-07 22:36:13 -07002/*
3 * tegra_pcm.h - Definitions for Tegra PCM driver
4 *
5 * Author: Stephen Warren <swarren@nvidia.com>
Stephen Warren518de862012-03-20 14:55:49 -06006 * Copyright (C) 2010,2012 - NVIDIA, Inc.
Stephen Warren7605eb52011-01-07 22:36:13 -07007 *
8 * Based on code copyright/by:
9 *
10 * Copyright (c) 2009-2010, NVIDIA Corporation.
11 * Scott Peterson <speterson@nvidia.com>
12 *
13 * Copyright (C) 2010 Google, Inc.
14 * Iliyan Malchev <malchev@google.com>
Stephen Warren7605eb52011-01-07 22:36:13 -070015 */
16
17#ifndef __TEGRA_PCM_H__
18#define __TEGRA_PCM_H__
19
Sameer Pujarf74028e2020-07-19 10:31:26 +053020#include <sound/dmaengine_pcm.h>
21#include <sound/asound.h>
Stephen Warren5608bd32013-11-11 15:21:01 -070022
Sameer Pujarf74028e2020-07-19 10:31:26 +053023int tegra_pcm_construct(struct snd_soc_component *component,
24 struct snd_soc_pcm_runtime *rtd);
Sameer Pujarf74028e2020-07-19 10:31:26 +053025int tegra_pcm_open(struct snd_soc_component *component,
26 struct snd_pcm_substream *substream);
27int tegra_pcm_close(struct snd_soc_component *component,
28 struct snd_pcm_substream *substream);
29int tegra_pcm_hw_params(struct snd_soc_component *component,
30 struct snd_pcm_substream *substream,
31 struct snd_pcm_hw_params *params);
Sameer Pujarf74028e2020-07-19 10:31:26 +053032snd_pcm_uframes_t tegra_pcm_pointer(struct snd_soc_component *component,
33 struct snd_pcm_substream *substream);
Stephen Warren518de862012-03-20 14:55:49 -060034int tegra_pcm_platform_register(struct device *dev);
Dmitry Osipenko150f4d52021-12-04 17:37:12 +030035int devm_tegra_pcm_platform_register(struct device *dev);
Stephen Warren5608bd32013-11-11 15:21:01 -070036int tegra_pcm_platform_register_with_chan_names(struct device *dev,
37 struct snd_dmaengine_pcm_config *config,
38 char *txdmachan, char *rxdmachan);
Stephen Warren518de862012-03-20 14:55:49 -060039void tegra_pcm_platform_unregister(struct device *dev);
40
Stephen Warren7605eb52011-01-07 22:36:13 -070041#endif