From: Raymond Yau <superquad.vortex2@gmail.com>
To: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
Takashi Iwai <tiwai@suse.de>
Subject: Re: Via VT2020: issues with kernel 2.6.38.{2, 3} (alsa 1.0.23) - working with 2.6.33.2 (alsa 1.0.21)
Date: Sat, 18 Jun 2011 16:29:20 +0800 [thread overview]
Message-ID: <BANLkTimgZTT_0sEiSHmOMrTGdKA-hx-HBA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimJb-UMD5Nk3d+_GW-b9Cir13PjMw@mail.gmail.com>
2011/6/8 alex dot baldacchino dot alsasub at gmail dot com
<alex.baldacchino.alsasub@gmail.com>:
>
>
> Adding a few printk()'s to file "patch_via.c" showed me function
> via_hp_build() is called before via_build_pcms() (unless front panel
> is disabled in BIOS, in which case via_hp_build() isn't invoked at
> all), therefore, when a control "Independent HP" is created, it should
> be 'visible' by via_build_pcms(); however,
> snd_hda_find_mixer_ctl(codec, "Independent HP") fails to find it until
> the following loop is executed inside via_build_controls:
>
> and via_build_controls() is called after via_build_pcms(), but then
> it's too late (or seemed to be such) to modify the number of playback
> substreams. At last, I've tried the following, which worked:
>
The fix is to check spec->multiout.hp_nid since "Independent HP" need
the extra DAC for HP when there is no HP if front panel is disabled by
BIOS
static int via_build_pcms(struct hda_codec *codec)
{
...
info->name = spec->stream_name_analog;
info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
*(spec->stream_analog_playback);
info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid =
spec->multiout.dac_nids[0];
+ info->stream[SNDRV_PCM_STREAM_PLAYBACK].substreams =
+ spec->multiout.hp_nid ? 2 : 1;
info->stream[SNDRV_PCM_STREAM_CAPTURE] = *(spec->stream_analog_capture);
info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0];
info->stream[SNDRV_PCM_STREAM_PLAYBACK].channels_max =
spec->multiout.max_channels;
However there is a bug in using subdevice 1 for "Independent HP" and
subdevice 0 for multi-channels
The channel count reported by snd_pcm_hw_params_get_channels_max() or
snd_pcm_hw_params_test_channel() for subdevice 1 is also equal to
spec->multiout.max_channels but this subdevice 1 only support stereo
next prev parent reply other threads:[~2011-06-18 8:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-07 17:30 Via VT2020: issues with kernel 2.6.38.{2, 3} (alsa 1.0.23) - working with 2.6.33.2 (alsa 1.0.21) alex dot baldacchino dot alsasub at gmail dot com
2011-05-08 6:40 ` Raymond Yau
2011-05-08 23:16 ` alex dot baldacchino dot alsasub at gmail dot com
2011-05-10 2:03 ` Raymond Yau
2011-05-16 16:03 ` alex dot baldacchino dot alsasub at gmail dot com
2011-05-18 3:36 ` Raymond Yau
2011-05-27 14:49 ` alex dot baldacchino dot alsasub at gmail dot com
2011-05-31 13:34 ` Raymond Yau
2011-06-01 16:16 ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-07 8:32 ` Raymond Yau
2011-06-08 14:33 ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-09 16:08 ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-11 20:24 ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-19 1:46 ` Raymond Yau
2011-06-20 1:19 ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-20 7:13 ` Raymond Yau
2011-06-20 13:48 ` alex dot baldacchino dot alsasub at gmail dot com
2011-06-14 4:05 ` Raymond Yau
2011-06-18 8:29 ` Raymond Yau [this message]
2011-06-19 12:44 ` alex dot baldacchino dot alsasub at gmail dot com
-- strict thread matches above, loose matches on Subject: below --
2011-06-16 18:50 alex dot baldacchino dot alsasub at gmail dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTimgZTT_0sEiSHmOMrTGdKA-hx-HBA@mail.gmail.com \
--to=superquad.vortex2@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).