ac97_alc.c revision 33ab04ab97e6a2ee82971255446a0aa4eace756e
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*/
#include "ac97_impl.h"
#define ALC_DATA_FLOW_CTRL_REGISTER 0x6a
#define ADFC_SPDIFIN_EN 0x8000
#define ADFC_SPDIFIN_MON_EN 0x4000
#define ADFC_SPDIF_OUT_MASK 0x3000
#define ADFC_SPDIF_OUT_ACLINK 0x0000
#define ADFC_SPDIF_OUT_ADC 0x1000
#define ADFC_SPDIF_OUT_BYPASS 0x2000
#define ADFC_PCM_SPDIFIN 0x0800
#define ADFC_MIC 0x0000
#define ADFC_SURROUND 0x0200
#define ADFC_LINEIN 0x0000
#define ADFC_ANALOG_INPUT_PASS_CLFE 0x0020
#define ADFC_ANALOG_INPUT_PASS_SURROUND 0x0010
#define ADFC_SURROUND_MIRROR 0x0001
#define ALC_SURROUND_DAC_REGISTER 0x64
#define ASD_SURROUND_MUTE 0x8000
#define ASD_SURR_LEFT_VOL 0x1f00
#define ASD_SURR_RIGHT_VOL 0x001f
#define ALC_CEN_LFE_DAC_REGISTER 0x66
#define ACLD_CEN_LFE_MUTE 0x8000
#define ACLD_LFE_VOL 0x1f00
#define ACLD_CEN_VOL 0x001f
#define ALC_MISC_CTRL_REGISTER 0x7a
#define AMC_XTLSEL 0x8000
#define AMC_VREFOUT_DIS 0x1000
#define AMC_INDEP_MUTE_CTRL 0x0800
#define AMC_JD2_SURR_CEN_LFE 0x0008
#define AMC_JD1_SURR_CEN_LFE 0x0004
#define AMC_PIN47_SPDIF 0x0002
#define AMC_PIN47_EAPD 0x0000
#define AMC_JD0_SURR_CEN_LFE 0x0001
static void
{
if (value & 2) {
} else {
}
}
static void
{
if (value & 2) {
} else {
}
}
#if 0
static void
{
if (value & 2) {
} else {
}
}
#endif
static void
{
/* limit input values to 16 bits and split to right and left */
/* If this control is mute-able than set as muted if needed */
/* select page 0 */
/* adjust all three PCM volumes */
}
static const char *alc_linein_funcs[] = {
};
static const char *alc_mic_funcs[] = {
};
static ac97_ctrl_probe_t alc650_linein_func_cpt = {
};
static ac97_ctrl_probe_t alc650_mic_func_cpt = {
};
static void
{
/* override master PCM volume function */
}
}
void
{
int ival;
}
}
}
void
{
/*
* NB: We could probably enable 7.1 here using the AUXIN source,
* but there are a few details still missing from the data sheet.
* (Such as, how is volume from the back-surround DAC managed?,
* and what SDATA slots are the back surround delivered on?)
*
* Also, the AC'97 controllers themselves don't necessarily support
* 7.1, so we'd have to figure out how to coordinate detection
* with the controller. 5.1 should be good enough for now.
*
* Unlike other products, ALC850 has separate pins for 5.1 data,
* so jack retasking isn't needed. However, it can retask
* some jacks, but we don't have full details for that right
* now. We've not seen it on any systems (yet) where this was
* necessary, though.
*/
}