alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
To: patch@alsa-project.org
Cc: Adrian Knoth <adi@drcomp.erfurt.thur.de>, alsa-devel@alsa-project.org
Subject: [PATCH 4/4] hdspmixer: Initialize headphones out in presets
Date: Mon,  4 Apr 2011 14:34:30 +0200	[thread overview]
Message-ID: <1301920470-4615-5-git-send-email-adi@drcomp.erfurt.thur.de> (raw)
In-Reply-To: <1301920470-4615-1-git-send-email-adi@drcomp.erfurt.thur.de>

Cards like the multiface/digiface have additional headphones out. Those
were not initialized in the presets due to wrong loop boundaries:
maxdest represents the amount of physical stereo pairs, and chnls is
either equal or less, so the output fader array needs more iterations
than the playback section.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
---
 hdspmixer/src/HDSPMixerWindow.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hdspmixer/src/HDSPMixerWindow.cxx b/hdspmixer/src/HDSPMixerWindow.cxx
index 5a7dac0..75fbc4f 100644
--- a/hdspmixer/src/HDSPMixerWindow.cxx
+++ b/hdspmixer/src/HDSPMixerWindow.cxx
@@ -734,7 +734,7 @@ void HDSPMixerWindow::restoreDefaults(int card)
 
     for (int preset = 0; preset < 8; ++preset) {
 	for (int speed = 0; speed < num_modes; ++speed) {
-	    for (int i = 0; i < chnls[speed]; i+=2) {
+	    for (int i = 0; i < 2*maxdest[speed]; i+=2) {
     		for (int z = 0; z < maxdest[speed]; ++z) {
 		    /* Gain setup */
 		    if (cards[card]->type == H9632) {
-- 
1.7.4.1

  parent reply	other threads:[~2011-04-04 12:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-04 12:34 [PATCH 0/4] hdspmixer: rescue current mixer settings when switching cards Adrian Knoth
2011-04-04 12:34 ` [PATCH 1/4] hdspmixer: Add a 9th pseudo preset Adrian Knoth
2011-04-04 12:34 ` [PATCH 2/4] hdspmixer: Save preset before switching cards Adrian Knoth
2011-04-04 12:34 ` [PATCH 3/4] hdspmixer: Recall 1st preset on all cards, not just on the first Adrian Knoth
2011-04-04 12:34 ` Adrian Knoth [this message]
2011-04-06  6:28 ` [PATCH 0/4] hdspmixer: rescue current mixer settings when switching cards Takashi Iwai

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=1301920470-4615-5-git-send-email-adi@drcomp.erfurt.thur.de \
    --to=adi@drcomp.erfurt.thur.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=patch@alsa-project.org \
    /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).