linux/sound/drivers/pcsp/pcsp_lib.c

// 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
 */

#include <linux/module.h>
#include <linux/gfp.h>
#include <linux/moduleparam.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <sound/pcm.h>
#include "pcsp.h"

static bool nforce_wa;
module_param(nforce_wa, bool, 0444);
MODULE_PARM_DESC();

#define DMIX_WANTS_S16

/*
 * Call snd_pcm_period_elapsed in a work
 * This avoids spinlock messes and long-running irq contexts
 */
static void pcsp_call_pcm_elapsed(struct work_struct *work)
{}

static DECLARE_WORK(pcsp_pcm_work, pcsp_call_pcm_elapsed);

/* write the port and returns the next expire time in ns;
 * called at the trigger-start and in hrtimer callback
 */
static u64 pcsp_timer_update(struct snd_pcsp *chip)
{}

static void pcsp_pointer_update(struct snd_pcsp *chip)
{}

enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle)
{}

static int pcsp_start_playing(struct snd_pcsp *chip)
{}

static void pcsp_stop_playing(struct snd_pcsp *chip)
{}

/*
 * Force to stop and sync the stream
 */
void pcsp_sync_stop(struct snd_pcsp *chip)
{}

static int snd_pcsp_playback_close(struct snd_pcm_substream *substream)
{}

static int snd_pcsp_playback_hw_params(struct snd_pcm_substream *substream,
				       struct snd_pcm_hw_params *hw_params)
{}

static int snd_pcsp_playback_hw_free(struct snd_pcm_substream *substream)
{}

static int snd_pcsp_playback_prepare(struct snd_pcm_substream *substream)
{}

static int snd_pcsp_trigger(struct snd_pcm_substream *substream, int cmd)
{}

static snd_pcm_uframes_t snd_pcsp_playback_pointer(struct snd_pcm_substream
						   *substream)
{}

static const struct snd_pcm_hardware snd_pcsp_playback =;

static int snd_pcsp_playback_open(struct snd_pcm_substream *substream)
{}

static const struct snd_pcm_ops snd_pcsp_playback_ops =;

int snd_pcsp_new_pcm(struct snd_pcsp *chip)
{}