alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/16] ALSA: VIA HDA - suggesting additional patch
@ 2011-03-21 19:37 Mark Goldstein
  0 siblings, 0 replies; only message in thread
From: Mark Goldstein @ 2011-03-21 19:37 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai, Lydia Wang

[-- Attachment #1: Type: text/plain, Size: 2174 bytes --]

Hello,

I do not want to hijack the thread, but since it looks like many
changes are going to be applied to VIA HDA, I'd like to ask you to
look into potential patch that fixed my problem with VIA VT1708S.

There was a long thread "Problem with VIA VT1708S and git versions of
alsa-driver" on this list. I'll give a brief summary:
I have ASUS P5QL/EPU motherboard with VIA VT1708S on-board audio.  My
distribution is openSUSE.
The sound worked satisfactory with alsa driver 1.0.23. The problem
occurred first in oS 11.1.
After one of the updates from git snapshot repo (end of September /
beginning of October 2010), the functionality of controls got messed
up: Line control did not work, Front Mic control actually changed the
volume of Line In. Front Mic itself did not work at all.

I tried to figure out what happened with the help of Raymond Yau, but
at some stage gave up and reverted to working driver 1.0.23.

Later this year I had to try git version again (because I've got new
USB device). Still the same problem. So I decided to compare
patch_via.c from 1.0.23 that worked and from git version (and now
1.0.24) that did not. It turned out that the cause of my problem was
in the patch (identified by Raimond)
http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff;h=f3268512c3a5dea587cfe875b8bca98d9e164cd9;hp=73413b120d5d6eb6c98451bbc19acf43e0e300ae

This patch introduced common function vt_auto_create_analog_input_ctls
and codec-specific functions passing the array pin_idxs to it.

The problem, as I understood it, is that
vt_auto_create_analog_input_ctls uses the same pin index in calls to
via_new_analog_input and snd_hda_add_imux_item, while in the old code
(1.0.23) for some codecs, including  VT1708S, VT1702 and VT1716S,
via_new_analog_input was called with pin index + 1.

I do not understand the details, so I just did straightforward patch
(attached here, based on the code of 1.0.24) to restore the old
behavior. In my case this patch resolved the problem and I have
working controls now.

Could you please check it? Maybe it should be done differently, but
the problem is real (at least for me) and needs a fix.

Regards,
-- 
Mark Goldstein

[-- Attachment #2: patch_via.c.diff --]
[-- Type: text/x-patch, Size: 1020 bytes --]

2414c2414
< 					    hda_nid_t pin_idxs[], int num_idxs)
---
> 					    hda_nid_t pin_idxs[], int num_idxs, int idx_offs)
2441c2441
< 		err = via_new_analog_input(spec, label, type_idx, idx, cap_nid);
---
> 		err = via_new_analog_input(spec, label, type_idx, idx + idx_offs, cap_nid);
2455c2455
< 						ARRAY_SIZE(pin_idxs));
---
> 						ARRAY_SIZE(pin_idxs), 0);
3028c3028
< 						ARRAY_SIZE(pin_idxs));
---
> 						ARRAY_SIZE(pin_idxs), 0);
3560c3560
< 						ARRAY_SIZE(pin_idxs));
---
> 						ARRAY_SIZE(pin_idxs), 0);
3998c3998
< 						ARRAY_SIZE(pin_idxs));
---
> 						ARRAY_SIZE(pin_idxs), 1);
4349c4349
< 						ARRAY_SIZE(pin_idxs));
---
> 						ARRAY_SIZE(pin_idxs), 1);
4736c4736
< 						ARRAY_SIZE(pin_idxs));
---
> 						ARRAY_SIZE(pin_idxs), 0);
5200c5200
< 						ARRAY_SIZE(pin_idxs));
---
> 						ARRAY_SIZE(pin_idxs), 1);
5513c5513
< 					       ARRAY_SIZE(pin_idxs));
---
> 					       ARRAY_SIZE(pin_idxs), 0);
5834c5834
< 					       ARRAY_SIZE(pin_idxs));
---
> 					       ARRAY_SIZE(pin_idxs), 0);

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-21 19:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-21 19:37 [PATCH 1/16] ALSA: VIA HDA - suggesting additional patch Mark Goldstein

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).