2019-05-30 07:57:50 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2011-01-08 13:36:13 +08:00
|
|
|
/*
|
|
|
|
* tegra_pcm.h - Definitions for Tegra PCM driver
|
|
|
|
*
|
|
|
|
* Author: Stephen Warren <swarren@nvidia.com>
|
2012-03-21 04:55:49 +08:00
|
|
|
* Copyright (C) 2010,2012 - NVIDIA, Inc.
|
2011-01-08 13:36:13 +08:00
|
|
|
*
|
|
|
|
* Based on code copyright/by:
|
|
|
|
*
|
|
|
|
* Copyright (c) 2009-2010, NVIDIA Corporation.
|
|
|
|
* Scott Peterson <speterson@nvidia.com>
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Google, Inc.
|
|
|
|
* Iliyan Malchev <malchev@google.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __TEGRA_PCM_H__
|
|
|
|
#define __TEGRA_PCM_H__
|
|
|
|
|
2020-07-19 13:01:26 +08:00
|
|
|
#include <sound/dmaengine_pcm.h>
|
|
|
|
#include <sound/asound.h>
|
2013-11-12 06:21:01 +08:00
|
|
|
|
2020-07-19 13:01:26 +08:00
|
|
|
int tegra_pcm_construct(struct snd_soc_component *component,
|
|
|
|
struct snd_soc_pcm_runtime *rtd);
|
|
|
|
void tegra_pcm_destruct(struct snd_soc_component *component,
|
|
|
|
struct snd_pcm *pcm);
|
|
|
|
int tegra_pcm_open(struct snd_soc_component *component,
|
|
|
|
struct snd_pcm_substream *substream);
|
|
|
|
int tegra_pcm_close(struct snd_soc_component *component,
|
|
|
|
struct snd_pcm_substream *substream);
|
|
|
|
int tegra_pcm_hw_params(struct snd_soc_component *component,
|
|
|
|
struct snd_pcm_substream *substream,
|
|
|
|
struct snd_pcm_hw_params *params);
|
|
|
|
int tegra_pcm_hw_free(struct snd_soc_component *component,
|
|
|
|
struct snd_pcm_substream *substream);
|
|
|
|
int tegra_pcm_mmap(struct snd_soc_component *component,
|
|
|
|
struct snd_pcm_substream *substream,
|
|
|
|
struct vm_area_struct *vma);
|
|
|
|
snd_pcm_uframes_t tegra_pcm_pointer(struct snd_soc_component *component,
|
|
|
|
struct snd_pcm_substream *substream);
|
2012-03-21 04:55:49 +08:00
|
|
|
int tegra_pcm_platform_register(struct device *dev);
|
2013-11-12 06:21:01 +08:00
|
|
|
int tegra_pcm_platform_register_with_chan_names(struct device *dev,
|
|
|
|
struct snd_dmaengine_pcm_config *config,
|
|
|
|
char *txdmachan, char *rxdmachan);
|
2012-03-21 04:55:49 +08:00
|
|
|
void tegra_pcm_platform_unregister(struct device *dev);
|
|
|
|
|
2011-01-08 13:36:13 +08:00
|
|
|
#endif
|