Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248453
b: refs/heads/master
c: 779d065
h: refs/heads/master
i:
  248451: 3225de5
v: v3
  • Loading branch information
Takashi Iwai committed May 2, 2011
1 parent 5d484a6 commit ebe3e64
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 498f5b175b90597608e48390183933d3875d5429
refs/heads/master: 779d065983f30b952d66e34d230b244f44a4e032
40 changes: 20 additions & 20 deletions trunk/sound/pci/hda/patch_cmedia.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct cmi_spec {
int num_dacs;

/* capture */
hda_nid_t *adc_nids;
const hda_nid_t *adc_nids;
hda_nid_t dig_in_nid;

/* capture source */
Expand Down Expand Up @@ -110,7 +110,7 @@ static int cmi_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
*/

/* 3-stack / 2 channel */
static struct hda_verb cmi9880_ch2_init[] = {
static const struct hda_verb cmi9880_ch2_init[] = {
/* set line-in PIN for input */
{ 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
/* set mic PIN for input, also enable vref */
Expand All @@ -121,7 +121,7 @@ static struct hda_verb cmi9880_ch2_init[] = {
};

/* 3-stack / 6 channel */
static struct hda_verb cmi9880_ch6_init[] = {
static const struct hda_verb cmi9880_ch6_init[] = {
/* set line-in PIN for output */
{ 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
/* set mic PIN for output */
Expand All @@ -132,7 +132,7 @@ static struct hda_verb cmi9880_ch6_init[] = {
};

/* 3-stack+front / 8 channel */
static struct hda_verb cmi9880_ch8_init[] = {
static const struct hda_verb cmi9880_ch8_init[] = {
/* set line-in PIN for output */
{ 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
/* set mic PIN for output */
Expand All @@ -142,7 +142,7 @@ static struct hda_verb cmi9880_ch8_init[] = {
{}
};

static struct hda_channel_mode cmi9880_channel_modes[3] = {
static const struct hda_channel_mode cmi9880_channel_modes[3] = {
{ 2, cmi9880_ch2_init },
{ 6, cmi9880_ch6_init },
{ 8, cmi9880_ch8_init },
Expand Down Expand Up @@ -174,7 +174,7 @@ static int cmi_ch_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_va

/*
*/
static struct snd_kcontrol_new cmi9880_basic_mixer[] = {
static const struct snd_kcontrol_new cmi9880_basic_mixer[] = {
/* CMI9880 has no playback volumes! */
HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), /* front */
HDA_CODEC_MUTE("Surround Playback Switch", 0x04, 0x0, HDA_OUTPUT),
Expand Down Expand Up @@ -205,7 +205,7 @@ static struct snd_kcontrol_new cmi9880_basic_mixer[] = {
/*
* shared I/O pins
*/
static struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = {
static const struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = {
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Channel Mode",
Expand All @@ -219,7 +219,7 @@ static struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = {
/* AUD-in selections:
* 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x1f 0x20
*/
static struct hda_input_mux cmi9880_basic_mux = {
static const struct hda_input_mux cmi9880_basic_mux = {
.num_items = 4,
.items = {
{ "Front Mic", 0x5 },
Expand All @@ -229,7 +229,7 @@ static struct hda_input_mux cmi9880_basic_mux = {
}
};

static struct hda_input_mux cmi9880_no_line_mux = {
static const struct hda_input_mux cmi9880_no_line_mux = {
.num_items = 3,
.items = {
{ "Front Mic", 0x5 },
Expand All @@ -239,11 +239,11 @@ static struct hda_input_mux cmi9880_no_line_mux = {
};

/* front, rear, clfe, rear_surr */
static hda_nid_t cmi9880_dac_nids[4] = {
static const hda_nid_t cmi9880_dac_nids[4] = {
0x03, 0x04, 0x05, 0x06
};
/* ADC0, ADC1 */
static hda_nid_t cmi9880_adc_nids[2] = {
static const hda_nid_t cmi9880_adc_nids[2] = {
0x08, 0x09
};

Expand All @@ -252,7 +252,7 @@ static hda_nid_t cmi9880_adc_nids[2] = {

/*
*/
static struct hda_verb cmi9880_basic_init[] = {
static const struct hda_verb cmi9880_basic_init[] = {
/* port-D for line out (rear panel) */
{ 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
/* port-E for HP out (front panel) */
Expand Down Expand Up @@ -281,7 +281,7 @@ static struct hda_verb cmi9880_basic_init[] = {
{} /* terminator */
};

static struct hda_verb cmi9880_allout_init[] = {
static const struct hda_verb cmi9880_allout_init[] = {
/* port-D for line out (rear panel) */
{ 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
/* port-E for HP out (front panel) */
Expand Down Expand Up @@ -528,7 +528,7 @@ static int cmi9880_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,

/*
*/
static struct hda_pcm_stream cmi9880_pcm_analog_playback = {
static const struct hda_pcm_stream cmi9880_pcm_analog_playback = {
.substreams = 1,
.channels_min = 2,
.channels_max = 8,
Expand All @@ -540,7 +540,7 @@ static struct hda_pcm_stream cmi9880_pcm_analog_playback = {
},
};

static struct hda_pcm_stream cmi9880_pcm_analog_capture = {
static const struct hda_pcm_stream cmi9880_pcm_analog_capture = {
.substreams = 2,
.channels_min = 2,
.channels_max = 2,
Expand All @@ -551,7 +551,7 @@ static struct hda_pcm_stream cmi9880_pcm_analog_capture = {
},
};

static struct hda_pcm_stream cmi9880_pcm_digital_playback = {
static const struct hda_pcm_stream cmi9880_pcm_digital_playback = {
.substreams = 1,
.channels_min = 2,
.channels_max = 2,
Expand All @@ -563,7 +563,7 @@ static struct hda_pcm_stream cmi9880_pcm_digital_playback = {
},
};

static struct hda_pcm_stream cmi9880_pcm_digital_capture = {
static const struct hda_pcm_stream cmi9880_pcm_digital_capture = {
.substreams = 1,
.channels_min = 2,
.channels_max = 2,
Expand Down Expand Up @@ -617,14 +617,14 @@ static const char * const cmi9880_models[CMI_MODELS] = {
[CMI_AUTO] = "auto",
};

static struct snd_pci_quirk cmi9880_cfg_tbl[] = {
static const struct snd_pci_quirk cmi9880_cfg_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", CMI_FULL_DIG),
SND_PCI_QUIRK(0x1854, 0x002b, "LG LS75", CMI_MINIMAL),
SND_PCI_QUIRK(0x1854, 0x0032, "LG", CMI_FULL_DIG),
{} /* terminator */
};

static struct hda_codec_ops cmi9880_patch_ops = {
static const struct hda_codec_ops cmi9880_patch_ops = {
.build_controls = cmi9880_build_controls,
.build_pcms = cmi9880_build_pcms,
.init = cmi9880_init,
Expand Down Expand Up @@ -745,7 +745,7 @@ static int patch_cmi9880(struct hda_codec *codec)
/*
* patch entries
*/
static struct hda_codec_preset snd_hda_preset_cmedia[] = {
static const struct hda_codec_preset snd_hda_preset_cmedia[] = {
{ .id = 0x13f69880, .name = "CMI9880", .patch = patch_cmi9880 },
{ .id = 0x434d4980, .name = "CMI9880", .patch = patch_cmi9880 },
{} /* terminator */
Expand Down

0 comments on commit ebe3e64

Please sign in to comment.