From: Takashi Iwai <tiwai@suse.de>
To: Marcel <shizuma@magma.ca>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Re: CMI8738-MC6 surround40 plugin on 4 SP systems]
Date: Tue, 04 Nov 2003 17:27:32 +0100 [thread overview]
Message-ID: <s5hekwot7yj.wl@alsa2.suse.de> (raw)
In-Reply-To: <20031031173918.GA29835@dailyplanet.net>
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
At Fri, 31 Oct 2003 12:39:18 -0500,
Marcel wrote:
>
> * Takashi Iwai (tiwai@suse.de) wrote:
> > At Thu, 30 Oct 2003 12:42:39 -0500,
> > Marcel wrote:
> > >
> > >
> > > I've been trying to finetune my cmipci for several weeks now. And this is
> > > the best way I've been able to get transparent operation with various audio
> > > material: stereo, mono, 4.0, 5.1. The main problem being no surround sound
> > > iif "Exchange DAC" setting was not set, and sound on the rear speakers only
> > > if it was.
> >
> > ah, this might be true.
> > does it happen both on 4.0 and 5.1 outputs?
> > i don't remember that it's necessary for 5.1 at the last time i
> > tested.
>
> With surround40 plugin, 4 speakers, yes it's needed for both 4.0 and 5.1
> material. Applications such as mplayer or xine will remix 5.1 material to
> 4 channels. For 6 speakers systems, I really don't know.
could you try surround51 and check whether it somehow works?
> > perhaps we should simply remove this control from user and handle
> > internally for the MC6 chip.
> >
>
> I agree. Its usage is confusing and may results in improper operation
how about the attached patch?
Takashi
[-- Attachment #2: cmipci-4ch-fix.dif --]
[-- Type: application/octet-stream, Size: 2089 bytes --]
Index: alsa-kernel/pci/cmipci.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/cmipci.c,v
retrieving revision 1.57
diff -u -r1.57 cmipci.c
--- alsa-kernel/pci/cmipci.c 28 Oct 2003 11:25:31 -0000 1.57
+++ alsa-kernel/pci/cmipci.c 4 Nov 2003 16:24:39 -0000
@@ -728,9 +728,11 @@
if (channels > 4) {
snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D);
snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C);
+ snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC);
} else {
snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C);
snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_CHB3D);
+ snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC);
}
if (channels == 6) {
snd_cmipci_set_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C);
@@ -749,6 +751,7 @@
snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C);
snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C);
snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_ENCENTER);
+ snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC);
spin_unlock_irqrestore(&cm->reg_lock, flags);
}
}
@@ -2671,11 +2674,14 @@
/* both for CM8338/8738 */
static snd_kcontrol_new_t snd_cmipci_mixer_switches[] __devinitdata = {
- DEFINE_MIXER_SWITCH("Exchange DAC", exchange_dac),
DEFINE_MIXER_SWITCH("Four Channel Mode", fourch),
DEFINE_MIXER_SWITCH("Line-In As Rear", line_rear),
};
+/* for non-multichannel chips */
+static snd_kcontrol_new_t snd_cmipci_nomulti_switch __devinitdata =
+DEFINE_MIXER_SWITCH("Exchange DAC", exchange_dac);
+
/* only for CM8738 */
static snd_kcontrol_new_t snd_cmipci_8738_mixer_switches[] __devinitdata = {
#if 0 /* controlled in pcm device */
@@ -2748,6 +2754,11 @@
sw = snd_cmipci_mixer_switches;
for (idx = 0; idx < num_controls(snd_cmipci_mixer_switches); idx++, sw++) {
err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm));
+ if (err < 0)
+ return err;
+ }
+ if (! cm->can_multi_ch) {
+ err = snd_ctl_add(cm->card, snd_ctl_new1(&snd_cmipci_nomulti_switch, cm));
if (err < 0)
return err;
}
next prev parent reply other threads:[~2003-11-04 16:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20031030174239.GB2771@dailyplanet.net>
2003-10-31 16:46 ` CMI8738-MC6 surround40 plugin on 4 SP systems] Takashi Iwai
2003-10-31 17:39 ` Marcel
2003-11-04 16:27 ` Takashi Iwai [this message]
2003-11-05 0:35 ` Marcel
2003-11-07 19:50 ` Takashi Iwai
[not found] <E1AIFvE-0005PH-00@sc8-sf-list2.sourceforge.net>
2003-11-08 0:19 ` Marcel
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=s5hekwot7yj.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=shizuma@magma.ca \
/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