linux/sound/soc/atmel/atmel_ssc_dai.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * atmel_ssc_dai.h - ALSA SSC interface for the Atmel  SoC
 *
 * Copyright (C) 2005 SAN People
 * Copyright (C) 2008 Atmel
 *
 * Author: Sedji Gaouaou <[email protected]>
 *         ATMEL CORP.
 *
 * Based on at91-ssc.c by
 * Frank Mandarino <[email protected]>
 * Based on pxa2xx Platform drivers by
 * Liam Girdwood <[email protected]>
 */

#ifndef _ATMEL_SSC_DAI_H
#define _ATMEL_SSC_DAI_H

#include <linux/types.h>
#include <linux/atmel-ssc.h>

#include "atmel-pcm.h"

/* SSC system clock ids */
#define ATMEL_SYSCLK_MCK

/* SSC divider ids */
#define ATMEL_SSC_CMR_DIV
#define ATMEL_SSC_TCMR_PERIOD
#define ATMEL_SSC_RCMR_PERIOD
/*
 * SSC direction masks
 */
#define SSC_DIR_MASK_UNUSED
#define SSC_DIR_MASK_PLAYBACK
#define SSC_DIR_MASK_CAPTURE

/*
 * SSC register values that Atmel left out of <linux/atmel-ssc.h>.  These
 * are expected to be used with SSC_BF
 */
/* START bit field values */
#define SSC_START_CONTINUOUS
#define SSC_START_TX_RX
#define SSC_START_LOW_RF
#define SSC_START_HIGH_RF
#define SSC_START_FALLING_RF
#define SSC_START_RISING_RF
#define SSC_START_LEVEL_RF
#define SSC_START_EDGE_RF
#define SSS_START_COMPARE_0

/* CKI bit field values */
#define SSC_CKI_FALLING
#define SSC_CKI_RISING

/* CKO bit field values */
#define SSC_CKO_NONE
#define SSC_CKO_CONTINUOUS
#define SSC_CKO_TRANSFER

/* CKS bit field values */
#define SSC_CKS_DIV
#define SSC_CKS_CLOCK
#define SSC_CKS_PIN

/* FSEDGE bit field values */
#define SSC_FSEDGE_POSITIVE
#define SSC_FSEDGE_NEGATIVE

/* FSOS bit field values */
#define SSC_FSOS_NONE
#define SSC_FSOS_NEGATIVE
#define SSC_FSOS_POSITIVE
#define SSC_FSOS_LOW
#define SSC_FSOS_HIGH
#define SSC_FSOS_TOGGLE

#define START_DELAY

struct atmel_ssc_state {};


struct atmel_ssc_info {};

int atmel_ssc_set_audio(int ssc_id);
void atmel_ssc_put_audio(int ssc_id);

#endif /* _AT91_SSC_DAI_H */