diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-25 22:26:14 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-25 22:26:14 -0500 |
commit | 91e229bbad6524aabaac8717b2f559283670c37a (patch) | |
tree | 84a55e4ac2dcf23add97bd9fde3e9cb232c12b30 /sound/pci | |
parent | 6e5e93424dc66542c548dfaa3bfebe30d46d50dd (diff) | |
parent | bfa274e2436fc7ef72ef51c878083647f1cfd429 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/bt87x.c | 9 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 23 | ||||
-rw-r--r-- | sound/pci/hda/hda_proc.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 7 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 8 | ||||
-rw-r--r-- | sound/pci/oxygen/oxygen.c | 35 | ||||
-rw-r--r-- | sound/pci/oxygen/oxygen_lib.c | 10 | ||||
-rw-r--r-- | sound/pci/oxygen/oxygen_pcm.c | 2 | ||||
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 7 |
10 files changed, 92 insertions, 26 deletions
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index c9a2421cf6f0..4ecdd635ed1d 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -681,15 +681,12 @@ static struct snd_kcontrol_new snd_bt87x_capture_source = { | |||
681 | 681 | ||
682 | static int snd_bt87x_free(struct snd_bt87x *chip) | 682 | static int snd_bt87x_free(struct snd_bt87x *chip) |
683 | { | 683 | { |
684 | if (chip->mmio) { | 684 | if (chip->mmio) |
685 | snd_bt87x_stop(chip); | 685 | snd_bt87x_stop(chip); |
686 | if (chip->irq >= 0) | ||
687 | synchronize_irq(chip->irq); | ||
688 | |||
689 | iounmap(chip->mmio); | ||
690 | } | ||
691 | if (chip->irq >= 0) | 686 | if (chip->irq >= 0) |
692 | free_irq(chip->irq, chip); | 687 | free_irq(chip->irq, chip); |
688 | if (chip->mmio) | ||
689 | iounmap(chip->mmio); | ||
693 | pci_release_regions(chip->pci); | 690 | pci_release_regions(chip->pci); |
694 | pci_disable_device(chip->pci); | 691 | pci_disable_device(chip->pci); |
695 | kfree(chip); | 692 | kfree(chip); |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 26812dc2b7f2..37c413923db8 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1055,6 +1055,12 @@ int snd_hda_add_vmaster(struct hda_codec *codec, char *name, | |||
1055 | const char **s; | 1055 | const char **s; |
1056 | int err; | 1056 | int err; |
1057 | 1057 | ||
1058 | for (s = slaves; *s && !snd_hda_find_mixer_ctl(codec, *s); s++) | ||
1059 | ; | ||
1060 | if (!*s) { | ||
1061 | snd_printdd("No slave found for %s\n", name); | ||
1062 | return 0; | ||
1063 | } | ||
1058 | kctl = snd_ctl_make_virtual_master(name, tlv); | 1064 | kctl = snd_ctl_make_virtual_master(name, tlv); |
1059 | if (!kctl) | 1065 | if (!kctl) |
1060 | return -ENOMEM; | 1066 | return -ENOMEM; |
@@ -1197,8 +1203,8 @@ int snd_hda_mixer_bind_ctls_info(struct snd_kcontrol *kcontrol, | |||
1197 | struct hda_bind_ctls *c; | 1203 | struct hda_bind_ctls *c; |
1198 | int err; | 1204 | int err; |
1199 | 1205 | ||
1200 | c = (struct hda_bind_ctls *)kcontrol->private_value; | ||
1201 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1206 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ |
1207 | c = (struct hda_bind_ctls *)kcontrol->private_value; | ||
1202 | kcontrol->private_value = *c->values; | 1208 | kcontrol->private_value = *c->values; |
1203 | err = c->ops->info(kcontrol, uinfo); | 1209 | err = c->ops->info(kcontrol, uinfo); |
1204 | kcontrol->private_value = (long)c; | 1210 | kcontrol->private_value = (long)c; |
@@ -1213,8 +1219,8 @@ int snd_hda_mixer_bind_ctls_get(struct snd_kcontrol *kcontrol, | |||
1213 | struct hda_bind_ctls *c; | 1219 | struct hda_bind_ctls *c; |
1214 | int err; | 1220 | int err; |
1215 | 1221 | ||
1216 | c = (struct hda_bind_ctls *)kcontrol->private_value; | ||
1217 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1222 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ |
1223 | c = (struct hda_bind_ctls *)kcontrol->private_value; | ||
1218 | kcontrol->private_value = *c->values; | 1224 | kcontrol->private_value = *c->values; |
1219 | err = c->ops->get(kcontrol, ucontrol); | 1225 | err = c->ops->get(kcontrol, ucontrol); |
1220 | kcontrol->private_value = (long)c; | 1226 | kcontrol->private_value = (long)c; |
@@ -1230,8 +1236,8 @@ int snd_hda_mixer_bind_ctls_put(struct snd_kcontrol *kcontrol, | |||
1230 | unsigned long *vals; | 1236 | unsigned long *vals; |
1231 | int err = 0, change = 0; | 1237 | int err = 0, change = 0; |
1232 | 1238 | ||
1233 | c = (struct hda_bind_ctls *)kcontrol->private_value; | ||
1234 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1239 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ |
1240 | c = (struct hda_bind_ctls *)kcontrol->private_value; | ||
1235 | for (vals = c->values; *vals; vals++) { | 1241 | for (vals = c->values; *vals; vals++) { |
1236 | kcontrol->private_value = *vals; | 1242 | kcontrol->private_value = *vals; |
1237 | err = c->ops->put(kcontrol, ucontrol); | 1243 | err = c->ops->put(kcontrol, ucontrol); |
@@ -1251,8 +1257,8 @@ int snd_hda_mixer_bind_tlv(struct snd_kcontrol *kcontrol, int op_flag, | |||
1251 | struct hda_bind_ctls *c; | 1257 | struct hda_bind_ctls *c; |
1252 | int err; | 1258 | int err; |
1253 | 1259 | ||
1254 | c = (struct hda_bind_ctls *)kcontrol->private_value; | ||
1255 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ | 1260 | mutex_lock(&codec->spdif_mutex); /* reuse spdif_mutex */ |
1261 | c = (struct hda_bind_ctls *)kcontrol->private_value; | ||
1256 | kcontrol->private_value = *c->values; | 1262 | kcontrol->private_value = *c->values; |
1257 | err = c->ops->tlv(kcontrol, op_flag, size, tlv); | 1263 | err = c->ops->tlv(kcontrol, op_flag, size, tlv); |
1258 | kcontrol->private_value = (long)c; | 1264 | kcontrol->private_value = (long)c; |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 56f8a3050751..4be36c84b36c 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -275,6 +275,11 @@ enum { | |||
275 | #define NVIDIA_HDA_TRANSREG_ADDR 0x4e | 275 | #define NVIDIA_HDA_TRANSREG_ADDR 0x4e |
276 | #define NVIDIA_HDA_ENABLE_COHBITS 0x0f | 276 | #define NVIDIA_HDA_ENABLE_COHBITS 0x0f |
277 | 277 | ||
278 | /* Defines for Intel SCH HDA snoop control */ | ||
279 | #define INTEL_SCH_HDA_DEVC 0x78 | ||
280 | #define INTEL_SCH_HDA_DEVC_NOSNOOP (0x1<<11) | ||
281 | |||
282 | |||
278 | /* | 283 | /* |
279 | */ | 284 | */ |
280 | 285 | ||
@@ -868,6 +873,8 @@ static void update_pci_byte(struct pci_dev *pci, unsigned int reg, | |||
868 | 873 | ||
869 | static void azx_init_pci(struct azx *chip) | 874 | static void azx_init_pci(struct azx *chip) |
870 | { | 875 | { |
876 | unsigned short snoop; | ||
877 | |||
871 | /* Clear bits 0-2 of PCI register TCSEL (at offset 0x44) | 878 | /* Clear bits 0-2 of PCI register TCSEL (at offset 0x44) |
872 | * TCSEL == Traffic Class Select Register, which sets PCI express QOS | 879 | * TCSEL == Traffic Class Select Register, which sets PCI express QOS |
873 | * Ensuring these bits are 0 clears playback static on some HD Audio | 880 | * Ensuring these bits are 0 clears playback static on some HD Audio |
@@ -888,6 +895,19 @@ static void azx_init_pci(struct azx *chip) | |||
888 | NVIDIA_HDA_TRANSREG_ADDR, | 895 | NVIDIA_HDA_TRANSREG_ADDR, |
889 | 0x0f, NVIDIA_HDA_ENABLE_COHBITS); | 896 | 0x0f, NVIDIA_HDA_ENABLE_COHBITS); |
890 | break; | 897 | break; |
898 | case AZX_DRIVER_SCH: | ||
899 | pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop); | ||
900 | if (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) { | ||
901 | pci_write_config_word(chip->pci, INTEL_SCH_HDA_DEVC, \ | ||
902 | snoop & (~INTEL_SCH_HDA_DEVC_NOSNOOP)); | ||
903 | pci_read_config_word(chip->pci, | ||
904 | INTEL_SCH_HDA_DEVC, &snoop); | ||
905 | snd_printdd("HDA snoop disabled, enabling ... %s\n",\ | ||
906 | (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) \ | ||
907 | ? "Failed" : "OK"); | ||
908 | } | ||
909 | break; | ||
910 | |||
891 | } | 911 | } |
892 | } | 912 | } |
893 | 913 | ||
@@ -1040,6 +1060,7 @@ static int azx_setup_controller(struct azx *chip, struct azx_dev *azx_dev) | |||
1040 | 1060 | ||
1041 | static unsigned int azx_max_codecs[] __devinitdata = { | 1061 | static unsigned int azx_max_codecs[] __devinitdata = { |
1042 | [AZX_DRIVER_ICH] = 3, | 1062 | [AZX_DRIVER_ICH] = 3, |
1063 | [AZX_DRIVER_SCH] = 3, | ||
1043 | [AZX_DRIVER_ATI] = 4, | 1064 | [AZX_DRIVER_ATI] = 4, |
1044 | [AZX_DRIVER_ATIHDMI] = 4, | 1065 | [AZX_DRIVER_ATIHDMI] = 4, |
1045 | [AZX_DRIVER_VIA] = 3, /* FIXME: correct? */ | 1066 | [AZX_DRIVER_VIA] = 3, /* FIXME: correct? */ |
@@ -1797,7 +1818,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
1797 | */ | 1818 | */ |
1798 | chip->playback_streams = (gcap & (0xF << 12)) >> 12; | 1819 | chip->playback_streams = (gcap & (0xF << 12)) >> 12; |
1799 | chip->capture_streams = (gcap & (0xF << 8)) >> 8; | 1820 | chip->capture_streams = (gcap & (0xF << 8)) >> 8; |
1800 | chip->playback_index_offset = (gcap & (0xF << 12)) >> 12; | 1821 | chip->playback_index_offset = chip->capture_streams; |
1801 | chip->capture_index_offset = 0; | 1822 | chip->capture_index_offset = 0; |
1802 | } else { | 1823 | } else { |
1803 | /* gcap didn't give any info, switching to old method */ | 1824 | /* gcap didn't give any info, switching to old method */ |
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 35a630d1770f..5633f77f8f3b 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c | |||
@@ -584,7 +584,8 @@ static void print_codec_info(struct snd_info_entry *entry, | |||
584 | print_amp_caps(buffer, codec, nid, HDA_INPUT); | 584 | print_amp_caps(buffer, codec, nid, HDA_INPUT); |
585 | snd_iprintf(buffer, " Amp-In vals: "); | 585 | snd_iprintf(buffer, " Amp-In vals: "); |
586 | print_amp_vals(buffer, codec, nid, HDA_INPUT, | 586 | print_amp_vals(buffer, codec, nid, HDA_INPUT, |
587 | wid_caps & AC_WCAP_STEREO, conn_len); | 587 | wid_caps & AC_WCAP_STEREO, |
588 | wid_type == AC_WID_PIN ? 1 : conn_len); | ||
588 | } | 589 | } |
589 | if (wid_caps & AC_WCAP_OUT_AMP) { | 590 | if (wid_caps & AC_WCAP_OUT_AMP) { |
590 | snd_iprintf(buffer, " Amp-Out caps: "); | 591 | snd_iprintf(buffer, " Amp-Out caps: "); |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index f6dd51cda7b2..f7cd3a804b11 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -488,7 +488,7 @@ static int conexant_ch_mode_put(struct snd_kcontrol *kcontrol, | |||
488 | static hda_nid_t cxt5045_dac_nids[1] = { 0x19 }; | 488 | static hda_nid_t cxt5045_dac_nids[1] = { 0x19 }; |
489 | static hda_nid_t cxt5045_adc_nids[1] = { 0x1a }; | 489 | static hda_nid_t cxt5045_adc_nids[1] = { 0x1a }; |
490 | static hda_nid_t cxt5045_capsrc_nids[1] = { 0x1a }; | 490 | static hda_nid_t cxt5045_capsrc_nids[1] = { 0x1a }; |
491 | #define CXT5045_SPDIF_OUT 0x13 | 491 | #define CXT5045_SPDIF_OUT 0x18 |
492 | 492 | ||
493 | static struct hda_channel_mode cxt5045_modes[1] = { | 493 | static struct hda_channel_mode cxt5045_modes[1] = { |
494 | { 2, NULL }, | 494 | { 2, NULL }, |
@@ -658,6 +658,7 @@ static struct hda_verb cxt5045_init_verbs[] = { | |||
658 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, | 658 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, |
659 | AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, | 659 | AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, |
660 | /* SPDIF route: PCM */ | 660 | /* SPDIF route: PCM */ |
661 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
661 | { 0x13, AC_VERB_SET_CONNECT_SEL, 0x0 }, | 662 | { 0x13, AC_VERB_SET_CONNECT_SEL, 0x0 }, |
662 | /* EAPD */ | 663 | /* EAPD */ |
663 | {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */ | 664 | {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */ |
@@ -683,6 +684,7 @@ static struct hda_verb cxt5045_benq_init_verbs[] = { | |||
683 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, | 684 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, |
684 | AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, | 685 | AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, |
685 | /* SPDIF route: PCM */ | 686 | /* SPDIF route: PCM */ |
687 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
686 | {0x13, AC_VERB_SET_CONNECT_SEL, 0x0}, | 688 | {0x13, AC_VERB_SET_CONNECT_SEL, 0x0}, |
687 | /* EAPD */ | 689 | /* EAPD */ |
688 | {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ | 690 | {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ |
@@ -781,7 +783,8 @@ static struct hda_verb cxt5045_test_init_verbs[] = { | |||
781 | * PCM format, copyright asserted, no pre-emphasis and no validity | 783 | * PCM format, copyright asserted, no pre-emphasis and no validity |
782 | * control. | 784 | * control. |
783 | */ | 785 | */ |
784 | {0x13, AC_VERB_SET_DIGI_CONVERT_1, 0}, | 786 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
787 | {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0}, | ||
785 | 788 | ||
786 | /* Start with output sum widgets muted and their output gains at min */ | 789 | /* Start with output sum widgets muted and their output gains at min */ |
787 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | 790 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 586d98f1b63d..777f8c01ca7a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5227,10 +5227,14 @@ static int alc882_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
5227 | const struct hda_input_mux *imux = spec->input_mux; | 5227 | const struct hda_input_mux *imux = spec->input_mux; |
5228 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 5228 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
5229 | static hda_nid_t capture_mixers[3] = { 0x24, 0x23, 0x22 }; | 5229 | static hda_nid_t capture_mixers[3] = { 0x24, 0x23, 0x22 }; |
5230 | hda_nid_t nid = capture_mixers[adc_idx]; | 5230 | hda_nid_t nid; |
5231 | unsigned int *cur_val = &spec->cur_mux[adc_idx]; | 5231 | unsigned int *cur_val = &spec->cur_mux[adc_idx]; |
5232 | unsigned int i, idx; | 5232 | unsigned int i, idx; |
5233 | 5233 | ||
5234 | if (spec->num_adc_nids < 3) | ||
5235 | nid = capture_mixers[adc_idx + 1]; | ||
5236 | else | ||
5237 | nid = capture_mixers[adc_idx]; | ||
5234 | idx = ucontrol->value.enumerated.item[0]; | 5238 | idx = ucontrol->value.enumerated.item[0]; |
5235 | if (idx >= imux->num_items) | 5239 | if (idx >= imux->num_items) |
5236 | idx = imux->num_items - 1; | 5240 | idx = imux->num_items - 1; |
@@ -6457,7 +6461,7 @@ static int alc883_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
6457 | struct alc_spec *spec = codec->spec; | 6461 | struct alc_spec *spec = codec->spec; |
6458 | const struct hda_input_mux *imux = spec->input_mux; | 6462 | const struct hda_input_mux *imux = spec->input_mux; |
6459 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 6463 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
6460 | static hda_nid_t capture_mixers[3] = { 0x24, 0x23, 0x22 }; | 6464 | static hda_nid_t capture_mixers[2] = { 0x23, 0x22 }; |
6461 | hda_nid_t nid = capture_mixers[adc_idx]; | 6465 | hda_nid_t nid = capture_mixers[adc_idx]; |
6462 | unsigned int *cur_val = &spec->cur_mux[adc_idx]; | 6466 | unsigned int *cur_val = &spec->cur_mux[adc_idx]; |
6463 | unsigned int i, idx; | 6467 | unsigned int i, idx; |
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c index f31a0eb409b0..9a9941bb0460 100644 --- a/sound/pci/oxygen/oxygen.c +++ b/sound/pci/oxygen/oxygen.c | |||
@@ -28,7 +28,9 @@ | |||
28 | * GPIO 1 -> DFS1 of AK5385 | 28 | * GPIO 1 -> DFS1 of AK5385 |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/mutex.h> | ||
31 | #include <linux/pci.h> | 32 | #include <linux/pci.h> |
33 | #include <sound/ac97_codec.h> | ||
32 | #include <sound/control.h> | 34 | #include <sound/control.h> |
33 | #include <sound/core.h> | 35 | #include <sound/core.h> |
34 | #include <sound/initval.h> | 36 | #include <sound/initval.h> |
@@ -37,6 +39,7 @@ | |||
37 | #include <sound/tlv.h> | 39 | #include <sound/tlv.h> |
38 | #include "oxygen.h" | 40 | #include "oxygen.h" |
39 | #include "ak4396.h" | 41 | #include "ak4396.h" |
42 | #include "cm9780.h" | ||
40 | 43 | ||
41 | MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>"); | 44 | MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>"); |
42 | MODULE_DESCRIPTION("C-Media CMI8788 driver"); | 45 | MODULE_DESCRIPTION("C-Media CMI8788 driver"); |
@@ -75,6 +78,8 @@ MODULE_DEVICE_TABLE(pci, oxygen_ids); | |||
75 | #define GPIO_AK5385_DFS_DOUBLE 0x0001 | 78 | #define GPIO_AK5385_DFS_DOUBLE 0x0001 |
76 | #define GPIO_AK5385_DFS_QUAD 0x0002 | 79 | #define GPIO_AK5385_DFS_QUAD 0x0002 |
77 | 80 | ||
81 | #define GPIO_LINE_MUTE CM9780_GPO0 | ||
82 | |||
78 | #define WM8785_R0 0 | 83 | #define WM8785_R0 0 |
79 | #define WM8785_R1 1 | 84 | #define WM8785_R1 1 |
80 | #define WM8785_R2 2 | 85 | #define WM8785_R2 2 |
@@ -180,16 +185,23 @@ static void wm8785_init(struct oxygen *chip) | |||
180 | snd_component_add(chip->card, "WM8785"); | 185 | snd_component_add(chip->card, "WM8785"); |
181 | } | 186 | } |
182 | 187 | ||
188 | static void cmi9780_init(struct oxygen *chip) | ||
189 | { | ||
190 | oxygen_ac97_clear_bits(chip, 0, CM9780_GPIO_STATUS, GPIO_LINE_MUTE); | ||
191 | } | ||
192 | |||
183 | static void generic_init(struct oxygen *chip) | 193 | static void generic_init(struct oxygen *chip) |
184 | { | 194 | { |
185 | ak4396_init(chip); | 195 | ak4396_init(chip); |
186 | wm8785_init(chip); | 196 | wm8785_init(chip); |
197 | cmi9780_init(chip); | ||
187 | } | 198 | } |
188 | 199 | ||
189 | static void meridian_init(struct oxygen *chip) | 200 | static void meridian_init(struct oxygen *chip) |
190 | { | 201 | { |
191 | ak4396_init(chip); | 202 | ak4396_init(chip); |
192 | ak5385_init(chip); | 203 | ak5385_init(chip); |
204 | cmi9780_init(chip); | ||
193 | } | 205 | } |
194 | 206 | ||
195 | static void generic_cleanup(struct oxygen *chip) | 207 | static void generic_cleanup(struct oxygen *chip) |
@@ -285,6 +297,27 @@ static void set_ak5385_params(struct oxygen *chip, | |||
285 | value, GPIO_AK5385_DFS_MASK); | 297 | value, GPIO_AK5385_DFS_MASK); |
286 | } | 298 | } |
287 | 299 | ||
300 | static void cmi9780_switch_hook(struct oxygen *chip, unsigned int codec, | ||
301 | unsigned int reg, int mute) | ||
302 | { | ||
303 | if (codec != 0) | ||
304 | return; | ||
305 | switch (reg) { | ||
306 | case AC97_LINE: | ||
307 | oxygen_write_ac97_masked(chip, 0, CM9780_GPIO_STATUS, | ||
308 | mute ? GPIO_LINE_MUTE : 0, | ||
309 | GPIO_LINE_MUTE); | ||
310 | break; | ||
311 | case AC97_MIC: | ||
312 | case AC97_CD: | ||
313 | case AC97_AUX: | ||
314 | if (!mute) | ||
315 | oxygen_ac97_set_bits(chip, 0, CM9780_GPIO_STATUS, | ||
316 | GPIO_LINE_MUTE); | ||
317 | break; | ||
318 | } | ||
319 | } | ||
320 | |||
288 | static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0); | 321 | static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0); |
289 | 322 | ||
290 | static int ak4396_control_filter(struct snd_kcontrol_new *template) | 323 | static int ak4396_control_filter(struct snd_kcontrol_new *template) |
@@ -308,6 +341,7 @@ static const struct oxygen_model model_generic = { | |||
308 | .set_adc_params = set_wm8785_params, | 341 | .set_adc_params = set_wm8785_params, |
309 | .update_dac_volume = update_ak4396_volume, | 342 | .update_dac_volume = update_ak4396_volume, |
310 | .update_dac_mute = update_ak4396_mute, | 343 | .update_dac_mute = update_ak4396_mute, |
344 | .ac97_switch_hook = cmi9780_switch_hook, | ||
311 | .model_data_size = sizeof(struct generic_data), | 345 | .model_data_size = sizeof(struct generic_data), |
312 | .dac_channels = 8, | 346 | .dac_channels = 8, |
313 | .used_channels = OXYGEN_CHANNEL_A | | 347 | .used_channels = OXYGEN_CHANNEL_A | |
@@ -331,6 +365,7 @@ static const struct oxygen_model model_meridian = { | |||
331 | .set_adc_params = set_ak5385_params, | 365 | .set_adc_params = set_ak5385_params, |
332 | .update_dac_volume = update_ak4396_volume, | 366 | .update_dac_volume = update_ak4396_volume, |
333 | .update_dac_mute = update_ak4396_mute, | 367 | .update_dac_mute = update_ak4396_mute, |
368 | .ac97_switch_hook = cmi9780_switch_hook, | ||
334 | .model_data_size = sizeof(struct generic_data), | 369 | .model_data_size = sizeof(struct generic_data), |
335 | .dac_channels = 8, | 370 | .dac_channels = 8, |
336 | .used_channels = OXYGEN_CHANNEL_B | | 371 | .used_channels = OXYGEN_CHANNEL_B | |
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index 6eb36dd11476..78c21155218e 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c | |||
@@ -204,7 +204,7 @@ static void oxygen_proc_read(struct snd_info_entry *entry, | |||
204 | mutex_unlock(&chip->mutex); | 204 | mutex_unlock(&chip->mutex); |
205 | } | 205 | } |
206 | 206 | ||
207 | static void __devinit oxygen_proc_init(struct oxygen *chip) | 207 | static void oxygen_proc_init(struct oxygen *chip) |
208 | { | 208 | { |
209 | struct snd_info_entry *entry; | 209 | struct snd_info_entry *entry; |
210 | 210 | ||
@@ -215,7 +215,7 @@ static void __devinit oxygen_proc_init(struct oxygen *chip) | |||
215 | #define oxygen_proc_init(chip) | 215 | #define oxygen_proc_init(chip) |
216 | #endif | 216 | #endif |
217 | 217 | ||
218 | static void __devinit oxygen_init(struct oxygen *chip) | 218 | static void oxygen_init(struct oxygen *chip) |
219 | { | 219 | { |
220 | unsigned int i; | 220 | unsigned int i; |
221 | 221 | ||
@@ -399,8 +399,8 @@ static void oxygen_card_free(struct snd_card *card) | |||
399 | pci_disable_device(chip->pci); | 399 | pci_disable_device(chip->pci); |
400 | } | 400 | } |
401 | 401 | ||
402 | int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | 402 | int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, |
403 | int midi, const struct oxygen_model *model) | 403 | int midi, const struct oxygen_model *model) |
404 | { | 404 | { |
405 | struct snd_card *card; | 405 | struct snd_card *card; |
406 | struct oxygen *chip; | 406 | struct oxygen *chip; |
@@ -507,7 +507,7 @@ err_card: | |||
507 | } | 507 | } |
508 | EXPORT_SYMBOL(oxygen_pci_probe); | 508 | EXPORT_SYMBOL(oxygen_pci_probe); |
509 | 509 | ||
510 | void __devexit oxygen_pci_remove(struct pci_dev *pci) | 510 | void oxygen_pci_remove(struct pci_dev *pci) |
511 | { | 511 | { |
512 | snd_card_free(pci_get_drvdata(pci)); | 512 | snd_card_free(pci_get_drvdata(pci)); |
513 | pci_set_drvdata(pci, NULL); | 513 | pci_set_drvdata(pci, NULL); |
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c index dfad3db35c82..b70046aca657 100644 --- a/sound/pci/oxygen/oxygen_pcm.c +++ b/sound/pci/oxygen/oxygen_pcm.c | |||
@@ -634,7 +634,7 @@ static void oxygen_pcm_free(struct snd_pcm *pcm) | |||
634 | snd_pcm_lib_preallocate_free_for_all(pcm); | 634 | snd_pcm_lib_preallocate_free_for_all(pcm); |
635 | } | 635 | } |
636 | 636 | ||
637 | int __devinit oxygen_pcm_init(struct oxygen *chip) | 637 | int oxygen_pcm_init(struct oxygen *chip) |
638 | { | 638 | { |
639 | struct snd_pcm *pcm; | 639 | struct snd_pcm *pcm; |
640 | int outs, ins; | 640 | int outs, ins; |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index c2bd4384316a..1be84f22d0de 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -745,7 +745,7 @@ static int hdsp_get_iobox_version (struct hdsp *hdsp) | |||
745 | 745 | ||
746 | 746 | ||
747 | #ifdef HDSP_FW_LOADER | 747 | #ifdef HDSP_FW_LOADER |
748 | static int __devinit hdsp_request_fw_loader(struct hdsp *hdsp); | 748 | static int hdsp_request_fw_loader(struct hdsp *hdsp); |
749 | #endif | 749 | #endif |
750 | 750 | ||
751 | static int hdsp_check_for_firmware (struct hdsp *hdsp, int load_on_demand) | 751 | static int hdsp_check_for_firmware (struct hdsp *hdsp, int load_on_demand) |
@@ -4688,8 +4688,7 @@ static struct snd_pcm_ops snd_hdsp_capture_ops = { | |||
4688 | .copy = snd_hdsp_capture_copy, | 4688 | .copy = snd_hdsp_capture_copy, |
4689 | }; | 4689 | }; |
4690 | 4690 | ||
4691 | static int __devinit snd_hdsp_create_hwdep(struct snd_card *card, | 4691 | static int snd_hdsp_create_hwdep(struct snd_card *card, struct hdsp *hdsp) |
4692 | struct hdsp *hdsp) | ||
4693 | { | 4692 | { |
4694 | struct snd_hwdep *hw; | 4693 | struct snd_hwdep *hw; |
4695 | int err; | 4694 | int err; |
@@ -4857,7 +4856,7 @@ static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp | |||
4857 | 4856 | ||
4858 | #ifdef HDSP_FW_LOADER | 4857 | #ifdef HDSP_FW_LOADER |
4859 | /* load firmware via hotplug fw loader */ | 4858 | /* load firmware via hotplug fw loader */ |
4860 | static int __devinit hdsp_request_fw_loader(struct hdsp *hdsp) | 4859 | static int hdsp_request_fw_loader(struct hdsp *hdsp) |
4861 | { | 4860 | { |
4862 | const char *fwfile; | 4861 | const char *fwfile; |
4863 | const struct firmware *fw; | 4862 | const struct firmware *fw; |