linux/sound/pci/ctxfi/cttimer.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * PCM timer handling on ctxfi
 */

#include <linux/slab.h>
#include <linux/math64.h>
#include <linux/moduleparam.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include "ctatc.h"
#include "cthardware.h"
#include "cttimer.h"

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

struct ct_timer_ops {};

/* timer instance -- assigned to each PCM stream */
struct ct_timer_instance {};

/* timer instance manager */
struct ct_timer {};


/*
 * system-timer-based updates
 */

static void ct_systimer_callback(struct timer_list *t)
{}

static void ct_systimer_init(struct ct_timer_instance *ti)
{}

static void ct_systimer_start(struct ct_timer_instance *ti)
{}

static void ct_systimer_stop(struct ct_timer_instance *ti)
{}

static void ct_systimer_prepare(struct ct_timer_instance *ti)
{}

#define ct_systimer_free

static const struct ct_timer_ops ct_systimer_ops =;


/*
 * Handling multiple streams using a global emu20k1 timer irq
 */

#define CT_TIMER_FREQ
#define MIN_TICKS
#define MAX_TICKS

static void ct_xfitimer_irq_rearm(struct ct_timer *atimer, int ticks)
{}

static void ct_xfitimer_irq_stop(struct ct_timer *atimer)
{}

static inline unsigned int ct_xfitimer_get_wc(struct ct_timer *atimer)
{}

/*
 * reprogram the timer interval;
 * checks the running instance list and determines the next timer interval.
 * also updates the each stream position, returns the number of streams
 * to call snd_pcm_period_elapsed() appropriately
 *
 * call this inside the lock and irq disabled
 */
static int ct_xfitimer_reprogram(struct ct_timer *atimer, int can_update)
{}

/* look through the instance list and call period_elapsed if needed */
static void ct_xfitimer_check_period(struct ct_timer *atimer)
{}

/* Handle timer-interrupt */
static void ct_xfitimer_callback(struct ct_timer *atimer)
{}

static void ct_xfitimer_prepare(struct ct_timer_instance *ti)
{}


/* start/stop the timer */
static void ct_xfitimer_update(struct ct_timer *atimer)
{}

static void ct_xfitimer_start(struct ct_timer_instance *ti)
{}

static void ct_xfitimer_stop(struct ct_timer_instance *ti)
{}

static void ct_xfitimer_free_global(struct ct_timer *atimer)
{}

static const struct ct_timer_ops ct_xfitimer_ops =;

/*
 * timer instance
 */

struct ct_timer_instance *
ct_timer_instance_new(struct ct_timer *atimer, struct ct_atc_pcm *apcm)
{}

void ct_timer_prepare(struct ct_timer_instance *ti)
{}

void ct_timer_start(struct ct_timer_instance *ti)
{}

void ct_timer_stop(struct ct_timer_instance *ti)
{}

void ct_timer_instance_free(struct ct_timer_instance *ti)
{}

/*
 * timer manager
 */

static void ct_timer_interrupt(void *data, unsigned int status)
{}

struct ct_timer *ct_timer_new(struct ct_atc *atc)
{}

void ct_timer_free(struct ct_timer *atimer)
{}