linux/sound/pci/ctxfi/ctresource.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved.
 *
 * @File	ctresource.c
 *
 * @Brief
 * This file contains the implementation of some generic helper functions.
 *
 * @Author	Liu Chun
 * @Date 	May 15 2008
 */

#include "ctresource.h"
#include "cthardware.h"
#include <linux/err.h>
#include <linux/slab.h>

#define AUDIO_SLOT_BLOCK_NUM

/* Resource allocation based on bit-map management mechanism */
static int
get_resource(u8 *rscs, unsigned int amount,
	     unsigned int multi, unsigned int *ridx)
{}

static int put_resource(u8 *rscs, unsigned int multi, unsigned int idx)
{}

int mgr_get_resource(struct rsc_mgr *mgr, unsigned int n, unsigned int *ridx)
{}

int mgr_put_resource(struct rsc_mgr *mgr, unsigned int n, unsigned int idx)
{}

static const unsigned char offset_in_audio_slot_block[NUM_RSCTYP] =;

static int rsc_index(const struct rsc *rsc)
{}

static int audio_ring_slot(const struct rsc *rsc)
{}

static void rsc_next_conj(struct rsc *rsc)
{}

static void rsc_master(struct rsc *rsc)
{}

static const struct rsc_ops rsc_generic_ops =;

int
rsc_init(struct rsc *rsc, u32 idx, enum RSCTYP type, u32 msr, struct hw *hw)
{}

int rsc_uninit(struct rsc *rsc)
{}

int rsc_mgr_init(struct rsc_mgr *mgr, enum RSCTYP type,
		 unsigned int amount, struct hw *hw)
{}

int rsc_mgr_uninit(struct rsc_mgr *mgr)
{}