| 1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
| 2 |
/* |
| 3 |
* Freescale ALSA SoC Machine driver utility |
| 4 |
* |
| 5 |
* Author: Timur Tabi <[email protected]> |
| 6 |
* |
| 7 |
* Copyright 2010 Freescale Semiconductor, Inc. |
| 8 |
*/ |
| 9 |
|
| 10 |
#ifndef _FSL_UTILS_H |
| 11 |
#define _FSL_UTILS_H |
| 12 |
|
| 13 |
#define DAI_NAME_SIZE 32 |
| 14 |
|
| 15 |
struct snd_soc_dai_link; |
| 16 |
struct device_node; |
| 17 |
|
| 18 |
int fsl_asoc_get_dma_channel(struct device_node *ssi_np, const char *name, |
| 19 |
struct snd_soc_dai_link *dai, |
| 20 |
unsigned int *dma_channel_id, |
| 21 |
unsigned int *dma_id); |
| 22 |
|
| 23 |
void fsl_asoc_get_pll_clocks(struct device *dev, struct clk **pll8k_clk, |
| 24 |
struct clk **pll11k_clk); |
| 25 |
|
| 26 |
void fsl_asoc_reparent_pll_clocks(struct device *dev, struct clk *clk, |
| 27 |
struct clk *pll8k_clk, |
| 28 |
struct clk *pll11k_clk, u64 ratio); |
| 29 |
|
| 30 |
void fsl_asoc_constrain_rates(struct snd_pcm_hw_constraint_list *target_constr, |
| 31 |
const struct snd_pcm_hw_constraint_list *original_constr, |
| 32 |
struct clk *pll8k_clk, struct clk *pll11k_clk, |
| 33 |
struct clk *ext_clk, int *target_rates); |
| 34 |
#endif /* _FSL_UTILS_H */ |