* [PATCH 7/8] ALSA: VIA HDA: Get codec's type in via_new_spec() function
@ 2011-03-22 6:34 Lydia Wang
2011-03-22 6:45 ` rajeev
0 siblings, 1 reply; 2+ messages in thread
From: Lydia Wang @ 2011-03-22 6:34 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, HaraldWelte, lydiawang
From: Lydia Wang <lydiawang@viatech.com.cn>
Subject: ALSA: VIA HDA: Get codec's type in via_new_spec() function.
Add get_codec_type() in via_new_spec() function to make sure getting
correct codec type before building mixer controls.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
---
sound/pci/hda/patch_via.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -162,6 +162,7 @@
#endif
};
+static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec);
static struct via_spec * via_new_spec(struct hda_codec *codec)
{
struct via_spec *spec;
@@ -172,6 +173,10 @@
codec->spec = spec;
spec->codec = codec;
+ spec->codec_type = get_codec_type(codec);
+ /* VT1708BCE & VT1708S are almost same */
+ if (spec->codec_type == VT1708BCE)
+ spec->codec_type = VT1708S;
return spec;
}
@@ -1735,10 +1740,6 @@
for (i = 0; i < spec->num_iverbs; i++)
snd_hda_sequence_write(codec, spec->init_verbs[i]);
- spec->codec_type = get_codec_type(codec);
- if (spec->codec_type == VT1708BCE)
- spec->codec_type = VT1708S; /* VT1708BCE & VT1708S are almost
- same */
/* Lydia Add for EAPD enable */
if (!spec->dig_in_nid) { /* No Digital In connection */
if (spec->dig_in_pin) {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 7/8] ALSA: VIA HDA: Get codec's type in via_new_spec() function
2011-03-22 6:34 [PATCH 7/8] ALSA: VIA HDA: Get codec's type in via_new_spec() function Lydia Wang
@ 2011-03-22 6:45 ` rajeev
0 siblings, 0 replies; 2+ messages in thread
From: rajeev @ 2011-03-22 6:45 UTC (permalink / raw)
To: Lydia Wang
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
HaraldWelte@viatech.com
Lydia
On 3/22/2011 12:04 PM, Lydia Wang wrote:
> spec->codec_type·=·get_codec_type(codec);
> » /*·VT1708BCE·&·VT1708S·are·almost·same·*/
> » if·(spec->codec_type·==·VT1708BCE)
> » » spec->codec_type·=·VT1708S;
Why you need to do this.Are you doing any specific work related to VT1708S.
I think in call cases your codec_type is VT1708S.
Best Rgds
Rajeev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-22 6:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 6:34 [PATCH 7/8] ALSA: VIA HDA: Get codec's type in via_new_spec() function Lydia Wang
2011-03-22 6:45 ` rajeev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).