linux/sound/pci/pcxhr/pcxhr_mixer.c

// SPDX-License-Identifier: GPL-2.0-or-later
#define __NO_VERSION__
/*
 * Driver for Digigram pcxhr compatible soundcards
 *
 * mixer callbacks
 *
 * Copyright (c) 2004 by Digigram <[email protected]>
 */

#include <linux/time.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/mutex.h>
#include <sound/core.h>
#include "pcxhr.h"
#include "pcxhr_hwdep.h"
#include "pcxhr_core.h"
#include <sound/control.h>
#include <sound/tlv.h>
#include <sound/asoundef.h>
#include "pcxhr_mixer.h"
#include "pcxhr_mix22.h"

#define PCXHR_LINE_CAPTURE_LEVEL_MIN
#define PCXHR_LINE_CAPTURE_LEVEL_MAX
#define PCXHR_LINE_CAPTURE_ZERO_LEVEL

#define PCXHR_LINE_PLAYBACK_LEVEL_MIN
#define PCXHR_LINE_PLAYBACK_LEVEL_MAX
#define PCXHR_LINE_PLAYBACK_ZERO_LEVEL

static const DECLARE_TLV_DB_SCALE(db_scale_analog_capture, -11200, 50, 1550);
static const DECLARE_TLV_DB_SCALE(db_scale_analog_playback, -10400, 100, 2400);

static const DECLARE_TLV_DB_SCALE(db_scale_a_hr222_capture, -11150, 50, 1600);
static const DECLARE_TLV_DB_SCALE(db_scale_a_hr222_playback, -2550, 50, 2400);

static int pcxhr_update_analog_audio_level(struct snd_pcxhr *chip,
					   int is_capture, int channel)
{}

/*
 * analog level control
 */
static int pcxhr_analog_vol_info(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_info *uinfo)
{}

static int pcxhr_analog_vol_get(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_analog_vol_put(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new pcxhr_control_analog_level =;

/* shared */

#define pcxhr_sw_info

static int pcxhr_audio_sw_get(struct snd_kcontrol *kcontrol,
			      struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_audio_sw_put(struct snd_kcontrol *kcontrol,
			      struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new pcxhr_control_output_switch =;


#define PCXHR_DIGITAL_LEVEL_MIN
#define PCXHR_DIGITAL_LEVEL_MAX
#define PCXHR_DIGITAL_ZERO_LEVEL

static const DECLARE_TLV_DB_SCALE(db_scale_digital, -10975, 25, 1800);

#define MORE_THAN_ONE_STREAM_LEVEL
#define VALID_STREAM_PAN_LEVEL_MASK
#define VALID_STREAM_LEVEL_MASK
#define VALID_STREAM_LEVEL_1_MASK
#define VALID_STREAM_LEVEL_2_MASK

static int pcxhr_update_playback_stream_level(struct snd_pcxhr* chip, int idx)
{}

#define AUDIO_IO_HAS_MUTE_LEVEL
#define AUDIO_IO_HAS_MUTE_MONITOR_1
#define VALID_AUDIO_IO_DIGITAL_LEVEL
#define VALID_AUDIO_IO_MONITOR_LEVEL
#define VALID_AUDIO_IO_MUTE_LEVEL
#define VALID_AUDIO_IO_MUTE_MONITOR_1

static int pcxhr_update_audio_pipe_level(struct snd_pcxhr *chip,
					 int capture, int channel)
{}


/* shared */
static int pcxhr_digital_vol_info(struct snd_kcontrol *kcontrol,
				  struct snd_ctl_elem_info *uinfo)
{}


static int pcxhr_pcm_vol_get(struct snd_kcontrol *kcontrol,
			     struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_pcm_vol_put(struct snd_kcontrol *kcontrol,
			     struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new snd_pcxhr_pcm_vol =;


static int pcxhr_pcm_sw_get(struct snd_kcontrol *kcontrol,
			    struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_pcm_sw_put(struct snd_kcontrol *kcontrol,
			    struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new pcxhr_control_pcm_switch =;


/*
 * monitoring level control
 */

static int pcxhr_monitor_vol_get(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_monitor_vol_put(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new pcxhr_control_monitor_vol =;

/*
 * monitoring switch control
 */

static int pcxhr_monitor_sw_get(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_monitor_sw_put(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new pcxhr_control_monitor_sw =;



/*
 * audio source select
 */
#define PCXHR_SOURCE_AUDIO01_UER
#define PCXHR_SOURCE_AUDIO01_SYNC
#define PCXHR_SOURCE_AUDIO23_UER
#define PCXHR_SOURCE_AUDIO45_UER
#define PCXHR_SOURCE_AUDIO67_UER

static int pcxhr_set_audio_source(struct snd_pcxhr* chip)
{}

static int pcxhr_audio_src_info(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_info *uinfo)
{}

static int pcxhr_audio_src_get(struct snd_kcontrol *kcontrol,
			       struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_audio_src_put(struct snd_kcontrol *kcontrol,
			       struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new pcxhr_control_audio_src =;


/*
 * clock type selection
 * enum pcxhr_clock_type {
 *	PCXHR_CLOCK_TYPE_INTERNAL = 0,
 *	PCXHR_CLOCK_TYPE_WORD_CLOCK,
 *	PCXHR_CLOCK_TYPE_AES_SYNC,
 *	PCXHR_CLOCK_TYPE_AES_1,
 *	PCXHR_CLOCK_TYPE_AES_2,
 *	PCXHR_CLOCK_TYPE_AES_3,
 *	PCXHR_CLOCK_TYPE_AES_4,
 *	PCXHR_CLOCK_TYPE_MAX = PCXHR_CLOCK_TYPE_AES_4,
 *	HR22_CLOCK_TYPE_INTERNAL = PCXHR_CLOCK_TYPE_INTERNAL,
 *	HR22_CLOCK_TYPE_AES_SYNC,
 *	HR22_CLOCK_TYPE_AES_1,
 *	HR22_CLOCK_TYPE_MAX = HR22_CLOCK_TYPE_AES_1,
 * };
 */

static int pcxhr_clock_type_info(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_info *uinfo)
{}

static int pcxhr_clock_type_get(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_clock_type_put(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new pcxhr_control_clock_type =;

/*
 * clock rate control
 * specific control that scans the sample rates on the external plugs
 */
static int pcxhr_clock_rate_info(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_info *uinfo)
{}

static int pcxhr_clock_rate_get(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new pcxhr_control_clock_rate =;

/*
 * IEC958 status bits
 */
static int pcxhr_iec958_info(struct snd_kcontrol *kcontrol,
			     struct snd_ctl_elem_info *uinfo)
{}

static int pcxhr_iec958_capture_byte(struct snd_pcxhr *chip,
				     int aes_idx, unsigned char *aes_bits)
{}

static int pcxhr_iec958_get(struct snd_kcontrol *kcontrol,
			    struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_iec958_mask_get(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_value *ucontrol)
{}

static int pcxhr_iec958_update_byte(struct snd_pcxhr *chip,
				    int aes_idx, unsigned char aes_bits)
{}

static int pcxhr_iec958_put(struct snd_kcontrol *kcontrol,
			    struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new pcxhr_control_playback_iec958_mask =;
static const struct snd_kcontrol_new pcxhr_control_playback_iec958 =;

static const struct snd_kcontrol_new pcxhr_control_capture_iec958_mask =;
static const struct snd_kcontrol_new pcxhr_control_capture_iec958 =;

static void pcxhr_init_audio_levels(struct snd_pcxhr *chip)
{}


int pcxhr_create_mixer(struct pcxhr_mgr *mgr)
{}