linux/sound/pci/asihpi/hpicmn.c

// SPDX-License-Identifier: GPL-2.0-only
/******************************************************************************

    AudioScience HPI driver
    Copyright (C) 1997-2014  AudioScience Inc. <[email protected]>


\file hpicmn.c

 Common functions used by hpixxxx.c modules

(C) Copyright AudioScience Inc. 1998-2003
*******************************************************************************/
#define SOURCEFILE_NAME

#include "hpi_internal.h"
#include "hpidebug.h"
#include "hpimsginit.h"

#include "hpicmn.h"

struct hpi_adapters_list {};

static struct hpi_adapters_list adapters;

/**
 * hpi_validate_response - Given an HPI Message that was sent out and
 * a response that was received, validate that the response has the
 * correct fields filled in, i.e ObjectType, Function etc
 * @phm: message
 * @phr: response
 */
u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr)
{}

u16 hpi_add_adapter(struct hpi_adapter_obj *pao)
{}

void hpi_delete_adapter(struct hpi_adapter_obj *pao)
{}

/**
 * hpi_find_adapter - FindAdapter returns a pointer to the struct
 * hpi_adapter_obj with index wAdapterIndex in an HPI_ADAPTERS_LIST
 * structure.
 * @adapter_index: value in [0, HPI_MAX_ADAPTERS[
 */
struct hpi_adapter_obj *hpi_find_adapter(u16 adapter_index)
{}

/**
 * wipe_adapter_list - wipe an HPI_ADAPTERS_LIST structure.
 *
 */
static void wipe_adapter_list(void)
{}

static void subsys_get_adapter(struct hpi_message *phm,
	struct hpi_response *phr)
{}

static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC)
{}

/** Find a control.
*/
static short find_control(u16 control_index,
	struct hpi_control_cache *p_cache, struct hpi_control_cache_info **pI)
{}

/* allow unified treatment of several string fields within struct */
#define HPICMN_PAD_OFS_AND_SIZE(m)

struct pad_ofs_size {};

static const struct pad_ofs_size pad_desc[] =;

/** CheckControlCache checks the cache and fills the struct hpi_response
 * accordingly. It returns one if a cache hit occurred, zero otherwise.
 */
short hpi_check_control_cache_single(struct hpi_control_cache_single *pC,
	struct hpi_message *phm, struct hpi_response *phr)
{}

short hpi_check_control_cache(struct hpi_control_cache *p_cache,
	struct hpi_message *phm, struct hpi_response *phr)
{}

/** Updates the cache with Set values.

Only update if no error.
Volume and Level return the limited values in the response, so use these
Multiplexer does so use sent values
*/
void hpi_cmn_control_cache_sync_to_msg_single(struct hpi_control_cache_single
	*pC, struct hpi_message *phm, struct hpi_response *phr)
{}

void hpi_cmn_control_cache_sync_to_msg(struct hpi_control_cache *p_cache,
	struct hpi_message *phm, struct hpi_response *phr)
{}

/** Allocate control cache.

\return Cache pointer, or NULL if allocation fails.
*/
struct hpi_control_cache *hpi_alloc_control_cache(const u32 control_count,
	const u32 size_in_bytes, u8 *p_dsp_control_buffer)
{}

void hpi_free_control_cache(struct hpi_control_cache *p_cache)
{}

static void subsys_message(struct hpi_message *phm, struct hpi_response *phr)
{}

void HPI_COMMON(struct hpi_message *phm, struct hpi_response *phr)
{}