diff options
author | Tobin Davis <tdavis@dsl-only.net> | 2006-11-20 11:42:09 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-02-09 03:01:39 -0500 |
commit | 5cd575290b4481b3a6ea307afed760df60d01cbc (patch) | |
tree | 101ec0e04a357d5f35b52ced5f30901640cf96a1 /sound/pci | |
parent | 14e1d357e4fed9577d349952b71ec7d81aad710c (diff) |
[ALSA] hda-codec - Add missing array to conexant driver
This patch adds a missing array to the conexant driver.
Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 9b69b62a550e..7e7d0c110c4c 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -552,6 +552,9 @@ static hda_nid_t cxt5045_adc_nids[1] = { 0x1a }; | |||
552 | static hda_nid_t cxt5045_capsrc_nids[1] = { 0x1a }; | 552 | static hda_nid_t cxt5045_capsrc_nids[1] = { 0x1a }; |
553 | #define CXT5045_SPDIF_OUT 0x13 | 553 | #define CXT5045_SPDIF_OUT 0x13 |
554 | 554 | ||
555 | static struct hda_channel_mode cxt5045_modes[1] = { | ||
556 | { 2, NULL }, | ||
557 | }; | ||
555 | 558 | ||
556 | static struct hda_input_mux cxt5045_capture_source = { | 559 | static struct hda_input_mux cxt5045_capture_source = { |
557 | .num_items = 2, | 560 | .num_items = 2, |
@@ -842,6 +845,9 @@ static int patch_cxt5045(struct hda_codec *codec) | |||
842 | spec->num_init_verbs = 1; | 845 | spec->num_init_verbs = 1; |
843 | spec->init_verbs[0] = cxt5045_init_verbs; | 846 | spec->init_verbs[0] = cxt5045_init_verbs; |
844 | spec->spdif_route = 0; | 847 | spec->spdif_route = 0; |
848 | spec->num_channel_mode = ARRAY_SIZE(cxt5045_modes), | ||
849 | spec->channel_mode = cxt5045_modes, | ||
850 | |||
845 | 851 | ||
846 | codec->patch_ops = conexant_patch_ops; | 852 | codec->patch_ops = conexant_patch_ops; |
847 | codec->patch_ops.unsol_event = cxt5045_hp_unsol_event; | 853 | codec->patch_ops.unsol_event = cxt5045_hp_unsol_event; |
@@ -873,6 +879,9 @@ static hda_nid_t cxt5047_adc_nids[1] = { 0x12 }; | |||
873 | static hda_nid_t cxt5047_capsrc_nids[1] = { 0x1a }; | 879 | static hda_nid_t cxt5047_capsrc_nids[1] = { 0x1a }; |
874 | #define CXT5047_SPDIF_OUT 0x11 | 880 | #define CXT5047_SPDIF_OUT 0x11 |
875 | 881 | ||
882 | static struct hda_channel_mode cxt5047_modes[1] = { | ||
883 | { 2, NULL }, | ||
884 | }; | ||
876 | 885 | ||
877 | static struct hda_input_mux cxt5047_capture_source = { | 886 | static struct hda_input_mux cxt5047_capture_source = { |
878 | .num_items = 2, | 887 | .num_items = 2, |
@@ -1039,7 +1048,7 @@ static struct hda_verb cxt5047_init_verbs[] = { | |||
1039 | {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 }, | 1048 | {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_50 }, |
1040 | /* HP, Amp */ | 1049 | /* HP, Amp */ |
1041 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | 1050 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, |
1042 | {0x1A, AC_VERB_SET_CONNECT_SEL,0x01}, | 1051 | {0x1A, AC_VERB_SET_CONNECT_SEL,0x03}, |
1043 | {0x1A, AC_VERB_SET_AMP_GAIN_MUTE, | 1052 | {0x1A, AC_VERB_SET_AMP_GAIN_MUTE, |
1044 | AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x00}, | 1053 | AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x00}, |
1045 | {0x1A, AC_VERB_SET_AMP_GAIN_MUTE, | 1054 | {0x1A, AC_VERB_SET_AMP_GAIN_MUTE, |
@@ -1111,9 +1120,9 @@ static struct snd_kcontrol_new cxt5047_test_mixer[] = { | |||
1111 | HDA_CODEC_VOLUME("CD Playback Volume", 0x19, 0x04, HDA_INPUT), | 1120 | HDA_CODEC_VOLUME("CD Playback Volume", 0x19, 0x04, HDA_INPUT), |
1112 | HDA_CODEC_MUTE("CD Playback Switch", 0x19, 0x04, HDA_INPUT), | 1121 | HDA_CODEC_MUTE("CD Playback Switch", 0x19, 0x04, HDA_INPUT), |
1113 | 1122 | ||
1123 | #if 0 | ||
1114 | /* Controls for GPIO pins, assuming they exist and are configured as outputs */ | 1124 | /* Controls for GPIO pins, assuming they exist and are configured as outputs */ |
1115 | CXT_GPIO_DATA_SWITCH("GPIO pin 0", 0x01, 0x01), | 1125 | CXT_GPIO_DATA_SWITCH("GPIO pin 0", 0x01, 0x01), |
1116 | #if 0 /* limit this to one GPIO pin for now */ | ||
1117 | CXT_GPIO_DATA_SWITCH("GPIO pin 1", 0x01, 0x02), | 1126 | CXT_GPIO_DATA_SWITCH("GPIO pin 1", 0x01, 0x02), |
1118 | CXT_GPIO_DATA_SWITCH("GPIO pin 2", 0x01, 0x04), | 1127 | CXT_GPIO_DATA_SWITCH("GPIO pin 2", 0x01, 0x04), |
1119 | CXT_GPIO_DATA_SWITCH("GPIO pin 3", 0x01, 0x08), | 1128 | CXT_GPIO_DATA_SWITCH("GPIO pin 3", 0x01, 0x08), |
@@ -1262,6 +1271,8 @@ static int patch_cxt5047(struct hda_codec *codec) | |||
1262 | spec->num_init_verbs = 1; | 1271 | spec->num_init_verbs = 1; |
1263 | spec->init_verbs[0] = cxt5047_init_verbs; | 1272 | spec->init_verbs[0] = cxt5047_init_verbs; |
1264 | spec->spdif_route = 0; | 1273 | spec->spdif_route = 0; |
1274 | spec->num_channel_mode = ARRAY_SIZE(cxt5047_modes), | ||
1275 | spec->channel_mode = cxt5047_modes, | ||
1265 | 1276 | ||
1266 | codec->patch_ops = conexant_patch_ops; | 1277 | codec->patch_ops = conexant_patch_ops; |
1267 | codec->patch_ops.unsol_event = cxt5047_hp_unsol_event; | 1278 | codec->patch_ops.unsol_event = cxt5047_hp_unsol_event; |