aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 70181d50053..33170a24200 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4262,6 +4262,52 @@ static void stac92xx_unsol_event(struct hda_codec *codec, unsigned int res)
4262 } 4262 }
4263} 4263}
4264 4264
4265#ifdef CONFIG_PROC_FS
4266static void stac92hd_proc_hook(struct snd_info_buffer *buffer,
4267 struct hda_codec *codec, hda_nid_t nid)
4268{
4269 if (nid == codec->afg)
4270 snd_iprintf(buffer, "Power-Map: 0x%02x\n",
4271 snd_hda_codec_read(codec, nid, 0, 0x0fec, 0x0));
4272}
4273
4274static void analog_loop_proc_hook(struct snd_info_buffer *buffer,
4275 struct hda_codec *codec,
4276 unsigned int verb)
4277{
4278 snd_iprintf(buffer, "Analog Loopback: 0x%02x\n",
4279 snd_hda_codec_read(codec, codec->afg, 0, verb, 0));
4280}
4281
4282/* stac92hd71bxx, stac92hd73xx */
4283static void stac92hd7x_proc_hook(struct snd_info_buffer *buffer,
4284 struct hda_codec *codec, hda_nid_t nid)
4285{
4286 stac92hd_proc_hook(buffer, codec, nid);
4287 if (nid == codec->afg)
4288 analog_loop_proc_hook(buffer, codec, 0xfa0);
4289}
4290
4291static void stac9205_proc_hook(struct snd_info_buffer *buffer,
4292 struct hda_codec *codec, hda_nid_t nid)
4293{
4294 if (nid == codec->afg)
4295 analog_loop_proc_hook(buffer, codec, 0xfe0);
4296}
4297
4298static void stac927x_proc_hook(struct snd_info_buffer *buffer,
4299 struct hda_codec *codec, hda_nid_t nid)
4300{
4301 if (nid == codec->afg)
4302 analog_loop_proc_hook(buffer, codec, 0xfeb);
4303}
4304#else
4305#define stac92hd_proc_hook NULL
4306#define stac92hd7x_proc_hook NULL
4307#define stac9205_proc_hook NULL
4308#define stac927x_proc_hook NULL
4309#endif
4310
4265#ifdef SND_HDA_NEEDS_RESUME 4311#ifdef SND_HDA_NEEDS_RESUME
4266static int stac92xx_resume(struct hda_codec *codec) 4312static int stac92xx_resume(struct hda_codec *codec)
4267{ 4313{
@@ -4585,6 +4631,8 @@ again:
4585 4631
4586 codec->patch_ops = stac92xx_patch_ops; 4632 codec->patch_ops = stac92xx_patch_ops;
4587 4633
4634 codec->proc_widget_hook = stac92hd7x_proc_hook;
4635
4588 return 0; 4636 return 0;
4589} 4637}
4590 4638
@@ -4671,6 +4719,8 @@ again:
4671 4719
4672 codec->patch_ops = stac92xx_patch_ops; 4720 codec->patch_ops = stac92xx_patch_ops;
4673 4721
4722 codec->proc_widget_hook = stac92hd_proc_hook;
4723
4674 return 0; 4724 return 0;
4675} 4725}
4676 4726
@@ -4889,6 +4939,8 @@ again:
4889 return err; 4939 return err;
4890 } 4940 }
4891 4941
4942 codec->proc_widget_hook = stac92hd7x_proc_hook;
4943
4892 return 0; 4944 return 0;
4893}; 4945};
4894 4946
@@ -5109,6 +5161,8 @@ static int patch_stac927x(struct hda_codec *codec)
5109 5161
5110 codec->patch_ops = stac92xx_patch_ops; 5162 codec->patch_ops = stac92xx_patch_ops;
5111 5163
5164 codec->proc_widget_hook = stac927x_proc_hook;
5165
5112 /* 5166 /*
5113 * !!FIXME!! 5167 * !!FIXME!!
5114 * The STAC927x seem to require fairly long delays for certain 5168 * The STAC927x seem to require fairly long delays for certain
@@ -5224,6 +5278,8 @@ static int patch_stac9205(struct hda_codec *codec)
5224 5278
5225 codec->patch_ops = stac92xx_patch_ops; 5279 codec->patch_ops = stac92xx_patch_ops;
5226 5280
5281 codec->proc_widget_hook = stac9205_proc_hook;
5282
5227 return 0; 5283 return 0;
5228} 5284}
5229 5285