Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alex dot baldacchino dot alsasub at gmail dot com
	<alex.baldacchino.alsasub@gmail.com>
Cc: Raymond Yau <superquad.vortex2@gmail.com>,
	phoenix.diablo@gmail.com, alsa-devel@alsa-project.org,
	haraldwelte@viatech.com, lydiawang <lydiawang@viatech.com.cn>
Subject: Re: Major reworks on patch_via.c (TESTERS WANTED)
Date: Fri, 15 Jul 2011 08:03:19 +0200	[thread overview]
Message-ID: <s5hoc0w5bdk.wl%tiwai@suse.de> (raw)
In-Reply-To: <CAPzVey=Mwoecr1y4iw2wg4GLDaD09Aiy5Z3-_UHgmsNp=Cf6Xw@mail.gmail.com>

At Wed, 6 Jul 2011 02:58:09 +0200,
alex dot baldacchino dot alsasub at gmail dot com wrote:
> 
> 2011/7/5 Takashi Iwai <tiwai@suse.de>:
> > At Mon, 4 Jul 2011 21:37:46 +0200,
> > Jan Binder wrote:
> >>
> >> Am Mittwoch, 22. Juni 2011, 16:28:36 schrieb Takashi Iwai:
> >> > At Mon, 20 Jun 2011 17:06:51 +0200,
> >> >
> >> > Takashi Iwai wrote:
> >> > > Hi,
> >> > >
> >> > > as there have many problems reported for VIA codecs, I started looking
> >> > > at the driver code, and decided to rework on it.
> >> > > [snip]
> >> * Independent HP worked, when I could turn it on in alsamixer and correctly
> >> produced sound with aplay -Dhw:0,2,0 . I could not always reliably enable
> >> Independent HP in alsamixer, sometimes it would not change status ans aplay
> >> claimed that hw:0,2,0 was busy.
> >
> > This is intentional.  The switching is racy, so it can't be changed
> > safely when the multi-channel PCM is opened/used.
> >
> 
> Is it alway racy or only for those codecs sharing the same DAC between
> hp and side channel and/or requiring same stream as front to be set up
> for hp nid as well (e.g. not being connected to the front dac in any
> manner, if there is any such a via codec)?

Right, it's because of shared DAC.  If an individual DAC is available,
the driver won't block.

> In old implementation via_independent_hp_put() explicitly cleaned up
> any ongoing stream for hp dac and updated side mute status; in my case
> (vt2020) I didn't noticed errors or problems turning independent mode
> on/off several times while playing - I might have been just lucky and
> never met races, or just my codec isn't one of the above cases
> (indeed, there's no dac shared by hp and side, and my hp pin can be
> connected directly to front dac and gets also input by the stereo
> mixer being connected to front dac; actually, I haven't been able to
> find any info about via codecs with hp pin not being connected to
> front dac one way or another, so I don't follow why setting up same
> stream as front for hp dac, when in redirected mode).
> 
> By the way, I can think of at least one use case where switching hp
> mode while playing could be useful/desirable: it might not be
> extremely frequent, but it might happen that somebody ask you to set a
> lower volume or to make no 'noise' at all, for a number of reasons,
> and one might choose to plug a headset in his/her case front audio
> panel, switch to redirected mode and turn off external speakers. With
> actual implementation, such would require to stop the playback
> completely (so that via_playback_multi_pcm_close() is called and
> spec->num_active_streams is decremented), to change mode, then to
> restart that playback: this could be annoying. Perhaps, such a
> scenario could be taken into account.

Yes, the dynamic DAC stream change is also in my TODO list.
I haven't implemented it yet because it needs some testing with real
machines.  But, judging from your experiences, it seems OK to do that.

Maybe I'll try to hack in the next week, but feel free to add by
yourself before me (and send a patch).


thanks,

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

      reply	other threads:[~2011-07-15  6:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 15:06 Major reworks on patch_via.c (TESTERS WANTED) Takashi Iwai
2011-06-20 15:16 ` Takashi Iwai
2011-06-21 10:01 ` David Henningsson
2011-06-21 11:01   ` Takashi Iwai
2011-06-21 11:38     ` David Henningsson
2011-06-21 12:28       ` Takashi Iwai
2011-06-22  8:02 ` Jan Binder
2011-06-22  8:52   ` Takashi Iwai
2011-06-22 14:28 ` Takashi Iwai
2011-07-02 16:00   ` alex dot baldacchino dot alsasub at gmail dot com
2011-07-04 12:55     ` Takashi Iwai
2011-07-04 14:02       ` Takashi Iwai
2011-07-06  0:55         ` alex dot baldacchino dot alsasub at gmail dot com
2011-07-06  0:49       ` alex dot baldacchino dot alsasub at gmail dot com
2011-07-04 19:37   ` Jan Binder
2011-07-05  5:25     ` Takashi Iwai
2011-07-05  9:20       ` Raymond Yau
2011-07-06  0:58       ` alex dot baldacchino dot alsasub at gmail dot com
2011-07-15  6:03         ` Takashi Iwai [this message]

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=s5hoc0w5bdk.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alex.baldacchino.alsasub@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=haraldwelte@viatech.com \
    --cc=lydiawang@viatech.com.cn \
    --cc=phoenix.diablo@gmail.com \
    --cc=superquad.vortex2@gmail.com \
    /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