aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c90
-rw-r--r--sound/pci/hda/hda_codec.h14
-rw-r--r--sound/pci/hda/hda_generic.c20
-rw-r--r--sound/pci/hda/hda_local.h36
-rw-r--r--sound/pci/hda/hda_proc.c12
-rw-r--r--sound/pci/hda/patch_analog.c42
-rw-r--r--sound/pci/hda/patch_cmedia.c30
-rw-r--r--sound/pci/hda/patch_realtek.c88
-rw-r--r--sound/pci/hda/patch_si3054.c20
-rw-r--r--sound/pci/hda/patch_sigmatel.c44
10 files changed, 198 insertions, 198 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 2e9f5877386e..7f4e19951bae 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -332,7 +332,7 @@ static int snd_hda_bus_free(struct hda_bus *bus)
332 return 0; 332 return 0;
333} 333}
334 334
335static int snd_hda_bus_dev_free(snd_device_t *device) 335static int snd_hda_bus_dev_free(struct snd_device *device)
336{ 336{
337 struct hda_bus *bus = device->device_data; 337 struct hda_bus *bus = device->device_data;
338 return snd_hda_bus_free(bus); 338 return snd_hda_bus_free(bus);
@@ -346,12 +346,12 @@ static int snd_hda_bus_dev_free(snd_device_t *device)
346 * 346 *
347 * Returns 0 if successful, or a negative error code. 347 * Returns 0 if successful, or a negative error code.
348 */ 348 */
349int snd_hda_bus_new(snd_card_t *card, const struct hda_bus_template *temp, 349int snd_hda_bus_new(struct snd_card *card, const struct hda_bus_template *temp,
350 struct hda_bus **busp) 350 struct hda_bus **busp)
351{ 351{
352 struct hda_bus *bus; 352 struct hda_bus *bus;
353 int err; 353 int err;
354 static snd_device_ops_t dev_ops = { 354 static struct snd_device_ops dev_ops = {
355 .dev_free = snd_hda_bus_dev_free, 355 .dev_free = snd_hda_bus_dev_free,
356 }; 356 };
357 357
@@ -732,7 +732,7 @@ static int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid, int
732#define get_amp_index(kc) (((kc)->private_value >> 19) & 0xf) 732#define get_amp_index(kc) (((kc)->private_value >> 19) & 0xf)
733 733
734/* volume */ 734/* volume */
735int snd_hda_mixer_amp_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 735int snd_hda_mixer_amp_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
736{ 736{
737 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 737 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
738 u16 nid = get_amp_nid(kcontrol); 738 u16 nid = get_amp_nid(kcontrol);
@@ -753,7 +753,7 @@ int snd_hda_mixer_amp_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
753 return 0; 753 return 0;
754} 754}
755 755
756int snd_hda_mixer_amp_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 756int snd_hda_mixer_amp_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
757{ 757{
758 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 758 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
759 hda_nid_t nid = get_amp_nid(kcontrol); 759 hda_nid_t nid = get_amp_nid(kcontrol);
@@ -769,7 +769,7 @@ int snd_hda_mixer_amp_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
769 return 0; 769 return 0;
770} 770}
771 771
772int snd_hda_mixer_amp_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 772int snd_hda_mixer_amp_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
773{ 773{
774 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 774 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
775 hda_nid_t nid = get_amp_nid(kcontrol); 775 hda_nid_t nid = get_amp_nid(kcontrol);
@@ -791,7 +791,7 @@ int snd_hda_mixer_amp_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
791} 791}
792 792
793/* switch */ 793/* switch */
794int snd_hda_mixer_amp_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 794int snd_hda_mixer_amp_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
795{ 795{
796 int chs = get_amp_channels(kcontrol); 796 int chs = get_amp_channels(kcontrol);
797 797
@@ -802,7 +802,7 @@ int snd_hda_mixer_amp_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
802 return 0; 802 return 0;
803} 803}
804 804
805int snd_hda_mixer_amp_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 805int snd_hda_mixer_amp_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
806{ 806{
807 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 807 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
808 hda_nid_t nid = get_amp_nid(kcontrol); 808 hda_nid_t nid = get_amp_nid(kcontrol);
@@ -818,7 +818,7 @@ int snd_hda_mixer_amp_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
818 return 0; 818 return 0;
819} 819}
820 820
821int snd_hda_mixer_amp_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 821int snd_hda_mixer_amp_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
822{ 822{
823 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 823 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
824 hda_nid_t nid = get_amp_nid(kcontrol); 824 hda_nid_t nid = get_amp_nid(kcontrol);
@@ -849,7 +849,7 @@ int snd_hda_mixer_amp_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
849#define AMP_VAL_IDX_SHIFT 19 849#define AMP_VAL_IDX_SHIFT 19
850#define AMP_VAL_IDX_MASK (0x0f<<19) 850#define AMP_VAL_IDX_MASK (0x0f<<19)
851 851
852int snd_hda_mixer_bind_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 852int snd_hda_mixer_bind_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
853{ 853{
854 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 854 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
855 unsigned long pval; 855 unsigned long pval;
@@ -864,7 +864,7 @@ int snd_hda_mixer_bind_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
864 return err; 864 return err;
865} 865}
866 866
867int snd_hda_mixer_bind_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 867int snd_hda_mixer_bind_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
868{ 868{
869 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 869 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
870 unsigned long pval; 870 unsigned long pval;
@@ -889,14 +889,14 @@ int snd_hda_mixer_bind_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
889 * SPDIF out controls 889 * SPDIF out controls
890 */ 890 */
891 891
892static int snd_hda_spdif_mask_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 892static int snd_hda_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
893{ 893{
894 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; 894 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
895 uinfo->count = 1; 895 uinfo->count = 1;
896 return 0; 896 return 0;
897} 897}
898 898
899static int snd_hda_spdif_cmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 899static int snd_hda_spdif_cmask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
900{ 900{
901 ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL | 901 ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL |
902 IEC958_AES0_NONAUDIO | 902 IEC958_AES0_NONAUDIO |
@@ -907,7 +907,7 @@ static int snd_hda_spdif_cmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
907 return 0; 907 return 0;
908} 908}
909 909
910static int snd_hda_spdif_pmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 910static int snd_hda_spdif_pmask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
911{ 911{
912 ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL | 912 ucontrol->value.iec958.status[0] = IEC958_AES0_PROFESSIONAL |
913 IEC958_AES0_NONAUDIO | 913 IEC958_AES0_NONAUDIO |
@@ -915,7 +915,7 @@ static int snd_hda_spdif_pmask_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
915 return 0; 915 return 0;
916} 916}
917 917
918static int snd_hda_spdif_default_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 918static int snd_hda_spdif_default_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
919{ 919{
920 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 920 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
921 921
@@ -978,7 +978,7 @@ static unsigned int convert_to_spdif_status(unsigned short val)
978 return sbits; 978 return sbits;
979} 979}
980 980
981static int snd_hda_spdif_default_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 981static int snd_hda_spdif_default_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
982{ 982{
983 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 983 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
984 hda_nid_t nid = kcontrol->private_value; 984 hda_nid_t nid = kcontrol->private_value;
@@ -1004,7 +1004,7 @@ static int snd_hda_spdif_default_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_valu
1004 return change; 1004 return change;
1005} 1005}
1006 1006
1007static int snd_hda_spdif_out_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1007static int snd_hda_spdif_out_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1008{ 1008{
1009 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 1009 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
1010 uinfo->count = 1; 1010 uinfo->count = 1;
@@ -1013,7 +1013,7 @@ static int snd_hda_spdif_out_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_
1013 return 0; 1013 return 0;
1014} 1014}
1015 1015
1016static int snd_hda_spdif_out_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1016static int snd_hda_spdif_out_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1017{ 1017{
1018 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1018 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1019 1019
@@ -1021,7 +1021,7 @@ static int snd_hda_spdif_out_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_v
1021 return 0; 1021 return 0;
1022} 1022}
1023 1023
1024static int snd_hda_spdif_out_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1024static int snd_hda_spdif_out_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1025{ 1025{
1026 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1026 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1027 hda_nid_t nid = kcontrol->private_value; 1027 hda_nid_t nid = kcontrol->private_value;
@@ -1044,7 +1044,7 @@ static int snd_hda_spdif_out_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_v
1044 return change; 1044 return change;
1045} 1045}
1046 1046
1047static snd_kcontrol_new_t dig_mixes[] = { 1047static struct snd_kcontrol_new dig_mixes[] = {
1048 { 1048 {
1049 .access = SNDRV_CTL_ELEM_ACCESS_READ, 1049 .access = SNDRV_CTL_ELEM_ACCESS_READ,
1050 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1050 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -1089,8 +1089,8 @@ static snd_kcontrol_new_t dig_mixes[] = {
1089int snd_hda_create_spdif_out_ctls(struct hda_codec *codec, hda_nid_t nid) 1089int snd_hda_create_spdif_out_ctls(struct hda_codec *codec, hda_nid_t nid)
1090{ 1090{
1091 int err; 1091 int err;
1092 snd_kcontrol_t *kctl; 1092 struct snd_kcontrol *kctl;
1093 snd_kcontrol_new_t *dig_mix; 1093 struct snd_kcontrol_new *dig_mix;
1094 1094
1095 for (dig_mix = dig_mixes; dig_mix->name; dig_mix++) { 1095 for (dig_mix = dig_mixes; dig_mix->name; dig_mix++) {
1096 kctl = snd_ctl_new1(dig_mix, codec); 1096 kctl = snd_ctl_new1(dig_mix, codec);
@@ -1109,7 +1109,7 @@ int snd_hda_create_spdif_out_ctls(struct hda_codec *codec, hda_nid_t nid)
1109 1109
1110#define snd_hda_spdif_in_switch_info snd_hda_spdif_out_switch_info 1110#define snd_hda_spdif_in_switch_info snd_hda_spdif_out_switch_info
1111 1111
1112static int snd_hda_spdif_in_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1112static int snd_hda_spdif_in_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1113{ 1113{
1114 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1114 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1115 1115
@@ -1117,7 +1117,7 @@ static int snd_hda_spdif_in_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
1117 return 0; 1117 return 0;
1118} 1118}
1119 1119
1120static int snd_hda_spdif_in_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1120static int snd_hda_spdif_in_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1121{ 1121{
1122 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1122 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1123 hda_nid_t nid = kcontrol->private_value; 1123 hda_nid_t nid = kcontrol->private_value;
@@ -1134,7 +1134,7 @@ static int snd_hda_spdif_in_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
1134 return change; 1134 return change;
1135} 1135}
1136 1136
1137static int snd_hda_spdif_in_status_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1137static int snd_hda_spdif_in_status_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1138{ 1138{
1139 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1139 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1140 hda_nid_t nid = kcontrol->private_value; 1140 hda_nid_t nid = kcontrol->private_value;
@@ -1150,7 +1150,7 @@ static int snd_hda_spdif_in_status_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_va
1150 return 0; 1150 return 0;
1151} 1151}
1152 1152
1153static snd_kcontrol_new_t dig_in_ctls[] = { 1153static struct snd_kcontrol_new dig_in_ctls[] = {
1154 { 1154 {
1155 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1155 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1156 .name = SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), 1156 .name = SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH),
@@ -1181,8 +1181,8 @@ static snd_kcontrol_new_t dig_in_ctls[] = {
1181int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid) 1181int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid)
1182{ 1182{
1183 int err; 1183 int err;
1184 snd_kcontrol_t *kctl; 1184 struct snd_kcontrol *kctl;
1185 snd_kcontrol_new_t *dig_mix; 1185 struct snd_kcontrol_new *dig_mix;
1186 1186
1187 for (dig_mix = dig_in_ctls; dig_mix->name; dig_mix++) { 1187 for (dig_mix = dig_in_ctls; dig_mix->name; dig_mix++) {
1188 kctl = snd_ctl_new1(dig_mix, codec); 1188 kctl = snd_ctl_new1(dig_mix, codec);
@@ -1498,7 +1498,7 @@ int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid,
1498 */ 1498 */
1499static int hda_pcm_default_open_close(struct hda_pcm_stream *hinfo, 1499static int hda_pcm_default_open_close(struct hda_pcm_stream *hinfo,
1500 struct hda_codec *codec, 1500 struct hda_codec *codec,
1501 snd_pcm_substream_t *substream) 1501 struct snd_pcm_substream *substream)
1502{ 1502{
1503 return 0; 1503 return 0;
1504} 1504}
@@ -1507,7 +1507,7 @@ static int hda_pcm_default_prepare(struct hda_pcm_stream *hinfo,
1507 struct hda_codec *codec, 1507 struct hda_codec *codec,
1508 unsigned int stream_tag, 1508 unsigned int stream_tag,
1509 unsigned int format, 1509 unsigned int format,
1510 snd_pcm_substream_t *substream) 1510 struct snd_pcm_substream *substream)
1511{ 1511{
1512 snd_hda_codec_setup_stream(codec, hinfo->nid, stream_tag, 0, format); 1512 snd_hda_codec_setup_stream(codec, hinfo->nid, stream_tag, 0, format);
1513 return 0; 1513 return 0;
@@ -1515,7 +1515,7 @@ static int hda_pcm_default_prepare(struct hda_pcm_stream *hinfo,
1515 1515
1516static int hda_pcm_default_cleanup(struct hda_pcm_stream *hinfo, 1516static int hda_pcm_default_cleanup(struct hda_pcm_stream *hinfo,
1517 struct hda_codec *codec, 1517 struct hda_codec *codec,
1518 snd_pcm_substream_t *substream) 1518 struct snd_pcm_substream *substream)
1519{ 1519{
1520 snd_hda_codec_setup_stream(codec, hinfo->nid, 0, 0, 0); 1520 snd_hda_codec_setup_stream(codec, hinfo->nid, 0, 0, 0);
1521 return 0; 1521 return 0;
@@ -1646,14 +1646,14 @@ int snd_hda_check_board_config(struct hda_codec *codec, const struct hda_board_c
1646/** 1646/**
1647 * snd_hda_add_new_ctls - create controls from the array 1647 * snd_hda_add_new_ctls - create controls from the array
1648 * @codec: the HDA codec 1648 * @codec: the HDA codec
1649 * @knew: the array of snd_kcontrol_new_t 1649 * @knew: the array of struct snd_kcontrol_new
1650 * 1650 *
1651 * This helper function creates and add new controls in the given array. 1651 * This helper function creates and add new controls in the given array.
1652 * The array must be terminated with an empty entry as terminator. 1652 * The array must be terminated with an empty entry as terminator.
1653 * 1653 *
1654 * Returns 0 if successful, or a negative error code. 1654 * Returns 0 if successful, or a negative error code.
1655 */ 1655 */
1656int snd_hda_add_new_ctls(struct hda_codec *codec, snd_kcontrol_new_t *knew) 1656int snd_hda_add_new_ctls(struct hda_codec *codec, struct snd_kcontrol_new *knew)
1657{ 1657{
1658 int err; 1658 int err;
1659 1659
@@ -1666,10 +1666,10 @@ int snd_hda_add_new_ctls(struct hda_codec *codec, snd_kcontrol_new_t *knew)
1666} 1666}
1667 1667
1668 1668
1669 /* 1669/*
1670 * Channel mode helper 1670 * Channel mode helper
1671 */ 1671 */
1672int snd_hda_ch_mode_info(struct hda_codec *codec, snd_ctl_elem_info_t *uinfo, 1672int snd_hda_ch_mode_info(struct hda_codec *codec, struct snd_ctl_elem_info *uinfo,
1673 const struct hda_channel_mode *chmode, int num_chmodes) 1673 const struct hda_channel_mode *chmode, int num_chmodes)
1674{ 1674{
1675 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 1675 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
@@ -1682,7 +1682,7 @@ int snd_hda_ch_mode_info(struct hda_codec *codec, snd_ctl_elem_info_t *uinfo,
1682 return 0; 1682 return 0;
1683} 1683}
1684 1684
1685int snd_hda_ch_mode_get(struct hda_codec *codec, snd_ctl_elem_value_t *ucontrol, 1685int snd_hda_ch_mode_get(struct hda_codec *codec, struct snd_ctl_elem_value *ucontrol,
1686 const struct hda_channel_mode *chmode, int num_chmodes, 1686 const struct hda_channel_mode *chmode, int num_chmodes,
1687 int max_channels) 1687 int max_channels)
1688{ 1688{
@@ -1697,7 +1697,7 @@ int snd_hda_ch_mode_get(struct hda_codec *codec, snd_ctl_elem_value_t *ucontrol,
1697 return 0; 1697 return 0;
1698} 1698}
1699 1699
1700int snd_hda_ch_mode_put(struct hda_codec *codec, snd_ctl_elem_value_t *ucontrol, 1700int snd_hda_ch_mode_put(struct hda_codec *codec, struct snd_ctl_elem_value *ucontrol,
1701 const struct hda_channel_mode *chmode, int num_chmodes, 1701 const struct hda_channel_mode *chmode, int num_chmodes,
1702 int *max_channelsp) 1702 int *max_channelsp)
1703{ 1703{
@@ -1717,7 +1717,7 @@ int snd_hda_ch_mode_put(struct hda_codec *codec, snd_ctl_elem_value_t *ucontrol,
1717/* 1717/*
1718 * input MUX helper 1718 * input MUX helper
1719 */ 1719 */
1720int snd_hda_input_mux_info(const struct hda_input_mux *imux, snd_ctl_elem_info_t *uinfo) 1720int snd_hda_input_mux_info(const struct hda_input_mux *imux, struct snd_ctl_elem_info *uinfo)
1721{ 1721{
1722 unsigned int index; 1722 unsigned int index;
1723 1723
@@ -1732,7 +1732,7 @@ int snd_hda_input_mux_info(const struct hda_input_mux *imux, snd_ctl_elem_info_t
1732} 1732}
1733 1733
1734int snd_hda_input_mux_put(struct hda_codec *codec, const struct hda_input_mux *imux, 1734int snd_hda_input_mux_put(struct hda_codec *codec, const struct hda_input_mux *imux,
1735 snd_ctl_elem_value_t *ucontrol, hda_nid_t nid, 1735 struct snd_ctl_elem_value *ucontrol, hda_nid_t nid,
1736 unsigned int *cur_val) 1736 unsigned int *cur_val)
1737{ 1737{
1738 unsigned int idx; 1738 unsigned int idx;
@@ -1783,7 +1783,7 @@ int snd_hda_multi_out_dig_close(struct hda_codec *codec, struct hda_multi_out *m
1783 * set up more restrictions for analog out 1783 * set up more restrictions for analog out
1784 */ 1784 */
1785int snd_hda_multi_out_analog_open(struct hda_codec *codec, struct hda_multi_out *mout, 1785int snd_hda_multi_out_analog_open(struct hda_codec *codec, struct hda_multi_out *mout,
1786 snd_pcm_substream_t *substream) 1786 struct snd_pcm_substream *substream)
1787{ 1787{
1788 substream->runtime->hw.channels_max = mout->max_channels; 1788 substream->runtime->hw.channels_max = mout->max_channels;
1789 return snd_pcm_hw_constraint_step(substream->runtime, 0, 1789 return snd_pcm_hw_constraint_step(substream->runtime, 0,
@@ -1797,7 +1797,7 @@ int snd_hda_multi_out_analog_open(struct hda_codec *codec, struct hda_multi_out
1797int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, struct hda_multi_out *mout, 1797int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, struct hda_multi_out *mout,
1798 unsigned int stream_tag, 1798 unsigned int stream_tag,
1799 unsigned int format, 1799 unsigned int format,
1800 snd_pcm_substream_t *substream) 1800 struct snd_pcm_substream *substream)
1801{ 1801{
1802 hda_nid_t *nids = mout->dac_nids; 1802 hda_nid_t *nids = mout->dac_nids;
1803 int chs = substream->runtime->channels; 1803 int chs = substream->runtime->channels;
@@ -2019,15 +2019,15 @@ int snd_hda_resume(struct hda_bus *bus)
2019/** 2019/**
2020 * snd_hda_resume_ctls - resume controls in the new control list 2020 * snd_hda_resume_ctls - resume controls in the new control list
2021 * @codec: the HDA codec 2021 * @codec: the HDA codec
2022 * @knew: the array of snd_kcontrol_new_t 2022 * @knew: the array of struct snd_kcontrol_new
2023 * 2023 *
2024 * This function resumes the mixer controls in the snd_kcontrol_new_t array, 2024 * This function resumes the mixer controls in the struct snd_kcontrol_new array,
2025 * originally for snd_hda_add_new_ctls(). 2025 * originally for snd_hda_add_new_ctls().
2026 * The array must be terminated with an empty entry as terminator. 2026 * The array must be terminated with an empty entry as terminator.
2027 */ 2027 */
2028int snd_hda_resume_ctls(struct hda_codec *codec, snd_kcontrol_new_t *knew) 2028int snd_hda_resume_ctls(struct hda_codec *codec, struct snd_kcontrol_new *knew)
2029{ 2029{
2030 snd_ctl_elem_value_t *val; 2030 struct snd_ctl_elem_value *val;
2031 2031
2032 val = kmalloc(sizeof(*val), GFP_KERNEL); 2032 val = kmalloc(sizeof(*val), GFP_KERNEL);
2033 if (! val) 2033 if (! val)
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 58b9949aca46..0b5c36788898 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -420,7 +420,7 @@ struct hda_bus_template {
420 * A hda_bus contains several codecs in the list codec_list. 420 * A hda_bus contains several codecs in the list codec_list.
421 */ 421 */
422struct hda_bus { 422struct hda_bus {
423 snd_card_t *card; 423 struct snd_card *card;
424 424
425 /* copied from template */ 425 /* copied from template */
426 void *private_data; 426 void *private_data;
@@ -437,7 +437,7 @@ struct hda_bus {
437 /* unsolicited event queue */ 437 /* unsolicited event queue */
438 struct hda_bus_unsolicited *unsol; 438 struct hda_bus_unsolicited *unsol;
439 439
440 snd_info_entry_t *proc; 440 struct snd_info_entry *proc;
441}; 441};
442 442
443/* 443/*
@@ -481,14 +481,14 @@ struct hda_amp_info {
481/* PCM callbacks */ 481/* PCM callbacks */
482struct hda_pcm_ops { 482struct hda_pcm_ops {
483 int (*open)(struct hda_pcm_stream *info, struct hda_codec *codec, 483 int (*open)(struct hda_pcm_stream *info, struct hda_codec *codec,
484 snd_pcm_substream_t *substream); 484 struct snd_pcm_substream *substream);
485 int (*close)(struct hda_pcm_stream *info, struct hda_codec *codec, 485 int (*close)(struct hda_pcm_stream *info, struct hda_codec *codec,
486 snd_pcm_substream_t *substream); 486 struct snd_pcm_substream *substream);
487 int (*prepare)(struct hda_pcm_stream *info, struct hda_codec *codec, 487 int (*prepare)(struct hda_pcm_stream *info, struct hda_codec *codec,
488 unsigned int stream_tag, unsigned int format, 488 unsigned int stream_tag, unsigned int format,
489 snd_pcm_substream_t *substream); 489 struct snd_pcm_substream *substream);
490 int (*cleanup)(struct hda_pcm_stream *info, struct hda_codec *codec, 490 int (*cleanup)(struct hda_pcm_stream *info, struct hda_codec *codec,
491 snd_pcm_substream_t *substream); 491 struct snd_pcm_substream *substream);
492}; 492};
493 493
494/* PCM information for each substream */ 494/* PCM information for each substream */
@@ -563,7 +563,7 @@ enum {
563/* 563/*
564 * constructors 564 * constructors
565 */ 565 */
566int snd_hda_bus_new(snd_card_t *card, const struct hda_bus_template *temp, 566int snd_hda_bus_new(struct snd_card *card, const struct hda_bus_template *temp,
567 struct hda_bus **busp); 567 struct hda_bus **busp);
568int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, 568int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
569 struct hda_codec **codecp); 569 struct hda_codec **codecp);
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index d0eb9f2250aa..863e8c6d29a8 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -389,14 +389,14 @@ static int parse_output(struct hda_codec *codec)
389 */ 389 */
390 390
391/* control callbacks */ 391/* control callbacks */
392static int capture_source_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 392static int capture_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
393{ 393{
394 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 394 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
395 struct hda_gspec *spec = codec->spec; 395 struct hda_gspec *spec = codec->spec;
396 return snd_hda_input_mux_info(&spec->input_mux, uinfo); 396 return snd_hda_input_mux_info(&spec->input_mux, uinfo);
397} 397}
398 398
399static int capture_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 399static int capture_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
400{ 400{
401 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 401 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
402 struct hda_gspec *spec = codec->spec; 402 struct hda_gspec *spec = codec->spec;
@@ -405,7 +405,7 @@ static int capture_source_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
405 return 0; 405 return 0;
406} 406}
407 407
408static int capture_source_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 408static int capture_source_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
409{ 409{
410 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 410 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
411 struct hda_gspec *spec = codec->spec; 411 struct hda_gspec *spec = codec->spec;
@@ -617,7 +617,7 @@ static int create_mixer(struct hda_codec *codec, struct hda_gnode *node,
617 char name[32]; 617 char name[32];
618 int err; 618 int err;
619 int created = 0; 619 int created = 0;
620 snd_kcontrol_new_t knew; 620 struct snd_kcontrol_new knew;
621 621
622 if (type) 622 if (type)
623 sprintf(name, "%s %s Switch", type, dir_sfx); 623 sprintf(name, "%s %s Switch", type, dir_sfx);
@@ -625,14 +625,14 @@ static int create_mixer(struct hda_codec *codec, struct hda_gnode *node,
625 sprintf(name, "%s Switch", dir_sfx); 625 sprintf(name, "%s Switch", dir_sfx);
626 if ((node->wid_caps & AC_WCAP_IN_AMP) && 626 if ((node->wid_caps & AC_WCAP_IN_AMP) &&
627 (node->amp_in_caps & AC_AMPCAP_MUTE)) { 627 (node->amp_in_caps & AC_AMPCAP_MUTE)) {
628 knew = (snd_kcontrol_new_t)HDA_CODEC_MUTE(name, node->nid, index, HDA_INPUT); 628 knew = (struct snd_kcontrol_new)HDA_CODEC_MUTE(name, node->nid, index, HDA_INPUT);
629 snd_printdd("[%s] NID=0x%x, DIR=IN, IDX=0x%x\n", name, node->nid, index); 629 snd_printdd("[%s] NID=0x%x, DIR=IN, IDX=0x%x\n", name, node->nid, index);
630 if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0) 630 if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0)
631 return err; 631 return err;
632 created = 1; 632 created = 1;
633 } else if ((node->wid_caps & AC_WCAP_OUT_AMP) && 633 } else if ((node->wid_caps & AC_WCAP_OUT_AMP) &&
634 (node->amp_out_caps & AC_AMPCAP_MUTE)) { 634 (node->amp_out_caps & AC_AMPCAP_MUTE)) {
635 knew = (snd_kcontrol_new_t)HDA_CODEC_MUTE(name, node->nid, 0, HDA_OUTPUT); 635 knew = (struct snd_kcontrol_new)HDA_CODEC_MUTE(name, node->nid, 0, HDA_OUTPUT);
636 snd_printdd("[%s] NID=0x%x, DIR=OUT\n", name, node->nid); 636 snd_printdd("[%s] NID=0x%x, DIR=OUT\n", name, node->nid);
637 if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0) 637 if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0)
638 return err; 638 return err;
@@ -645,14 +645,14 @@ static int create_mixer(struct hda_codec *codec, struct hda_gnode *node,
645 sprintf(name, "%s Volume", dir_sfx); 645 sprintf(name, "%s Volume", dir_sfx);
646 if ((node->wid_caps & AC_WCAP_IN_AMP) && 646 if ((node->wid_caps & AC_WCAP_IN_AMP) &&
647 (node->amp_in_caps & AC_AMPCAP_NUM_STEPS)) { 647 (node->amp_in_caps & AC_AMPCAP_NUM_STEPS)) {
648 knew = (snd_kcontrol_new_t)HDA_CODEC_VOLUME(name, node->nid, index, HDA_INPUT); 648 knew = (struct snd_kcontrol_new)HDA_CODEC_VOLUME(name, node->nid, index, HDA_INPUT);
649 snd_printdd("[%s] NID=0x%x, DIR=IN, IDX=0x%x\n", name, node->nid, index); 649 snd_printdd("[%s] NID=0x%x, DIR=IN, IDX=0x%x\n", name, node->nid, index);
650 if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0) 650 if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0)
651 return err; 651 return err;
652 created = 1; 652 created = 1;
653 } else if ((node->wid_caps & AC_WCAP_OUT_AMP) && 653 } else if ((node->wid_caps & AC_WCAP_OUT_AMP) &&
654 (node->amp_out_caps & AC_AMPCAP_NUM_STEPS)) { 654 (node->amp_out_caps & AC_AMPCAP_NUM_STEPS)) {
655 knew = (snd_kcontrol_new_t)HDA_CODEC_VOLUME(name, node->nid, 0, HDA_OUTPUT); 655 knew = (struct snd_kcontrol_new)HDA_CODEC_VOLUME(name, node->nid, 0, HDA_OUTPUT);
656 snd_printdd("[%s] NID=0x%x, DIR=OUT\n", name, node->nid); 656 snd_printdd("[%s] NID=0x%x, DIR=OUT\n", name, node->nid);
657 if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0) 657 if ((err = snd_ctl_add(codec->bus->card, snd_ctl_new1(&knew, codec))) < 0)
658 return err; 658 return err;
@@ -667,7 +667,7 @@ static int create_mixer(struct hda_codec *codec, struct hda_gnode *node,
667 */ 667 */
668static int check_existing_control(struct hda_codec *codec, const char *type, const char *dir) 668static int check_existing_control(struct hda_codec *codec, const char *type, const char *dir)
669{ 669{
670 snd_ctl_elem_id_t id; 670 struct snd_ctl_elem_id id;
671 memset(&id, 0, sizeof(id)); 671 memset(&id, 0, sizeof(id));
672 sprintf(id.name, "%s %s Volume", type, dir); 672 sprintf(id.name, "%s %s Volume", type, dir);
673 id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 673 id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
@@ -710,7 +710,7 @@ static int build_input_controls(struct hda_codec *codec)
710 710
711 /* create input MUX if multiple sources are available */ 711 /* create input MUX if multiple sources are available */
712 if (spec->input_mux.num_items > 1) { 712 if (spec->input_mux.num_items > 1) {
713 static snd_kcontrol_new_t cap_sel = { 713 static struct snd_kcontrol_new cap_sel = {
714 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 714 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
715 .name = "Capture Source", 715 .name = "Capture Source",
716 .info = capture_source_info, 716 .info = capture_source_info,
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 31d3c7ef5842..502290424c67 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -60,12 +60,12 @@
60#define HDA_CODEC_MUTE(xname, nid, xindex, direction) \ 60#define HDA_CODEC_MUTE(xname, nid, xindex, direction) \
61 HDA_CODEC_MUTE_MONO(xname, nid, 3, xindex, direction) 61 HDA_CODEC_MUTE_MONO(xname, nid, 3, xindex, direction)
62 62
63int snd_hda_mixer_amp_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo); 63int snd_hda_mixer_amp_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
64int snd_hda_mixer_amp_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol); 64int snd_hda_mixer_amp_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
65int snd_hda_mixer_amp_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol); 65int snd_hda_mixer_amp_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
66int snd_hda_mixer_amp_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo); 66int snd_hda_mixer_amp_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
67int snd_hda_mixer_amp_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol); 67int snd_hda_mixer_amp_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
68int snd_hda_mixer_amp_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol); 68int snd_hda_mixer_amp_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
69 69
70/* mono switch binding multiple inputs */ 70/* mono switch binding multiple inputs */
71#define HDA_BIND_MUTE_MONO(xname, nid, channel, indices, direction) \ 71#define HDA_BIND_MUTE_MONO(xname, nid, channel, indices, direction) \
@@ -78,8 +78,8 @@ int snd_hda_mixer_amp_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
78/* stereo switch binding multiple inputs */ 78/* stereo switch binding multiple inputs */
79#define HDA_BIND_MUTE(xname,nid,indices,dir) HDA_BIND_MUTE_MONO(xname,nid,3,indices,dir) 79#define HDA_BIND_MUTE(xname,nid,indices,dir) HDA_BIND_MUTE_MONO(xname,nid,3,indices,dir)
80 80
81int snd_hda_mixer_bind_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol); 81int snd_hda_mixer_bind_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
82int snd_hda_mixer_bind_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol); 82int snd_hda_mixer_bind_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol);
83 83
84int snd_hda_create_spdif_out_ctls(struct hda_codec *codec, hda_nid_t nid); 84int snd_hda_create_spdif_out_ctls(struct hda_codec *codec, hda_nid_t nid);
85int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid); 85int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid);
@@ -97,12 +97,12 @@ struct hda_input_mux {
97 struct hda_input_mux_item items[HDA_MAX_NUM_INPUTS]; 97 struct hda_input_mux_item items[HDA_MAX_NUM_INPUTS];
98}; 98};
99 99
100int snd_hda_input_mux_info(const struct hda_input_mux *imux, snd_ctl_elem_info_t *uinfo); 100int snd_hda_input_mux_info(const struct hda_input_mux *imux, struct snd_ctl_elem_info *uinfo);
101int snd_hda_input_mux_put(struct hda_codec *codec, const struct hda_input_mux *imux, 101int snd_hda_input_mux_put(struct hda_codec *codec, const struct hda_input_mux *imux,
102 snd_ctl_elem_value_t *ucontrol, hda_nid_t nid, 102 struct snd_ctl_elem_value *ucontrol, hda_nid_t nid,
103 unsigned int *cur_val); 103 unsigned int *cur_val);
104 104
105 /* 105/*
106 * Channel mode helper 106 * Channel mode helper
107 */ 107 */
108struct hda_channel_mode { 108struct hda_channel_mode {
@@ -110,12 +110,12 @@ struct hda_channel_mode {
110 const struct hda_verb *sequence; 110 const struct hda_verb *sequence;
111}; 111};
112 112
113int snd_hda_ch_mode_info(struct hda_codec *codec, snd_ctl_elem_info_t *uinfo, 113int snd_hda_ch_mode_info(struct hda_codec *codec, struct snd_ctl_elem_info *uinfo,
114 const struct hda_channel_mode *chmode, int num_chmodes); 114 const struct hda_channel_mode *chmode, int num_chmodes);
115int snd_hda_ch_mode_get(struct hda_codec *codec, snd_ctl_elem_value_t *ucontrol, 115int snd_hda_ch_mode_get(struct hda_codec *codec, struct snd_ctl_elem_value *ucontrol,
116 const struct hda_channel_mode *chmode, int num_chmodes, 116 const struct hda_channel_mode *chmode, int num_chmodes,
117 int max_channels); 117 int max_channels);
118int snd_hda_ch_mode_put(struct hda_codec *codec, snd_ctl_elem_value_t *ucontrol, 118int snd_hda_ch_mode_put(struct hda_codec *codec, struct snd_ctl_elem_value *ucontrol,
119 const struct hda_channel_mode *chmode, int num_chmodes, 119 const struct hda_channel_mode *chmode, int num_chmodes,
120 int *max_channelsp); 120 int *max_channelsp);
121 121
@@ -138,11 +138,11 @@ struct hda_multi_out {
138int snd_hda_multi_out_dig_open(struct hda_codec *codec, struct hda_multi_out *mout); 138int snd_hda_multi_out_dig_open(struct hda_codec *codec, struct hda_multi_out *mout);
139int snd_hda_multi_out_dig_close(struct hda_codec *codec, struct hda_multi_out *mout); 139int snd_hda_multi_out_dig_close(struct hda_codec *codec, struct hda_multi_out *mout);
140int snd_hda_multi_out_analog_open(struct hda_codec *codec, struct hda_multi_out *mout, 140int snd_hda_multi_out_analog_open(struct hda_codec *codec, struct hda_multi_out *mout,
141 snd_pcm_substream_t *substream); 141 struct snd_pcm_substream *substream);
142int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, struct hda_multi_out *mout, 142int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, struct hda_multi_out *mout,
143 unsigned int stream_tag, 143 unsigned int stream_tag,
144 unsigned int format, 144 unsigned int format,
145 snd_pcm_substream_t *substream); 145 struct snd_pcm_substream *substream);
146int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec, struct hda_multi_out *mout); 146int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec, struct hda_multi_out *mout);
147 147
148/* 148/*
@@ -170,13 +170,13 @@ struct hda_board_config {
170}; 170};
171 171
172int snd_hda_check_board_config(struct hda_codec *codec, const struct hda_board_config *tbl); 172int snd_hda_check_board_config(struct hda_codec *codec, const struct hda_board_config *tbl);
173int snd_hda_add_new_ctls(struct hda_codec *codec, snd_kcontrol_new_t *knew); 173int snd_hda_add_new_ctls(struct hda_codec *codec, struct snd_kcontrol_new *knew);
174 174
175/* 175/*
176 * power management 176 * power management
177 */ 177 */
178#ifdef CONFIG_PM 178#ifdef CONFIG_PM
179int snd_hda_resume_ctls(struct hda_codec *codec, snd_kcontrol_new_t *knew); 179int snd_hda_resume_ctls(struct hda_codec *codec, struct snd_kcontrol_new *knew);
180int snd_hda_resume_spdif_out(struct hda_codec *codec); 180int snd_hda_resume_spdif_out(struct hda_codec *codec);
181int snd_hda_resume_spdif_in(struct hda_codec *codec); 181int snd_hda_resume_spdif_in(struct hda_codec *codec);
182#endif 182#endif
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 39ddf1cd9019..8cc5773958f6 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -47,7 +47,7 @@ static const char *get_wid_type_name(unsigned int wid_value)
47 return "UNKOWN Widget"; 47 return "UNKOWN Widget";
48} 48}
49 49
50static void print_amp_caps(snd_info_buffer_t *buffer, 50static void print_amp_caps(struct snd_info_buffer *buffer,
51 struct hda_codec *codec, hda_nid_t nid, int dir) 51 struct hda_codec *codec, hda_nid_t nid, int dir)
52{ 52{
53 unsigned int caps; 53 unsigned int caps;
@@ -66,7 +66,7 @@ static void print_amp_caps(snd_info_buffer_t *buffer,
66 (caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT); 66 (caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT);
67} 67}
68 68
69static void print_amp_vals(snd_info_buffer_t *buffer, 69static void print_amp_vals(struct snd_info_buffer *buffer,
70 struct hda_codec *codec, hda_nid_t nid, 70 struct hda_codec *codec, hda_nid_t nid,
71 int dir, int stereo, int indices) 71 int dir, int stereo, int indices)
72{ 72{
@@ -91,7 +91,7 @@ static void print_amp_vals(snd_info_buffer_t *buffer,
91 snd_iprintf(buffer, "\n"); 91 snd_iprintf(buffer, "\n");
92} 92}
93 93
94static void print_pcm_caps(snd_info_buffer_t *buffer, 94static void print_pcm_caps(struct snd_info_buffer *buffer,
95 struct hda_codec *codec, hda_nid_t nid) 95 struct hda_codec *codec, hda_nid_t nid)
96{ 96{
97 unsigned int pcm = snd_hda_param_read(codec, nid, AC_PAR_PCM); 97 unsigned int pcm = snd_hda_param_read(codec, nid, AC_PAR_PCM);
@@ -160,7 +160,7 @@ static const char *get_jack_color(u32 cfg)
160 return "UNKNOWN"; 160 return "UNKNOWN";
161} 161}
162 162
163static void print_pin_caps(snd_info_buffer_t *buffer, 163static void print_pin_caps(struct snd_info_buffer *buffer,
164 struct hda_codec *codec, hda_nid_t nid) 164 struct hda_codec *codec, hda_nid_t nid)
165{ 165{
166 static char *jack_conns[4] = { "Jack", "N/A", "Fixed", "Both" }; 166 static char *jack_conns[4] = { "Jack", "N/A", "Fixed", "Both" };
@@ -194,7 +194,7 @@ static void print_pin_caps(snd_info_buffer_t *buffer,
194} 194}
195 195
196 196
197static void print_codec_info(snd_info_entry_t *entry, snd_info_buffer_t *buffer) 197static void print_codec_info(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
198{ 198{
199 struct hda_codec *codec = entry->private_data; 199 struct hda_codec *codec = entry->private_data;
200 char buf[32]; 200 char buf[32];
@@ -309,7 +309,7 @@ static void print_codec_info(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
309int snd_hda_codec_proc_new(struct hda_codec *codec) 309int snd_hda_codec_proc_new(struct hda_codec *codec)
310{ 310{
311 char name[32]; 311 char name[32];
312 snd_info_entry_t *entry; 312 struct snd_info_entry *entry;
313 int err; 313 int err;
314 314
315 snprintf(name, sizeof(name), "codec#%d", codec->addr); 315 snprintf(name, sizeof(name), "codec#%d", codec->addr);
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 4687736aa0d7..1f371fe6b92f 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -28,7 +28,7 @@
28#include "hda_local.h" 28#include "hda_local.h"
29 29
30struct ad198x_spec { 30struct ad198x_spec {
31 snd_kcontrol_new_t *mixers[5]; 31 struct snd_kcontrol_new *mixers[5];
32 int num_mixers; 32 int num_mixers;
33 33
34 const struct hda_verb *init_verbs[3]; /* initialization verbs 34 const struct hda_verb *init_verbs[3]; /* initialization verbs
@@ -65,7 +65,7 @@ struct ad198x_spec {
65/* 65/*
66 * input MUX handling (common part) 66 * input MUX handling (common part)
67 */ 67 */
68static int ad198x_mux_enum_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 68static int ad198x_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
69{ 69{
70 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 70 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
71 struct ad198x_spec *spec = codec->spec; 71 struct ad198x_spec *spec = codec->spec;
@@ -73,7 +73,7 @@ static int ad198x_mux_enum_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *u
73 return snd_hda_input_mux_info(spec->input_mux, uinfo); 73 return snd_hda_input_mux_info(spec->input_mux, uinfo);
74} 74}
75 75
76static int ad198x_mux_enum_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 76static int ad198x_mux_enum_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
77{ 77{
78 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 78 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
79 struct ad198x_spec *spec = codec->spec; 79 struct ad198x_spec *spec = codec->spec;
@@ -83,7 +83,7 @@ static int ad198x_mux_enum_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
83 return 0; 83 return 0;
84} 84}
85 85
86static int ad198x_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 86static int ad198x_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
87{ 87{
88 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 88 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
89 struct ad198x_spec *spec = codec->spec; 89 struct ad198x_spec *spec = codec->spec;
@@ -135,7 +135,7 @@ static int ad198x_build_controls(struct hda_codec *codec)
135 */ 135 */
136static int ad198x_playback_pcm_open(struct hda_pcm_stream *hinfo, 136static int ad198x_playback_pcm_open(struct hda_pcm_stream *hinfo,
137 struct hda_codec *codec, 137 struct hda_codec *codec,
138 snd_pcm_substream_t *substream) 138 struct snd_pcm_substream *substream)
139{ 139{
140 struct ad198x_spec *spec = codec->spec; 140 struct ad198x_spec *spec = codec->spec;
141 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream); 141 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream);
@@ -145,7 +145,7 @@ static int ad198x_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
145 struct hda_codec *codec, 145 struct hda_codec *codec,
146 unsigned int stream_tag, 146 unsigned int stream_tag,
147 unsigned int format, 147 unsigned int format,
148 snd_pcm_substream_t *substream) 148 struct snd_pcm_substream *substream)
149{ 149{
150 struct ad198x_spec *spec = codec->spec; 150 struct ad198x_spec *spec = codec->spec;
151 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, stream_tag, 151 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, stream_tag,
@@ -154,7 +154,7 @@ static int ad198x_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
154 154
155static int ad198x_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, 155static int ad198x_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
156 struct hda_codec *codec, 156 struct hda_codec *codec,
157 snd_pcm_substream_t *substream) 157 struct snd_pcm_substream *substream)
158{ 158{
159 struct ad198x_spec *spec = codec->spec; 159 struct ad198x_spec *spec = codec->spec;
160 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); 160 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout);
@@ -165,7 +165,7 @@ static int ad198x_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
165 */ 165 */
166static int ad198x_dig_playback_pcm_open(struct hda_pcm_stream *hinfo, 166static int ad198x_dig_playback_pcm_open(struct hda_pcm_stream *hinfo,
167 struct hda_codec *codec, 167 struct hda_codec *codec,
168 snd_pcm_substream_t *substream) 168 struct snd_pcm_substream *substream)
169{ 169{
170 struct ad198x_spec *spec = codec->spec; 170 struct ad198x_spec *spec = codec->spec;
171 return snd_hda_multi_out_dig_open(codec, &spec->multiout); 171 return snd_hda_multi_out_dig_open(codec, &spec->multiout);
@@ -173,7 +173,7 @@ static int ad198x_dig_playback_pcm_open(struct hda_pcm_stream *hinfo,
173 173
174static int ad198x_dig_playback_pcm_close(struct hda_pcm_stream *hinfo, 174static int ad198x_dig_playback_pcm_close(struct hda_pcm_stream *hinfo,
175 struct hda_codec *codec, 175 struct hda_codec *codec,
176 snd_pcm_substream_t *substream) 176 struct snd_pcm_substream *substream)
177{ 177{
178 struct ad198x_spec *spec = codec->spec; 178 struct ad198x_spec *spec = codec->spec;
179 return snd_hda_multi_out_dig_close(codec, &spec->multiout); 179 return snd_hda_multi_out_dig_close(codec, &spec->multiout);
@@ -186,7 +186,7 @@ static int ad198x_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
186 struct hda_codec *codec, 186 struct hda_codec *codec,
187 unsigned int stream_tag, 187 unsigned int stream_tag,
188 unsigned int format, 188 unsigned int format,
189 snd_pcm_substream_t *substream) 189 struct snd_pcm_substream *substream)
190{ 190{
191 struct ad198x_spec *spec = codec->spec; 191 struct ad198x_spec *spec = codec->spec;
192 snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number], 192 snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number],
@@ -196,7 +196,7 @@ static int ad198x_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
196 196
197static int ad198x_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, 197static int ad198x_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
198 struct hda_codec *codec, 198 struct hda_codec *codec,
199 snd_pcm_substream_t *substream) 199 struct snd_pcm_substream *substream)
200{ 200{
201 struct ad198x_spec *spec = codec->spec; 201 struct ad198x_spec *spec = codec->spec;
202 snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number], 202 snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number],
@@ -348,7 +348,7 @@ static struct hda_input_mux ad1986a_capture_source = {
348 348
349#define ad1986a_pcm_amp_vol_info snd_hda_mixer_amp_volume_info 349#define ad1986a_pcm_amp_vol_info snd_hda_mixer_amp_volume_info
350 350
351static int ad1986a_pcm_amp_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 351static int ad1986a_pcm_amp_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
352{ 352{
353 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 353 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
354 struct ad198x_spec *ad = codec->spec; 354 struct ad198x_spec *ad = codec->spec;
@@ -359,7 +359,7 @@ static int ad1986a_pcm_amp_vol_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
359 return 0; 359 return 0;
360} 360}
361 361
362static int ad1986a_pcm_amp_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 362static int ad1986a_pcm_amp_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
363{ 363{
364 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 364 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
365 struct ad198x_spec *ad = codec->spec; 365 struct ad198x_spec *ad = codec->spec;
@@ -377,7 +377,7 @@ static int ad1986a_pcm_amp_vol_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_
377 377
378#define ad1986a_pcm_amp_sw_info snd_hda_mixer_amp_switch_info 378#define ad1986a_pcm_amp_sw_info snd_hda_mixer_amp_switch_info
379 379
380static int ad1986a_pcm_amp_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 380static int ad1986a_pcm_amp_sw_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
381{ 381{
382 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 382 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
383 struct ad198x_spec *ad = codec->spec; 383 struct ad198x_spec *ad = codec->spec;
@@ -388,7 +388,7 @@ static int ad1986a_pcm_amp_sw_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
388 return 0; 388 return 0;
389} 389}
390 390
391static int ad1986a_pcm_amp_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 391static int ad1986a_pcm_amp_sw_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
392{ 392{
393 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 393 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
394 struct ad198x_spec *ad = codec->spec; 394 struct ad198x_spec *ad = codec->spec;
@@ -407,7 +407,7 @@ static int ad1986a_pcm_amp_sw_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
407/* 407/*
408 * mixers 408 * mixers
409 */ 409 */
410static snd_kcontrol_new_t ad1986a_mixers[] = { 410static struct snd_kcontrol_new ad1986a_mixers[] = {
411 { 411 {
412 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 412 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
413 .name = "PCM Playback Volume", 413 .name = "PCM Playback Volume",
@@ -570,7 +570,7 @@ static struct hda_input_mux ad1983_capture_source = {
570/* 570/*
571 * SPDIF playback route 571 * SPDIF playback route
572 */ 572 */
573static int ad1983_spdif_route_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 573static int ad1983_spdif_route_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
574{ 574{
575 static char *texts[] = { "PCM", "ADC" }; 575 static char *texts[] = { "PCM", "ADC" };
576 576
@@ -583,7 +583,7 @@ static int ad1983_spdif_route_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
583 return 0; 583 return 0;
584} 584}
585 585
586static int ad1983_spdif_route_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 586static int ad1983_spdif_route_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
587{ 587{
588 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 588 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
589 struct ad198x_spec *spec = codec->spec; 589 struct ad198x_spec *spec = codec->spec;
@@ -592,7 +592,7 @@ static int ad1983_spdif_route_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
592 return 0; 592 return 0;
593} 593}
594 594
595static int ad1983_spdif_route_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 595static int ad1983_spdif_route_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
596{ 596{
597 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 597 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
598 struct ad198x_spec *spec = codec->spec; 598 struct ad198x_spec *spec = codec->spec;
@@ -606,7 +606,7 @@ static int ad1983_spdif_route_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
606 return 0; 606 return 0;
607} 607}
608 608
609static snd_kcontrol_new_t ad1983_mixers[] = { 609static struct snd_kcontrol_new ad1983_mixers[] = {
610 HDA_CODEC_VOLUME("Front Playback Volume", 0x05, 0x0, HDA_OUTPUT), 610 HDA_CODEC_VOLUME("Front Playback Volume", 0x05, 0x0, HDA_OUTPUT),
611 HDA_CODEC_MUTE("Front Playback Switch", 0x05, 0x0, HDA_OUTPUT), 611 HDA_CODEC_MUTE("Front Playback Switch", 0x05, 0x0, HDA_OUTPUT),
612 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x06, 0x0, HDA_OUTPUT), 612 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x06, 0x0, HDA_OUTPUT),
@@ -736,7 +736,7 @@ static struct hda_input_mux ad1981_capture_source = {
736 }, 736 },
737}; 737};
738 738
739static snd_kcontrol_new_t ad1981_mixers[] = { 739static struct snd_kcontrol_new ad1981_mixers[] = {
740 HDA_CODEC_VOLUME("Front Playback Volume", 0x05, 0x0, HDA_OUTPUT), 740 HDA_CODEC_VOLUME("Front Playback Volume", 0x05, 0x0, HDA_OUTPUT),
741 HDA_CODEC_MUTE("Front Playback Switch", 0x05, 0x0, HDA_OUTPUT), 741 HDA_CODEC_MUTE("Front Playback Switch", 0x05, 0x0, HDA_OUTPUT),
742 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x06, 0x0, HDA_OUTPUT), 742 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x06, 0x0, HDA_OUTPUT),
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c
index 37ee1246b2dd..9a6981162982 100644
--- a/sound/pci/hda/patch_cmedia.c
+++ b/sound/pci/hda/patch_cmedia.c
@@ -79,14 +79,14 @@ struct cmi_spec {
79/* 79/*
80 * input MUX 80 * input MUX
81 */ 81 */
82static int cmi_mux_enum_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 82static int cmi_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
83{ 83{
84 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 84 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
85 struct cmi_spec *spec = codec->spec; 85 struct cmi_spec *spec = codec->spec;
86 return snd_hda_input_mux_info(spec->input_mux, uinfo); 86 return snd_hda_input_mux_info(spec->input_mux, uinfo);
87} 87}
88 88
89static int cmi_mux_enum_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 89static int cmi_mux_enum_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
90{ 90{
91 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 91 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
92 struct cmi_spec *spec = codec->spec; 92 struct cmi_spec *spec = codec->spec;
@@ -96,7 +96,7 @@ static int cmi_mux_enum_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
96 return 0; 96 return 0;
97} 97}
98 98
99static int cmi_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 99static int cmi_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
100{ 100{
101 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 101 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
102 struct cmi_spec *spec = codec->spec; 102 struct cmi_spec *spec = codec->spec;
@@ -149,7 +149,7 @@ static struct hda_channel_mode cmi9880_channel_modes[3] = {
149 { 8, cmi9880_ch8_init }, 149 { 8, cmi9880_ch8_init },
150}; 150};
151 151
152static int cmi_ch_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 152static int cmi_ch_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
153{ 153{
154 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 154 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
155 struct cmi_spec *spec = codec->spec; 155 struct cmi_spec *spec = codec->spec;
@@ -157,7 +157,7 @@ static int cmi_ch_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo
157 spec->num_channel_modes); 157 spec->num_channel_modes);
158} 158}
159 159
160static int cmi_ch_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 160static int cmi_ch_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
161{ 161{
162 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 162 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
163 struct cmi_spec *spec = codec->spec; 163 struct cmi_spec *spec = codec->spec;
@@ -165,7 +165,7 @@ static int cmi_ch_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
165 spec->num_channel_modes, spec->multiout.max_channels); 165 spec->num_channel_modes, spec->multiout.max_channels);
166} 166}
167 167
168static int cmi_ch_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 168static int cmi_ch_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
169{ 169{
170 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 170 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
171 struct cmi_spec *spec = codec->spec; 171 struct cmi_spec *spec = codec->spec;
@@ -175,7 +175,7 @@ static int cmi_ch_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucont
175 175
176/* 176/*
177 */ 177 */
178static snd_kcontrol_new_t cmi9880_basic_mixer[] = { 178static struct snd_kcontrol_new cmi9880_basic_mixer[] = {
179 /* CMI9880 has no playback volumes! */ 179 /* CMI9880 has no playback volumes! */
180 HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), /* front */ 180 HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), /* front */
181 HDA_CODEC_MUTE("Surround Playback Switch", 0x04, 0x0, HDA_OUTPUT), 181 HDA_CODEC_MUTE("Surround Playback Switch", 0x04, 0x0, HDA_OUTPUT),
@@ -207,7 +207,7 @@ static snd_kcontrol_new_t cmi9880_basic_mixer[] = {
207/* 207/*
208 * shared I/O pins 208 * shared I/O pins
209 */ 209 */
210static snd_kcontrol_new_t cmi9880_ch_mode_mixer[] = { 210static struct snd_kcontrol_new cmi9880_ch_mode_mixer[] = {
211 { 211 {
212 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 212 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
213 .name = "Channel Mode", 213 .name = "Channel Mode",
@@ -452,7 +452,7 @@ static int cmi9880_resume(struct hda_codec *codec)
452 */ 452 */
453static int cmi9880_playback_pcm_open(struct hda_pcm_stream *hinfo, 453static int cmi9880_playback_pcm_open(struct hda_pcm_stream *hinfo,
454 struct hda_codec *codec, 454 struct hda_codec *codec,
455 snd_pcm_substream_t *substream) 455 struct snd_pcm_substream *substream)
456{ 456{
457 struct cmi_spec *spec = codec->spec; 457 struct cmi_spec *spec = codec->spec;
458 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream); 458 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream);
@@ -462,7 +462,7 @@ static int cmi9880_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
462 struct hda_codec *codec, 462 struct hda_codec *codec,
463 unsigned int stream_tag, 463 unsigned int stream_tag,
464 unsigned int format, 464 unsigned int format,
465 snd_pcm_substream_t *substream) 465 struct snd_pcm_substream *substream)
466{ 466{
467 struct cmi_spec *spec = codec->spec; 467 struct cmi_spec *spec = codec->spec;
468 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, stream_tag, 468 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, stream_tag,
@@ -471,7 +471,7 @@ static int cmi9880_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
471 471
472static int cmi9880_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, 472static int cmi9880_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
473 struct hda_codec *codec, 473 struct hda_codec *codec,
474 snd_pcm_substream_t *substream) 474 struct snd_pcm_substream *substream)
475{ 475{
476 struct cmi_spec *spec = codec->spec; 476 struct cmi_spec *spec = codec->spec;
477 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); 477 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout);
@@ -482,7 +482,7 @@ static int cmi9880_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
482 */ 482 */
483static int cmi9880_dig_playback_pcm_open(struct hda_pcm_stream *hinfo, 483static int cmi9880_dig_playback_pcm_open(struct hda_pcm_stream *hinfo,
484 struct hda_codec *codec, 484 struct hda_codec *codec,
485 snd_pcm_substream_t *substream) 485 struct snd_pcm_substream *substream)
486{ 486{
487 struct cmi_spec *spec = codec->spec; 487 struct cmi_spec *spec = codec->spec;
488 return snd_hda_multi_out_dig_open(codec, &spec->multiout); 488 return snd_hda_multi_out_dig_open(codec, &spec->multiout);
@@ -490,7 +490,7 @@ static int cmi9880_dig_playback_pcm_open(struct hda_pcm_stream *hinfo,
490 490
491static int cmi9880_dig_playback_pcm_close(struct hda_pcm_stream *hinfo, 491static int cmi9880_dig_playback_pcm_close(struct hda_pcm_stream *hinfo,
492 struct hda_codec *codec, 492 struct hda_codec *codec,
493 snd_pcm_substream_t *substream) 493 struct snd_pcm_substream *substream)
494{ 494{
495 struct cmi_spec *spec = codec->spec; 495 struct cmi_spec *spec = codec->spec;
496 return snd_hda_multi_out_dig_close(codec, &spec->multiout); 496 return snd_hda_multi_out_dig_close(codec, &spec->multiout);
@@ -503,7 +503,7 @@ static int cmi9880_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
503 struct hda_codec *codec, 503 struct hda_codec *codec,
504 unsigned int stream_tag, 504 unsigned int stream_tag,
505 unsigned int format, 505 unsigned int format,
506 snd_pcm_substream_t *substream) 506 struct snd_pcm_substream *substream)
507{ 507{
508 struct cmi_spec *spec = codec->spec; 508 struct cmi_spec *spec = codec->spec;
509 509
@@ -514,7 +514,7 @@ static int cmi9880_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
514 514
515static int cmi9880_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, 515static int cmi9880_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
516 struct hda_codec *codec, 516 struct hda_codec *codec,
517 snd_pcm_substream_t *substream) 517 struct snd_pcm_substream *substream)
518{ 518{
519 struct cmi_spec *spec = codec->spec; 519 struct cmi_spec *spec = codec->spec;
520 520
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3ff72c49cd26..62e6993056e6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -63,7 +63,7 @@ enum {
63 63
64struct alc_spec { 64struct alc_spec {
65 /* codec parameterization */ 65 /* codec parameterization */
66 snd_kcontrol_new_t *mixers[3]; /* mixer arrays */ 66 struct snd_kcontrol_new *mixers[3]; /* mixer arrays */
67 unsigned int num_mixers; 67 unsigned int num_mixers;
68 68
69 const struct hda_verb *init_verbs[3]; /* initialization verbs 69 const struct hda_verb *init_verbs[3]; /* initialization verbs
@@ -104,7 +104,7 @@ struct alc_spec {
104 /* dynamic controls, init_verbs and input_mux */ 104 /* dynamic controls, init_verbs and input_mux */
105 struct auto_pin_cfg autocfg; 105 struct auto_pin_cfg autocfg;
106 unsigned int num_kctl_alloc, num_kctl_used; 106 unsigned int num_kctl_alloc, num_kctl_used;
107 snd_kcontrol_new_t *kctl_alloc; 107 struct snd_kcontrol_new *kctl_alloc;
108 struct hda_input_mux private_imux; 108 struct hda_input_mux private_imux;
109 hda_nid_t private_dac_nids[4]; 109 hda_nid_t private_dac_nids[4];
110}; 110};
@@ -113,14 +113,14 @@ struct alc_spec {
113/* 113/*
114 * input MUX handling 114 * input MUX handling
115 */ 115 */
116static int alc_mux_enum_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 116static int alc_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
117{ 117{
118 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 118 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
119 struct alc_spec *spec = codec->spec; 119 struct alc_spec *spec = codec->spec;
120 return snd_hda_input_mux_info(spec->input_mux, uinfo); 120 return snd_hda_input_mux_info(spec->input_mux, uinfo);
121} 121}
122 122
123static int alc_mux_enum_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 123static int alc_mux_enum_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
124{ 124{
125 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 125 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
126 struct alc_spec *spec = codec->spec; 126 struct alc_spec *spec = codec->spec;
@@ -130,7 +130,7 @@ static int alc_mux_enum_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
130 return 0; 130 return 0;
131} 131}
132 132
133static int alc_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 133static int alc_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
134{ 134{
135 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 135 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
136 struct alc_spec *spec = codec->spec; 136 struct alc_spec *spec = codec->spec;
@@ -143,7 +143,7 @@ static int alc_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucon
143/* 143/*
144 * channel mode setting 144 * channel mode setting
145 */ 145 */
146static int alc880_ch_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 146static int alc880_ch_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
147{ 147{
148 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 148 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
149 struct alc_spec *spec = codec->spec; 149 struct alc_spec *spec = codec->spec;
@@ -151,7 +151,7 @@ static int alc880_ch_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *ui
151 spec->num_channel_mode); 151 spec->num_channel_mode);
152} 152}
153 153
154static int alc880_ch_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 154static int alc880_ch_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
155{ 155{
156 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 156 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
157 struct alc_spec *spec = codec->spec; 157 struct alc_spec *spec = codec->spec;
@@ -159,7 +159,7 @@ static int alc880_ch_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
159 spec->num_channel_mode, spec->multiout.max_channels); 159 spec->num_channel_mode, spec->multiout.max_channels);
160} 160}
161 161
162static int alc880_ch_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 162static int alc880_ch_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
163{ 163{
164 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 164 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
165 struct alc_spec *spec = codec->spec; 165 struct alc_spec *spec = codec->spec;
@@ -173,7 +173,7 @@ static int alc880_ch_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *uc
173 * supported, so VrefEn can't be controlled using these functions as they 173 * supported, so VrefEn can't be controlled using these functions as they
174 * stand. 174 * stand.
175 */ 175 */
176static int alc_pinctl_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 176static int alc_pinctl_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
177{ 177{
178 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 178 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
179 uinfo->count = 1; 179 uinfo->count = 1;
@@ -182,7 +182,7 @@ static int alc_pinctl_switch_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t
182 return 0; 182 return 0;
183} 183}
184 184
185static int alc_pinctl_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 185static int alc_pinctl_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
186{ 186{
187 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 187 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
188 hda_nid_t nid = kcontrol->private_value & 0xffff; 188 hda_nid_t nid = kcontrol->private_value & 0xffff;
@@ -195,7 +195,7 @@ static int alc_pinctl_switch_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
195 return 0; 195 return 0;
196} 196}
197 197
198static int alc_pinctl_switch_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 198static int alc_pinctl_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
199{ 199{
200 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 200 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
201 hda_nid_t nid = kcontrol->private_value & 0xffff; 201 hda_nid_t nid = kcontrol->private_value & 0xffff;
@@ -284,7 +284,7 @@ static struct hda_channel_mode alc880_threestack_modes[2] = {
284 { 6, alc880_threestack_ch6_init }, 284 { 6, alc880_threestack_ch6_init },
285}; 285};
286 286
287static snd_kcontrol_new_t alc880_three_stack_mixer[] = { 287static struct snd_kcontrol_new alc880_three_stack_mixer[] = {
288 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 288 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
289 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 289 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
290 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0f, 0x0, HDA_OUTPUT), 290 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
@@ -315,7 +315,7 @@ static snd_kcontrol_new_t alc880_three_stack_mixer[] = {
315}; 315};
316 316
317/* capture mixer elements */ 317/* capture mixer elements */
318static snd_kcontrol_new_t alc880_capture_mixer[] = { 318static struct snd_kcontrol_new alc880_capture_mixer[] = {
319 HDA_CODEC_VOLUME("Capture Volume", 0x07, 0x0, HDA_INPUT), 319 HDA_CODEC_VOLUME("Capture Volume", 0x07, 0x0, HDA_INPUT),
320 HDA_CODEC_MUTE("Capture Switch", 0x07, 0x0, HDA_INPUT), 320 HDA_CODEC_MUTE("Capture Switch", 0x07, 0x0, HDA_INPUT),
321 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x08, 0x0, HDA_INPUT), 321 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x08, 0x0, HDA_INPUT),
@@ -339,7 +339,7 @@ static snd_kcontrol_new_t alc880_capture_mixer[] = {
339}; 339};
340 340
341/* capture mixer elements (in case NID 0x07 not available) */ 341/* capture mixer elements (in case NID 0x07 not available) */
342static snd_kcontrol_new_t alc880_capture_alt_mixer[] = { 342static struct snd_kcontrol_new alc880_capture_alt_mixer[] = {
343 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), 343 HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
344 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), 344 HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
345 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), 345 HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
@@ -371,7 +371,7 @@ static snd_kcontrol_new_t alc880_capture_alt_mixer[] = {
371 */ 371 */
372 372
373/* additional mixers to alc880_three_stack_mixer */ 373/* additional mixers to alc880_three_stack_mixer */
374static snd_kcontrol_new_t alc880_five_stack_mixer[] = { 374static struct snd_kcontrol_new alc880_five_stack_mixer[] = {
375 HDA_CODEC_VOLUME("Side Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 375 HDA_CODEC_VOLUME("Side Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
376 HDA_BIND_MUTE("Side Playback Switch", 0x0d, 2, HDA_INPUT), 376 HDA_BIND_MUTE("Side Playback Switch", 0x0d, 2, HDA_INPUT),
377 { } /* end */ 377 { } /* end */
@@ -428,7 +428,7 @@ static struct hda_channel_mode alc880_sixstack_modes[1] = {
428 { 8, NULL }, 428 { 8, NULL },
429}; 429};
430 430
431static snd_kcontrol_new_t alc880_six_stack_mixer[] = { 431static struct snd_kcontrol_new alc880_six_stack_mixer[] = {
432 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 432 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
433 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 433 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
434 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 434 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
@@ -496,7 +496,7 @@ static struct hda_channel_mode alc880_w810_modes[1] = {
496}; 496};
497 497
498/* Pin assignment: Front = 0x14, Surr = 0x15, CLFE = 0x16, HP = 0x1b */ 498/* Pin assignment: Front = 0x14, Surr = 0x15, CLFE = 0x16, HP = 0x1b */
499static snd_kcontrol_new_t alc880_w810_base_mixer[] = { 499static struct snd_kcontrol_new alc880_w810_base_mixer[] = {
500 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 500 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
501 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 501 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
502 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 502 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
@@ -527,7 +527,7 @@ static struct hda_channel_mode alc880_2_jack_modes[1] = {
527 { 2, NULL } 527 { 2, NULL }
528}; 528};
529 529
530static snd_kcontrol_new_t alc880_z71v_mixer[] = { 530static struct snd_kcontrol_new alc880_z71v_mixer[] = {
531 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 531 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
532 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 532 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
533 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 533 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
@@ -553,7 +553,7 @@ static hda_nid_t alc880_f1734_dac_nids[1] = {
553}; 553};
554#define ALC880_F1734_HP_DAC 0x02 554#define ALC880_F1734_HP_DAC 0x02
555 555
556static snd_kcontrol_new_t alc880_f1734_mixer[] = { 556static struct snd_kcontrol_new alc880_f1734_mixer[] = {
557 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 557 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
558 HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT), 558 HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT),
559 HDA_CODEC_VOLUME("Internal Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 559 HDA_CODEC_VOLUME("Internal Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
@@ -578,7 +578,7 @@ static snd_kcontrol_new_t alc880_f1734_mixer[] = {
578#define alc880_asus_dac_nids alc880_w810_dac_nids /* identical with w810 */ 578#define alc880_asus_dac_nids alc880_w810_dac_nids /* identical with w810 */
579#define alc880_asus_modes alc880_threestack_modes /* 2/6 channel mode */ 579#define alc880_asus_modes alc880_threestack_modes /* 2/6 channel mode */
580 580
581static snd_kcontrol_new_t alc880_asus_mixer[] = { 581static struct snd_kcontrol_new alc880_asus_mixer[] = {
582 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 582 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
583 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 583 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
584 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 584 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
@@ -613,14 +613,14 @@ static snd_kcontrol_new_t alc880_asus_mixer[] = {
613 */ 613 */
614 614
615/* additional mixers to alc880_asus_mixer */ 615/* additional mixers to alc880_asus_mixer */
616static snd_kcontrol_new_t alc880_asus_w1v_mixer[] = { 616static struct snd_kcontrol_new alc880_asus_w1v_mixer[] = {
617 HDA_CODEC_VOLUME("Line2 Playback Volume", 0x0b, 0x03, HDA_INPUT), 617 HDA_CODEC_VOLUME("Line2 Playback Volume", 0x0b, 0x03, HDA_INPUT),
618 HDA_CODEC_MUTE("Line2 Playback Switch", 0x0b, 0x03, HDA_INPUT), 618 HDA_CODEC_MUTE("Line2 Playback Switch", 0x0b, 0x03, HDA_INPUT),
619 { } /* end */ 619 { } /* end */
620}; 620};
621 621
622/* additional mixers to alc880_asus_mixer */ 622/* additional mixers to alc880_asus_mixer */
623static snd_kcontrol_new_t alc880_pcbeep_mixer[] = { 623static struct snd_kcontrol_new alc880_pcbeep_mixer[] = {
624 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT), 624 HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
625 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT), 625 HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
626 { } /* end */ 626 { } /* end */
@@ -974,7 +974,7 @@ static int alc_resume(struct hda_codec *codec)
974 */ 974 */
975static int alc880_playback_pcm_open(struct hda_pcm_stream *hinfo, 975static int alc880_playback_pcm_open(struct hda_pcm_stream *hinfo,
976 struct hda_codec *codec, 976 struct hda_codec *codec,
977 snd_pcm_substream_t *substream) 977 struct snd_pcm_substream *substream)
978{ 978{
979 struct alc_spec *spec = codec->spec; 979 struct alc_spec *spec = codec->spec;
980 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream); 980 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream);
@@ -984,7 +984,7 @@ static int alc880_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
984 struct hda_codec *codec, 984 struct hda_codec *codec,
985 unsigned int stream_tag, 985 unsigned int stream_tag,
986 unsigned int format, 986 unsigned int format,
987 snd_pcm_substream_t *substream) 987 struct snd_pcm_substream *substream)
988{ 988{
989 struct alc_spec *spec = codec->spec; 989 struct alc_spec *spec = codec->spec;
990 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, stream_tag, 990 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, stream_tag,
@@ -993,7 +993,7 @@ static int alc880_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
993 993
994static int alc880_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, 994static int alc880_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
995 struct hda_codec *codec, 995 struct hda_codec *codec,
996 snd_pcm_substream_t *substream) 996 struct snd_pcm_substream *substream)
997{ 997{
998 struct alc_spec *spec = codec->spec; 998 struct alc_spec *spec = codec->spec;
999 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); 999 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout);
@@ -1004,7 +1004,7 @@ static int alc880_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
1004 */ 1004 */
1005static int alc880_dig_playback_pcm_open(struct hda_pcm_stream *hinfo, 1005static int alc880_dig_playback_pcm_open(struct hda_pcm_stream *hinfo,
1006 struct hda_codec *codec, 1006 struct hda_codec *codec,
1007 snd_pcm_substream_t *substream) 1007 struct snd_pcm_substream *substream)
1008{ 1008{
1009 struct alc_spec *spec = codec->spec; 1009 struct alc_spec *spec = codec->spec;
1010 return snd_hda_multi_out_dig_open(codec, &spec->multiout); 1010 return snd_hda_multi_out_dig_open(codec, &spec->multiout);
@@ -1012,7 +1012,7 @@ static int alc880_dig_playback_pcm_open(struct hda_pcm_stream *hinfo,
1012 1012
1013static int alc880_dig_playback_pcm_close(struct hda_pcm_stream *hinfo, 1013static int alc880_dig_playback_pcm_close(struct hda_pcm_stream *hinfo,
1014 struct hda_codec *codec, 1014 struct hda_codec *codec,
1015 snd_pcm_substream_t *substream) 1015 struct snd_pcm_substream *substream)
1016{ 1016{
1017 struct alc_spec *spec = codec->spec; 1017 struct alc_spec *spec = codec->spec;
1018 return snd_hda_multi_out_dig_close(codec, &spec->multiout); 1018 return snd_hda_multi_out_dig_close(codec, &spec->multiout);
@@ -1025,7 +1025,7 @@ static int alc880_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
1025 struct hda_codec *codec, 1025 struct hda_codec *codec,
1026 unsigned int stream_tag, 1026 unsigned int stream_tag,
1027 unsigned int format, 1027 unsigned int format,
1028 snd_pcm_substream_t *substream) 1028 struct snd_pcm_substream *substream)
1029{ 1029{
1030 struct alc_spec *spec = codec->spec; 1030 struct alc_spec *spec = codec->spec;
1031 1031
@@ -1036,7 +1036,7 @@ static int alc880_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
1036 1036
1037static int alc880_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, 1037static int alc880_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
1038 struct hda_codec *codec, 1038 struct hda_codec *codec,
1039 snd_pcm_substream_t *substream) 1039 struct snd_pcm_substream *substream)
1040{ 1040{
1041 struct alc_spec *spec = codec->spec; 1041 struct alc_spec *spec = codec->spec;
1042 1042
@@ -1185,7 +1185,7 @@ static struct hda_channel_mode alc880_test_modes[4] = {
1185 { 8, NULL }, 1185 { 8, NULL },
1186}; 1186};
1187 1187
1188static int alc_test_pin_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1188static int alc_test_pin_ctl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1189{ 1189{
1190 static char *texts[] = { 1190 static char *texts[] = {
1191 "N/A", "Line Out", "HP Out", 1191 "N/A", "Line Out", "HP Out",
@@ -1200,7 +1200,7 @@ static int alc_test_pin_ctl_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
1200 return 0; 1200 return 0;
1201} 1201}
1202 1202
1203static int alc_test_pin_ctl_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1203static int alc_test_pin_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1204{ 1204{
1205 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1205 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1206 hda_nid_t nid = (hda_nid_t)kcontrol->private_value; 1206 hda_nid_t nid = (hda_nid_t)kcontrol->private_value;
@@ -1226,7 +1226,7 @@ static int alc_test_pin_ctl_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
1226 return 0; 1226 return 0;
1227} 1227}
1228 1228
1229static int alc_test_pin_ctl_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1229static int alc_test_pin_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1230{ 1230{
1231 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1231 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1232 hda_nid_t nid = (hda_nid_t)kcontrol->private_value; 1232 hda_nid_t nid = (hda_nid_t)kcontrol->private_value;
@@ -1252,7 +1252,7 @@ static int alc_test_pin_ctl_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
1252 return 0; 1252 return 0;
1253} 1253}
1254 1254
1255static int alc_test_pin_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 1255static int alc_test_pin_src_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
1256{ 1256{
1257 static char *texts[] = { 1257 static char *texts[] = {
1258 "Front", "Surround", "CLFE", "Side" 1258 "Front", "Surround", "CLFE", "Side"
@@ -1266,7 +1266,7 @@ static int alc_test_pin_src_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
1266 return 0; 1266 return 0;
1267} 1267}
1268 1268
1269static int alc_test_pin_src_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1269static int alc_test_pin_src_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1270{ 1270{
1271 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1271 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1272 hda_nid_t nid = (hda_nid_t)kcontrol->private_value; 1272 hda_nid_t nid = (hda_nid_t)kcontrol->private_value;
@@ -1277,7 +1277,7 @@ static int alc_test_pin_src_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
1277 return 0; 1277 return 0;
1278} 1278}
1279 1279
1280static int alc_test_pin_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 1280static int alc_test_pin_src_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
1281{ 1281{
1282 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1282 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1283 hda_nid_t nid = (hda_nid_t)kcontrol->private_value; 1283 hda_nid_t nid = (hda_nid_t)kcontrol->private_value;
@@ -1310,7 +1310,7 @@ static int alc_test_pin_src_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
1310 .private_value = nid \ 1310 .private_value = nid \
1311 } 1311 }
1312 1312
1313static snd_kcontrol_new_t alc880_test_mixer[] = { 1313static struct snd_kcontrol_new alc880_test_mixer[] = {
1314 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 1314 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1315 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 1315 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
1316 HDA_CODEC_VOLUME("CLFE Playback Volume", 0x0e, 0x0, HDA_OUTPUT), 1316 HDA_CODEC_VOLUME("CLFE Playback Volume", 0x0e, 0x0, HDA_OUTPUT),
@@ -1527,7 +1527,7 @@ static struct hda_board_config alc880_cfg_tbl[] = {
1527 * configuration template - to be copied to the spec instance 1527 * configuration template - to be copied to the spec instance
1528 */ 1528 */
1529struct alc_config_preset { 1529struct alc_config_preset {
1530 snd_kcontrol_new_t *mixers[4]; 1530 struct snd_kcontrol_new *mixers[4];
1531 const struct hda_verb *init_verbs[4]; 1531 const struct hda_verb *init_verbs[4];
1532 unsigned int num_dacs; 1532 unsigned int num_dacs;
1533 hda_nid_t *dac_nids; 1533 hda_nid_t *dac_nids;
@@ -1698,7 +1698,7 @@ enum {
1698 ALC_CTL_WIDGET_MUTE, 1698 ALC_CTL_WIDGET_MUTE,
1699 ALC_CTL_BIND_MUTE, 1699 ALC_CTL_BIND_MUTE,
1700}; 1700};
1701static snd_kcontrol_new_t alc880_control_templates[] = { 1701static struct snd_kcontrol_new alc880_control_templates[] = {
1702 HDA_CODEC_VOLUME(NULL, 0, 0, 0), 1702 HDA_CODEC_VOLUME(NULL, 0, 0, 0),
1703 HDA_CODEC_MUTE(NULL, 0, 0, 0), 1703 HDA_CODEC_MUTE(NULL, 0, 0, 0),
1704 HDA_BIND_MUTE(NULL, 0, 0, 0), 1704 HDA_BIND_MUTE(NULL, 0, 0, 0),
@@ -1707,7 +1707,7 @@ static snd_kcontrol_new_t alc880_control_templates[] = {
1707/* add dynamic controls */ 1707/* add dynamic controls */
1708static int add_control(struct alc_spec *spec, int type, const char *name, unsigned long val) 1708static int add_control(struct alc_spec *spec, int type, const char *name, unsigned long val)
1709{ 1709{
1710 snd_kcontrol_new_t *knew; 1710 struct snd_kcontrol_new *knew;
1711 1711
1712 if (spec->num_kctl_used >= spec->num_kctl_alloc) { 1712 if (spec->num_kctl_used >= spec->num_kctl_alloc) {
1713 int num = spec->num_kctl_alloc + NUM_CONTROL_ALLOC; 1713 int num = spec->num_kctl_alloc + NUM_CONTROL_ALLOC;
@@ -2168,7 +2168,7 @@ static struct hda_channel_mode alc260_modes[1] = {
2168 { 2, NULL }, 2168 { 2, NULL },
2169}; 2169};
2170 2170
2171static snd_kcontrol_new_t alc260_base_mixer[] = { 2171static struct snd_kcontrol_new alc260_base_mixer[] = {
2172 HDA_CODEC_VOLUME("Front Playback Volume", 0x08, 0x0, HDA_OUTPUT), 2172 HDA_CODEC_VOLUME("Front Playback Volume", 0x08, 0x0, HDA_OUTPUT),
2173 HDA_BIND_MUTE("Front Playback Switch", 0x08, 2, HDA_INPUT), 2173 HDA_BIND_MUTE("Front Playback Switch", 0x08, 2, HDA_INPUT),
2174 HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), 2174 HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT),
@@ -2197,7 +2197,7 @@ static snd_kcontrol_new_t alc260_base_mixer[] = {
2197 { } /* end */ 2197 { } /* end */
2198}; 2198};
2199 2199
2200static snd_kcontrol_new_t alc260_hp_mixer[] = { 2200static struct snd_kcontrol_new alc260_hp_mixer[] = {
2201 HDA_CODEC_VOLUME("Front Playback Volume", 0x08, 0x0, HDA_OUTPUT), 2201 HDA_CODEC_VOLUME("Front Playback Volume", 0x08, 0x0, HDA_OUTPUT),
2202 HDA_BIND_MUTE("Front Playback Switch", 0x08, 2, HDA_INPUT), 2202 HDA_BIND_MUTE("Front Playback Switch", 0x08, 2, HDA_INPUT),
2203 HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), 2203 HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT),
@@ -2224,7 +2224,7 @@ static snd_kcontrol_new_t alc260_hp_mixer[] = {
2224 { } /* end */ 2224 { } /* end */
2225}; 2225};
2226 2226
2227static snd_kcontrol_new_t alc260_fujitsu_mixer[] = { 2227static struct snd_kcontrol_new alc260_fujitsu_mixer[] = {
2228 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x08, 0x0, HDA_OUTPUT), 2228 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x08, 0x0, HDA_OUTPUT),
2229 HDA_BIND_MUTE("Headphone Playback Switch", 0x08, 2, HDA_INPUT), 2229 HDA_BIND_MUTE("Headphone Playback Switch", 0x08, 2, HDA_INPUT),
2230 ALC_PINCTL_SWITCH("Headphone Amp Switch", 0x14, PIN_HP_AMP), 2230 ALC_PINCTL_SWITCH("Headphone Amp Switch", 0x14, PIN_HP_AMP),
@@ -2498,7 +2498,7 @@ static struct hda_input_mux alc882_capture_source = {
2498#define alc882_mux_enum_info alc_mux_enum_info 2498#define alc882_mux_enum_info alc_mux_enum_info
2499#define alc882_mux_enum_get alc_mux_enum_get 2499#define alc882_mux_enum_get alc_mux_enum_get
2500 2500
2501static int alc882_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 2501static int alc882_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
2502{ 2502{
2503 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 2503 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
2504 struct alc_spec *spec = codec->spec; 2504 struct alc_spec *spec = codec->spec;
@@ -2526,7 +2526,7 @@ static int alc882_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *u
2526/* Pin assignment: Front=0x14, Rear=0x15, CLFE=0x16, Side=0x17 2526/* Pin assignment: Front=0x14, Rear=0x15, CLFE=0x16, Side=0x17
2527 * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b 2527 * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b
2528 */ 2528 */
2529static snd_kcontrol_new_t alc882_base_mixer[] = { 2529static struct snd_kcontrol_new alc882_base_mixer[] = {
2530 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 2530 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
2531 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 2531 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
2532 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), 2532 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c
index 12b5de29f42f..8f8840e6002b 100644
--- a/sound/pci/hda/patch_si3054.c
+++ b/sound/pci/hda/patch_si3054.c
@@ -95,8 +95,8 @@ struct si3054_spec {
95#define PRIVATE_REG(val) ((val>>16)&0xffff) 95#define PRIVATE_REG(val) ((val>>16)&0xffff)
96#define PRIVATE_MASK(val) (val&0xffff) 96#define PRIVATE_MASK(val) (val&0xffff)
97 97
98static int si3054_switch_info(snd_kcontrol_t *kcontrol, 98static int si3054_switch_info(struct snd_kcontrol *kcontrol,
99 snd_ctl_elem_info_t *uinfo) 99 struct snd_ctl_elem_info *uinfo)
100{ 100{
101 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 101 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
102 uinfo->count = 1; 102 uinfo->count = 1;
@@ -105,8 +105,8 @@ static int si3054_switch_info(snd_kcontrol_t *kcontrol,
105 return 0; 105 return 0;
106} 106}
107 107
108static int si3054_switch_get(snd_kcontrol_t *kcontrol, 108static int si3054_switch_get(struct snd_kcontrol *kcontrol,
109 snd_ctl_elem_value_t *uvalue) 109 struct snd_ctl_elem_value *uvalue)
110{ 110{
111 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 111 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
112 u16 reg = PRIVATE_REG(kcontrol->private_value); 112 u16 reg = PRIVATE_REG(kcontrol->private_value);
@@ -115,8 +115,8 @@ static int si3054_switch_get(snd_kcontrol_t *kcontrol,
115 return 0; 115 return 0;
116} 116}
117 117
118static int si3054_switch_put(snd_kcontrol_t *kcontrol, 118static int si3054_switch_put(struct snd_kcontrol *kcontrol,
119 snd_ctl_elem_value_t *uvalue) 119 struct snd_ctl_elem_value *uvalue)
120{ 120{
121 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 121 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
122 u16 reg = PRIVATE_REG(kcontrol->private_value); 122 u16 reg = PRIVATE_REG(kcontrol->private_value);
@@ -138,7 +138,7 @@ static int si3054_switch_put(snd_kcontrol_t *kcontrol,
138} 138}
139 139
140 140
141static snd_kcontrol_new_t si3054_modem_mixer[] = { 141static struct snd_kcontrol_new si3054_modem_mixer[] = {
142 SI3054_KCONTROL("Off-hook Switch", SI3054_GPIO_CONTROL, SI3054_GPIO_OH), 142 SI3054_KCONTROL("Off-hook Switch", SI3054_GPIO_CONTROL, SI3054_GPIO_OH),
143 SI3054_KCONTROL("Caller ID Switch", SI3054_GPIO_CONTROL, SI3054_GPIO_CID), 143 SI3054_KCONTROL("Caller ID Switch", SI3054_GPIO_CONTROL, SI3054_GPIO_CID),
144 {} 144 {}
@@ -158,7 +158,7 @@ static int si3054_pcm_prepare(struct hda_pcm_stream *hinfo,
158 struct hda_codec *codec, 158 struct hda_codec *codec,
159 unsigned int stream_tag, 159 unsigned int stream_tag,
160 unsigned int format, 160 unsigned int format,
161 snd_pcm_substream_t *substream) 161 struct snd_pcm_substream *substream)
162{ 162{
163 u16 val; 163 u16 val;
164 164
@@ -175,10 +175,10 @@ static int si3054_pcm_prepare(struct hda_pcm_stream *hinfo,
175 175
176static int si3054_pcm_open(struct hda_pcm_stream *hinfo, 176static int si3054_pcm_open(struct hda_pcm_stream *hinfo,
177 struct hda_codec *codec, 177 struct hda_codec *codec,
178 snd_pcm_substream_t *substream) 178 struct snd_pcm_substream *substream)
179{ 179{
180 static unsigned int rates[] = { 8000, 9600, 16000 }; 180 static unsigned int rates[] = { 8000, 9600, 16000 };
181 static snd_pcm_hw_constraint_list_t hw_constraints_rates = { 181 static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
182 .count = ARRAY_SIZE(rates), 182 .count = ARRAY_SIZE(rates),
183 .list = rates, 183 .list = rates,
184 .mask = 0, 184 .mask = 0,
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 33a8adaea768..d8d68f5b6131 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -41,7 +41,7 @@
41#define STAC_UNSOL_ENABLE (AC_USRSP_EN | STAC_HP_EVENT) 41#define STAC_UNSOL_ENABLE (AC_USRSP_EN | STAC_HP_EVENT)
42 42
43struct sigmatel_spec { 43struct sigmatel_spec {
44 snd_kcontrol_new_t *mixers[4]; 44 struct snd_kcontrol_new *mixers[4];
45 unsigned int num_mixers; 45 unsigned int num_mixers;
46 46
47 unsigned int surr_switch: 1; 47 unsigned int surr_switch: 1;
@@ -66,7 +66,7 @@ struct sigmatel_spec {
66 66
67 /* codec specific stuff */ 67 /* codec specific stuff */
68 struct hda_verb *init; 68 struct hda_verb *init;
69 snd_kcontrol_new_t *mixer; 69 struct snd_kcontrol_new *mixer;
70 70
71 /* capture source */ 71 /* capture source */
72 struct hda_input_mux *input_mux; 72 struct hda_input_mux *input_mux;
@@ -81,7 +81,7 @@ struct sigmatel_spec {
81 /* dynamic controls and input_mux */ 81 /* dynamic controls and input_mux */
82 struct auto_pin_cfg autocfg; 82 struct auto_pin_cfg autocfg;
83 unsigned int num_kctl_alloc, num_kctl_used; 83 unsigned int num_kctl_alloc, num_kctl_used;
84 snd_kcontrol_new_t *kctl_alloc; 84 struct snd_kcontrol_new *kctl_alloc;
85 struct hda_input_mux private_imux; 85 struct hda_input_mux private_imux;
86}; 86};
87 87
@@ -116,14 +116,14 @@ static hda_nid_t stac922x_pin_nids[10] = {
116}; 116};
117#endif 117#endif
118 118
119static int stac92xx_mux_enum_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 119static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
120{ 120{
121 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 121 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
122 struct sigmatel_spec *spec = codec->spec; 122 struct sigmatel_spec *spec = codec->spec;
123 return snd_hda_input_mux_info(spec->input_mux, uinfo); 123 return snd_hda_input_mux_info(spec->input_mux, uinfo);
124} 124}
125 125
126static int stac92xx_mux_enum_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 126static int stac92xx_mux_enum_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
127{ 127{
128 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 128 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
129 struct sigmatel_spec *spec = codec->spec; 129 struct sigmatel_spec *spec = codec->spec;
@@ -133,7 +133,7 @@ static int stac92xx_mux_enum_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
133 return 0; 133 return 0;
134} 134}
135 135
136static int stac92xx_mux_enum_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 136static int stac92xx_mux_enum_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
137{ 137{
138 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 138 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
139 struct sigmatel_spec *spec = codec->spec; 139 struct sigmatel_spec *spec = codec->spec;
@@ -157,7 +157,7 @@ static struct hda_verb stac922x_core_init[] = {
157 157
158static int stac922x_channel_modes[3] = {2, 6, 8}; 158static int stac922x_channel_modes[3] = {2, 6, 8};
159 159
160static int stac922x_ch_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) 160static int stac922x_ch_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
161{ 161{
162 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 162 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
163 struct sigmatel_spec *spec = codec->spec; 163 struct sigmatel_spec *spec = codec->spec;
@@ -172,7 +172,7 @@ static int stac922x_ch_mode_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *
172 return 0; 172 return 0;
173} 173}
174 174
175static int stac922x_ch_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 175static int stac922x_ch_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
176{ 176{
177 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 177 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
178 struct sigmatel_spec *spec = codec->spec; 178 struct sigmatel_spec *spec = codec->spec;
@@ -181,7 +181,7 @@ static int stac922x_ch_mode_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
181 return 0; 181 return 0;
182} 182}
183 183
184static int stac922x_ch_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *ucontrol) 184static int stac922x_ch_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
185{ 185{
186 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 186 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
187 struct sigmatel_spec *spec = codec->spec; 187 struct sigmatel_spec *spec = codec->spec;
@@ -198,7 +198,7 @@ static int stac922x_ch_mode_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *
198 return 1; 198 return 1;
199} 199}
200 200
201static snd_kcontrol_new_t stac9200_mixer[] = { 201static struct snd_kcontrol_new stac9200_mixer[] = {
202 HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), 202 HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT),
203 HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), 203 HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT),
204 { 204 {
@@ -216,7 +216,7 @@ static snd_kcontrol_new_t stac9200_mixer[] = {
216}; 216};
217 217
218/* This needs to be generated dynamically based on sequence */ 218/* This needs to be generated dynamically based on sequence */
219static snd_kcontrol_new_t stac922x_mixer[] = { 219static struct snd_kcontrol_new stac922x_mixer[] = {
220 { 220 {
221 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 221 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
222 .name = "Input Source", 222 .name = "Input Source",
@@ -231,7 +231,7 @@ static snd_kcontrol_new_t stac922x_mixer[] = {
231 { } /* end */ 231 { } /* end */
232}; 232};
233 233
234static snd_kcontrol_new_t stac922x_ch_mode_mixer[] = { 234static struct snd_kcontrol_new stac922x_ch_mode_mixer[] = {
235 { 235 {
236 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 236 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
237 .name = "Channel Mode", 237 .name = "Channel Mode",
@@ -320,7 +320,7 @@ static void stac92xx_set_config_regs(struct hda_codec *codec)
320 */ 320 */
321static int stac92xx_playback_pcm_open(struct hda_pcm_stream *hinfo, 321static int stac92xx_playback_pcm_open(struct hda_pcm_stream *hinfo,
322 struct hda_codec *codec, 322 struct hda_codec *codec,
323 snd_pcm_substream_t *substream) 323 struct snd_pcm_substream *substream)
324{ 324{
325 struct sigmatel_spec *spec = codec->spec; 325 struct sigmatel_spec *spec = codec->spec;
326 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream); 326 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream);
@@ -333,7 +333,7 @@ static int stac92xx_playback_pcm_open(struct hda_pcm_stream *hinfo,
333static int stac92xx_multi_out_analog_prepare(struct hda_codec *codec, struct hda_multi_out *mout, 333static int stac92xx_multi_out_analog_prepare(struct hda_codec *codec, struct hda_multi_out *mout,
334 unsigned int stream_tag, 334 unsigned int stream_tag,
335 unsigned int format, 335 unsigned int format,
336 snd_pcm_substream_t *substream) 336 struct snd_pcm_substream *substream)
337{ 337{
338 hda_nid_t *nids = mout->dac_nids; 338 hda_nid_t *nids = mout->dac_nids;
339 int chs = substream->runtime->channels; 339 int chs = substream->runtime->channels;
@@ -380,7 +380,7 @@ static int stac92xx_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
380 struct hda_codec *codec, 380 struct hda_codec *codec,
381 unsigned int stream_tag, 381 unsigned int stream_tag,
382 unsigned int format, 382 unsigned int format,
383 snd_pcm_substream_t *substream) 383 struct snd_pcm_substream *substream)
384{ 384{
385 struct sigmatel_spec *spec = codec->spec; 385 struct sigmatel_spec *spec = codec->spec;
386 return stac92xx_multi_out_analog_prepare(codec, &spec->multiout, stream_tag, 386 return stac92xx_multi_out_analog_prepare(codec, &spec->multiout, stream_tag,
@@ -389,7 +389,7 @@ static int stac92xx_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
389 389
390static int stac92xx_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, 390static int stac92xx_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
391 struct hda_codec *codec, 391 struct hda_codec *codec,
392 snd_pcm_substream_t *substream) 392 struct snd_pcm_substream *substream)
393{ 393{
394 struct sigmatel_spec *spec = codec->spec; 394 struct sigmatel_spec *spec = codec->spec;
395 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); 395 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout);
@@ -400,7 +400,7 @@ static int stac92xx_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
400 */ 400 */
401static int stac92xx_dig_playback_pcm_open(struct hda_pcm_stream *hinfo, 401static int stac92xx_dig_playback_pcm_open(struct hda_pcm_stream *hinfo,
402 struct hda_codec *codec, 402 struct hda_codec *codec,
403 snd_pcm_substream_t *substream) 403 struct snd_pcm_substream *substream)
404{ 404{
405 struct sigmatel_spec *spec = codec->spec; 405 struct sigmatel_spec *spec = codec->spec;
406 return snd_hda_multi_out_dig_open(codec, &spec->multiout); 406 return snd_hda_multi_out_dig_open(codec, &spec->multiout);
@@ -408,7 +408,7 @@ static int stac92xx_dig_playback_pcm_open(struct hda_pcm_stream *hinfo,
408 408
409static int stac92xx_dig_playback_pcm_close(struct hda_pcm_stream *hinfo, 409static int stac92xx_dig_playback_pcm_close(struct hda_pcm_stream *hinfo,
410 struct hda_codec *codec, 410 struct hda_codec *codec,
411 snd_pcm_substream_t *substream) 411 struct snd_pcm_substream *substream)
412{ 412{
413 struct sigmatel_spec *spec = codec->spec; 413 struct sigmatel_spec *spec = codec->spec;
414 return snd_hda_multi_out_dig_close(codec, &spec->multiout); 414 return snd_hda_multi_out_dig_close(codec, &spec->multiout);
@@ -422,7 +422,7 @@ static int stac92xx_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
422 struct hda_codec *codec, 422 struct hda_codec *codec,
423 unsigned int stream_tag, 423 unsigned int stream_tag,
424 unsigned int format, 424 unsigned int format,
425 snd_pcm_substream_t *substream) 425 struct snd_pcm_substream *substream)
426{ 426{
427 struct sigmatel_spec *spec = codec->spec; 427 struct sigmatel_spec *spec = codec->spec;
428 428
@@ -433,7 +433,7 @@ static int stac92xx_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
433 433
434static int stac92xx_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, 434static int stac92xx_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
435 struct hda_codec *codec, 435 struct hda_codec *codec,
436 snd_pcm_substream_t *substream) 436 struct snd_pcm_substream *substream)
437{ 437{
438 struct sigmatel_spec *spec = codec->spec; 438 struct sigmatel_spec *spec = codec->spec;
439 439
@@ -516,7 +516,7 @@ enum {
516 STAC_CTL_WIDGET_MUTE, 516 STAC_CTL_WIDGET_MUTE,
517}; 517};
518 518
519static snd_kcontrol_new_t stac92xx_control_templates[] = { 519static struct snd_kcontrol_new stac92xx_control_templates[] = {
520 HDA_CODEC_VOLUME(NULL, 0, 0, 0), 520 HDA_CODEC_VOLUME(NULL, 0, 0, 0),
521 HDA_CODEC_MUTE(NULL, 0, 0, 0), 521 HDA_CODEC_MUTE(NULL, 0, 0, 0),
522}; 522};
@@ -524,7 +524,7 @@ static snd_kcontrol_new_t stac92xx_control_templates[] = {
524/* add dynamic controls */ 524/* add dynamic controls */
525static int stac92xx_add_control(struct sigmatel_spec *spec, int type, const char *name, unsigned long val) 525static int stac92xx_add_control(struct sigmatel_spec *spec, int type, const char *name, unsigned long val)
526{ 526{
527 snd_kcontrol_new_t *knew; 527 struct snd_kcontrol_new *knew;
528 528
529 if (spec->num_kctl_used >= spec->num_kctl_alloc) { 529 if (spec->num_kctl_used >= spec->num_kctl_alloc) {
530 int num = spec->num_kctl_alloc + NUM_CONTROL_ALLOC; 530 int num = spec->num_kctl_alloc + NUM_CONTROL_ALLOC;