~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to sound/pci/hda/patch_cmedia.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        int num_dacs;
54
54
 
55
55
        /* capture */
56
 
        hda_nid_t *adc_nids;
 
56
        const hda_nid_t *adc_nids;
57
57
        hda_nid_t dig_in_nid;
58
58
 
59
59
        /* capture source */
110
110
 */
111
111
 
112
112
/* 3-stack / 2 channel */
113
 
static struct hda_verb cmi9880_ch2_init[] = {
 
113
static const struct hda_verb cmi9880_ch2_init[] = {
114
114
        /* set line-in PIN for input */
115
115
        { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
116
116
        /* set mic PIN for input, also enable vref */
121
121
};
122
122
 
123
123
/* 3-stack / 6 channel */
124
 
static struct hda_verb cmi9880_ch6_init[] = {
 
124
static const struct hda_verb cmi9880_ch6_init[] = {
125
125
        /* set line-in PIN for output */
126
126
        { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
127
127
        /* set mic PIN for output */
132
132
};
133
133
 
134
134
/* 3-stack+front / 8 channel */
135
 
static struct hda_verb cmi9880_ch8_init[] = {
 
135
static const struct hda_verb cmi9880_ch8_init[] = {
136
136
        /* set line-in PIN for output */
137
137
        { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
138
138
        /* set mic PIN for output */
142
142
        {}
143
143
};
144
144
 
145
 
static struct hda_channel_mode cmi9880_channel_modes[3] = {
 
145
static const struct hda_channel_mode cmi9880_channel_modes[3] = {
146
146
        { 2, cmi9880_ch2_init },
147
147
        { 6, cmi9880_ch6_init },
148
148
        { 8, cmi9880_ch8_init },
174
174
 
175
175
/*
176
176
 */
177
 
static struct snd_kcontrol_new cmi9880_basic_mixer[] = {
 
177
static const struct snd_kcontrol_new cmi9880_basic_mixer[] = {
178
178
        /* CMI9880 has no playback volumes! */
179
179
        HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), /* front */
180
180
        HDA_CODEC_MUTE("Surround Playback Switch", 0x04, 0x0, HDA_OUTPUT),
205
205
/*
206
206
 * shared I/O pins
207
207
 */
208
 
static struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = {
 
208
static const struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = {
209
209
        {
210
210
                .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
211
211
                .name = "Channel Mode",
219
219
/* AUD-in selections:
220
220
 * 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x1f 0x20
221
221
 */
222
 
static struct hda_input_mux cmi9880_basic_mux = {
 
222
static const struct hda_input_mux cmi9880_basic_mux = {
223
223
        .num_items = 4,
224
224
        .items = {
225
225
                { "Front Mic", 0x5 },
229
229
        }
230
230
};
231
231
 
232
 
static struct hda_input_mux cmi9880_no_line_mux = {
 
232
static const struct hda_input_mux cmi9880_no_line_mux = {
233
233
        .num_items = 3,
234
234
        .items = {
235
235
                { "Front Mic", 0x5 },
239
239
};
240
240
 
241
241
/* front, rear, clfe, rear_surr */
242
 
static hda_nid_t cmi9880_dac_nids[4] = {
 
242
static const hda_nid_t cmi9880_dac_nids[4] = {
243
243
        0x03, 0x04, 0x05, 0x06
244
244
};
245
245
/* ADC0, ADC1 */
246
 
static hda_nid_t cmi9880_adc_nids[2] = {
 
246
static const hda_nid_t cmi9880_adc_nids[2] = {
247
247
        0x08, 0x09
248
248
};
249
249
 
252
252
 
253
253
/*
254
254
 */
255
 
static struct hda_verb cmi9880_basic_init[] = {
 
255
static const struct hda_verb cmi9880_basic_init[] = {
256
256
        /* port-D for line out (rear panel) */
257
257
        { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
258
258
        /* port-E for HP out (front panel) */
281
281
        {} /* terminator */
282
282
};
283
283
 
284
 
static struct hda_verb cmi9880_allout_init[] = {
 
284
static const struct hda_verb cmi9880_allout_init[] = {
285
285
        /* port-D for line out (rear panel) */
286
286
        { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP },
287
287
        /* port-E for HP out (front panel) */
528
528
 
529
529
/*
530
530
 */
531
 
static struct hda_pcm_stream cmi9880_pcm_analog_playback = {
 
531
static const struct hda_pcm_stream cmi9880_pcm_analog_playback = {
532
532
        .substreams = 1,
533
533
        .channels_min = 2,
534
534
        .channels_max = 8,
540
540
        },
541
541
};
542
542
 
543
 
static struct hda_pcm_stream cmi9880_pcm_analog_capture = {
 
543
static const struct hda_pcm_stream cmi9880_pcm_analog_capture = {
544
544
        .substreams = 2,
545
545
        .channels_min = 2,
546
546
        .channels_max = 2,
551
551
        },
552
552
};
553
553
 
554
 
static struct hda_pcm_stream cmi9880_pcm_digital_playback = {
 
554
static const struct hda_pcm_stream cmi9880_pcm_digital_playback = {
555
555
        .substreams = 1,
556
556
        .channels_min = 2,
557
557
        .channels_max = 2,
563
563
        },
564
564
};
565
565
 
566
 
static struct hda_pcm_stream cmi9880_pcm_digital_capture = {
 
566
static const struct hda_pcm_stream cmi9880_pcm_digital_capture = {
567
567
        .substreams = 1,
568
568
        .channels_min = 2,
569
569
        .channels_max = 2,
617
617
        [CMI_AUTO]      = "auto",
618
618
};
619
619
 
620
 
static struct snd_pci_quirk cmi9880_cfg_tbl[] = {
 
620
static const struct snd_pci_quirk cmi9880_cfg_tbl[] = {
621
621
        SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", CMI_FULL_DIG),
622
622
        SND_PCI_QUIRK(0x1854, 0x002b, "LG LS75", CMI_MINIMAL),
623
623
        SND_PCI_QUIRK(0x1854, 0x0032, "LG", CMI_FULL_DIG),
624
624
        {} /* terminator */
625
625
};
626
626
 
627
 
static struct hda_codec_ops cmi9880_patch_ops = {
 
627
static const struct hda_codec_ops cmi9880_patch_ops = {
628
628
        .build_controls = cmi9880_build_controls,
629
629
        .build_pcms = cmi9880_build_pcms,
630
630
        .init = cmi9880_init,
745
745
/*
746
746
 * patch entries
747
747
 */
748
 
static struct hda_codec_preset snd_hda_preset_cmedia[] = {
 
748
static const struct hda_codec_preset snd_hda_preset_cmedia[] = {
749
749
        { .id = 0x13f69880, .name = "CMI9880", .patch = patch_cmi9880 },
750
750
        { .id = 0x434d4980, .name = "CMI9880", .patch = patch_cmi9880 },
751
751
        {} /* terminator */