aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 8ec2dfca9a6c..df9453d0122e 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -755,7 +755,7 @@ int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list,
755int snd_hda_codec_set_pincfg(struct hda_codec *codec, 755int snd_hda_codec_set_pincfg(struct hda_codec *codec,
756 hda_nid_t nid, unsigned int cfg) 756 hda_nid_t nid, unsigned int cfg)
757{ 757{
758 return snd_hda_add_pincfg(codec, &codec->cur_pins, nid, cfg); 758 return snd_hda_add_pincfg(codec, &codec->driver_pins, nid, cfg);
759} 759}
760EXPORT_SYMBOL_HDA(snd_hda_codec_set_pincfg); 760EXPORT_SYMBOL_HDA(snd_hda_codec_set_pincfg);
761 761
@@ -764,11 +764,11 @@ unsigned int snd_hda_codec_get_pincfg(struct hda_codec *codec, hda_nid_t nid)
764{ 764{
765 struct hda_pincfg *pin; 765 struct hda_pincfg *pin;
766 766
767 pin = look_up_pincfg(codec, &codec->cur_pins, nid); 767 pin = look_up_pincfg(codec, &codec->driver_pins, nid);
768 if (pin) 768 if (pin)
769 return pin->cfg; 769 return pin->cfg;
770#ifdef CONFIG_SND_HDA_HWDEP 770#ifdef CONFIG_SND_HDA_HWDEP
771 pin = look_up_pincfg(codec, &codec->override_pins, nid); 771 pin = look_up_pincfg(codec, &codec->user_pins, nid);
772 if (pin) 772 if (pin)
773 return pin->cfg; 773 return pin->cfg;
774#endif 774#endif
@@ -797,12 +797,12 @@ static void free_hda_cache(struct hda_cache_rec *cache);
797/* restore the initial pin cfgs and release all pincfg lists */ 797/* restore the initial pin cfgs and release all pincfg lists */
798static void restore_init_pincfgs(struct hda_codec *codec) 798static void restore_init_pincfgs(struct hda_codec *codec)
799{ 799{
800 /* first free cur_pins and override_pins, then call restore_pincfg 800 /* first free driver_pins and user_pins, then call restore_pincfg
801 * so that only the values in init_pins are restored 801 * so that only the values in init_pins are restored
802 */ 802 */
803 snd_array_free(&codec->cur_pins); 803 snd_array_free(&codec->driver_pins);
804#ifdef CONFIG_SND_HDA_HWDEP 804#ifdef CONFIG_SND_HDA_HWDEP
805 snd_array_free(&codec->override_pins); 805 snd_array_free(&codec->user_pins);
806#endif 806#endif
807 restore_pincfgs(codec); 807 restore_pincfgs(codec);
808 snd_array_free(&codec->init_pins); 808 snd_array_free(&codec->init_pins);
@@ -874,7 +874,7 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr
874 init_hda_cache(&codec->cmd_cache, sizeof(struct hda_cache_head)); 874 init_hda_cache(&codec->cmd_cache, sizeof(struct hda_cache_head));
875 snd_array_init(&codec->mixers, sizeof(struct snd_kcontrol *), 32); 875 snd_array_init(&codec->mixers, sizeof(struct snd_kcontrol *), 32);
876 snd_array_init(&codec->init_pins, sizeof(struct hda_pincfg), 16); 876 snd_array_init(&codec->init_pins, sizeof(struct hda_pincfg), 16);
877 snd_array_init(&codec->cur_pins, sizeof(struct hda_pincfg), 16); 877 snd_array_init(&codec->driver_pins, sizeof(struct hda_pincfg), 16);
878 if (codec->bus->modelname) { 878 if (codec->bus->modelname) {
879 codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL); 879 codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL);
880 if (!codec->modelname) { 880 if (!codec->modelname) {
@@ -1463,8 +1463,8 @@ void snd_hda_codec_reset(struct hda_codec *codec)
1463 free_hda_cache(&codec->cmd_cache); 1463 free_hda_cache(&codec->cmd_cache);
1464 init_hda_cache(&codec->amp_cache, sizeof(struct hda_amp_info)); 1464 init_hda_cache(&codec->amp_cache, sizeof(struct hda_amp_info));
1465 init_hda_cache(&codec->cmd_cache, sizeof(struct hda_cache_head)); 1465 init_hda_cache(&codec->cmd_cache, sizeof(struct hda_cache_head));
1466 /* free only cur_pins so that init_pins + override_pins are restored */ 1466 /* free only driver_pins so that init_pins + user_pins are restored */
1467 snd_array_free(&codec->cur_pins); 1467 snd_array_free(&codec->driver_pins);
1468 restore_pincfgs(codec); 1468 restore_pincfgs(codec);
1469 codec->num_pcms = 0; 1469 codec->num_pcms = 0;
1470 codec->pcm_info = NULL; 1470 codec->pcm_info = NULL;