brintos

brintos / linux-shallow public Read only

0
0
Text · 1.4 KiB · 96f26e4 Raw
49 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later */2/*3 *  Driver for the Conexant CX25821 PCIe bridge4 *5 *  Copyright (C) 2009 Conexant Systems Inc.6 *  Authors  <shu.lin@conexant.com>, <hiep.huynh@conexant.com>7 */8 9#ifndef __CX25821_AUDIO_H__10#define __CX25821_AUDIO_H__11 12#define USE_RISC_NOOP		113#define LINES_PER_BUFFER	1514#define AUDIO_LINE_SIZE		12815 16/* Number of buffer programs to use at once. */17#define NUMBER_OF_PROGRAMS	818 19/*20 * Max size of the RISC program for a buffer. - worst case is 2 writes per line21 * Space is also added for the 4 no-op instructions added on the end.22 */23#ifndef USE_RISC_NOOP24#define MAX_BUFFER_PROGRAM_SIZE						\25	(2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE +		\26	 RISC_WRITECR_INSTRUCTION_SIZE * 4)27#endif28 29/* MAE 12 July 2005 Try to use NOOP RISC instruction instead */30#ifdef USE_RISC_NOOP31#define MAX_BUFFER_PROGRAM_SIZE						\32	(2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE +		\33	 RISC_NOOP_INSTRUCTION_SIZE * 4)34#endif35 36/* Sizes of various instructions in bytes.  Used when adding instructions. */37#define RISC_WRITE_INSTRUCTION_SIZE	1238#define RISC_JUMP_INSTRUCTION_SIZE	1239#define RISC_SKIP_INSTRUCTION_SIZE	440#define RISC_SYNC_INSTRUCTION_SIZE	441#define RISC_WRITECR_INSTRUCTION_SIZE	1642#define RISC_NOOP_INSTRUCTION_SIZE	443 44#define MAX_AUDIO_DMA_BUFFER_SIZE					\45	(MAX_BUFFER_PROGRAM_SIZE * NUMBER_OF_PROGRAMS +			\46	 RISC_SYNC_INSTRUCTION_SIZE)47 48#endif49