3
* This file is part of Open Sound System.
5
* Copyright (C) 4Front Technologies 1996-2008.
7
* This this source file is released under GPL v2 license (no other versions).
8
* See the COPYING file included in the main directory of this source
9
* distribution for the license terms and conditions.
12
/* Codec index is 0 */
13
/* Codec vendor 0804:73dc */
14
/* HD codec revision 1.0 (2.1) (0x00100201) */
15
/* Subsystem ID 104d2200 */
16
/* Default amplifier caps: in=80050f00, out=80027f7f */
17
#include "oss_hdaudio_cfg.h"
19
#include "hdaudio_codec.h"
20
#include "hdaudio_dedicated.h"
23
hdaudio_vaio_vgn_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad,
28
DDB (cmn_err (CE_CONT, "hdaudio_vaio_vgn_mixer_init got called.\n"));
30
HDA_OUTAMP_F (0x05, top_group, "speaker", 90, MIXF_MAINVOL);
31
/* We sync the volume of the headphone DAC to the speaker DAC */
33
HDA_OUTAMP_F (0x02, top_group, "headphone", 90, MIXF_MAINVOL);
37
HDA_SETSELECT (0x0f, 0); /* Int speaker mode */
38
HDA_SETSELECT (0x14, 1); /* Int mic mode */
40
/* Handle PIN widgets */
42
int n, group, pin_group;
46
HDA_GROUP (pin_group, top_group, "jack");
48
if (HDA_PIN_GROUP (0x0a, group, pin_group, "headphone", n, "jack", 4)) /* Pin widget 0x0a */
51
if (HDA_PINSELECT (0x0a, ctl, group, "mode", -1))
52
HDA_CHOICES (ctl, "pcm-out input");
53
HDA_OUTMUTE (0x0a, group, "mute", UNMUTE);
56
if (HDA_PIN_GROUP (0x0b, group, pin_group, "black", n, "jack", 4)) /* Pin widget 0x0b */
59
if (HDA_PINSELECT (0x0b, ctl, group, "mode", -1))
60
HDA_CHOICES (ctl, "pcm-out input");
61
HDA_OUTMUTE (0x0b, group, "mute", UNMUTE);
63
/* Widget 0x04 (pcm) */
64
HDA_OUTAMP (0x04, group, "-", 90);
67
if (HDA_PIN_GROUP (0x0c, group, pin_group, "black", n, "jack", 4)) /* Pin widget 0x0c */
70
if (HDA_PINSELECT (0x0c, ctl, group, "mode", -1))
71
HDA_CHOICES (ctl, "pcm-out input");
72
HDA_OUTMUTE (0x0c, group, "mute", UNMUTE);
74
/* Widget 0x03 (pcm) */
75
HDA_OUTAMP (0x03, group, "-", 90);
78
if (HDA_PIN_GROUP (0x0d, group, pin_group, "red", n, "jack", 4)) /* Pin widget 0x0d */
81
if (HDA_PINSELECT (0x0d, ctl, group, "mode", -1))
82
HDA_CHOICES (ctl, "pcm-out input");
83
HDA_OUTMUTE (0x0d, group, "mute", UNMUTE);
86
if (HDA_PIN_GROUP (0x0e, group, pin_group, "black", n, "jack", 4)) /* Pin widget 0x0e */
88
if (HDA_PINSELECT (0x0e, ctl, group, "mode", -1))
89
HDA_CHOICES (ctl, "input");
92
/* Handle ADC widgets */
94
int n, group, rec_group;
98
HDA_GROUP (rec_group, top_group, "record");
100
if (HDA_ADC_GROUP (0x06, group, rec_group, "rec1", n, "record", 4)) /* ADC widget 0x06 */
104
/* Widget 0x07 (rec) */
106
HDA_INAMP_F (0x07, 0, group, "black", 80, MIXF_RECVOL); /* From widget 0x0e */
109
if (HDA_ADC_GROUP (0x08, group, rec_group, "rec", n, "record", 8)) /* ADC widget 0x08 */
113
/* Widget 0x09 (rec) */
115
HDA_INAMP_F (0x09, 0, group, "rec", 80, MIXF_RECVOL); /* From widget 0x15 */
117
/* Widget 0x15 (rec) */
120
/* Src 0x14=int-mic */
122
if (HDA_SELECT (0x15, "src", ctl, group, -1))
124
HDA_CHOICES (ctl, "headphone mic int-mic pcm");
126
HDA_OUTAMP (0x15, group, "micboost", 0);
129
if (HDA_ADC_GROUP (0x12, group, rec_group, "spdifin", n, "record", 4)) /* ADC widget 0x12 */
131
/* Src 0x13=speaker */
134
/* Handle misc widgets */
137
if (HDA_MISC_GROUP (0x16, group, misc_group, "beep", n, "misc", 8)) /* Misc widget 0x16 */
139
HDA_OUTAMP (0x16, group, "-", 90);