linux/sound/drivers/pcsp/pcsp.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * PC-Speaker driver for Linux
 *
 * Copyright (C) 1993-1997  Michael Beck
 * Copyright (C) 1997-2001  David Woodhouse
 * Copyright (C) 2001-2008  Stas Sergeev
 */

#ifndef __PCSP_H__
#define __PCSP_H__

#include <linux/hrtimer.h>
#include <linux/i8253.h>
#include <linux/timex.h>

#define PCSP_SOUND_VERSION
#define PCSP_DEBUG

/* default timer freq for PC-Speaker: 18643 Hz */
#define DIV_18KHZ
#define MAX_DIV
#define CALC_DIV(d)
#define CUR_DIV()
#define PCSP_MAX_TREBLE

/* unfortunately, with hrtimers 37KHz does not work very well :( */
#define PCSP_DEFAULT_TREBLE
#define MIN_DIV

/* wild guess */
#define PCSP_MIN_LPJ
#define PCSP_DEFAULT_SDIV
#define PCSP_DEFAULT_SRATE
#define PCSP_INDEX_INC()
#define PCSP_CALC_RATE(i)
#define PCSP_RATE()
#define PCSP_MIN_RATE__1
#define PCSP_MAX_RATE__1
#define PCSP_MAX_PERIOD_NS
#define PCSP_MIN_PERIOD_NS
#define PCSP_CALC_NS(div)
#define PCSP_PERIOD_NS()

#define PCSP_MAX_PERIOD_SIZE
#define PCSP_MAX_PERIODS
#define PCSP_BUFFER_SIZE

struct snd_pcsp {};

extern struct snd_pcsp pcsp_chip;

extern enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle);
extern void pcsp_sync_stop(struct snd_pcsp *chip);

extern int snd_pcsp_new_pcm(struct snd_pcsp *chip);
extern int snd_pcsp_new_mixer(struct snd_pcsp *chip, int nopcm);

#endif