* Re: CMI8738-MC6 surround40 plugin on 4 SP systems]
[not found] <20031030174239.GB2771@dailyplanet.net>
@ 2003-10-31 16:46 ` Takashi Iwai
2003-10-31 17:39 ` Marcel
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2003-10-31 16:46 UTC (permalink / raw)
To: Marcel; +Cc: alsa-devel
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.
> I think the following patch should be considered. It puts the surround
> sound on the rear speakers, where it should be when using the plugin
> surround40, and on front speakers in normal stereo/mono mode. I've been
> testing it for several days now and it seems better than the original
> CMI8738-MC6.pcm.
looks fine. i'll add it.
perhaps we should simply remove this control from user and handle
internally for the MC6 chip.
thanks,
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CMI8738-MC6 surround40 plugin on 4 SP systems]
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
0 siblings, 1 reply; 5+ messages in thread
From: Marcel @ 2003-10-31 17:39 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
* 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.
> 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
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: CMI8738-MC6 surround40 plugin on 4 SP systems]
2003-10-31 17:39 ` Marcel
@ 2003-11-04 16:27 ` Takashi Iwai
2003-11-05 0:35 ` Marcel
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2003-11-04 16:27 UTC (permalink / raw)
To: Marcel; +Cc: alsa-devel
[-- 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;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: CMI8738-MC6 surround40 plugin on 4 SP systems]
2003-11-04 16:27 ` Takashi Iwai
@ 2003-11-05 0:35 ` Marcel
2003-11-07 19:50 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Marcel @ 2003-11-05 0:35 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
* Takashi Iwai (tiwai@suse.de) wrote:
> 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?
I tried. It's ok with stereo material. With 5.1 material, xine refuses to
use it because I have 4 speakers only. Mplayer will use it but 2 channels
only. Seems there is no way to force applications to use 6 channels when I
got only 4 speakers. "Mplayer -ao alsa9:surround51 -channels 6" gives an
error. And I don't have any 5.1 sound file in wav or mp3 format for aplay
or alsaplayer to try. Never been able to locate some. But I suspect it
will fail too. I think you'll need someone with 6 physical speakers to have
this verified.
>
> > > 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?
Great job! If I understand how it works, the mixer setting is gone for the
8738-MC[46] chipsets, and still there for plain 8[37]38. Works very well
here, no more confusion. Multi-channel sound is enabled automatically.
Front material is always in front, and surround material always in rear.
Adjustment is unconventional, but straightforward for surround material:
1 - Master at 0.
2 - Adjust rear volume with PCM near maximum required.
3 - Increase front volume with Master to obtain rear-front balance.
4 - Decrease PCM to lower volume on all 4 speakers.
Unusual, but that's the way its operates.
Don't forget to remove the following block in alsa/cards/CMI8738-MC6.conf if
you added it in the CVS, otherwise you'll get errors when using surround40
as "Exchange DAC" is no more:
# {
# name "Exchange DAC"
# lock true
# preserve true
# value true
# }
May I suggest adding this patch to the CVS?
One more control that deserves to go in mixer: "3D Control Switch". It
doesn't work, never did, does nothing at all.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: CMI8738-MC6 surround40 plugin on 4 SP systems]
2003-11-05 0:35 ` Marcel
@ 2003-11-07 19:50 ` Takashi Iwai
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2003-11-07 19:50 UTC (permalink / raw)
To: Marcel; +Cc: alsa-devel
At Tue, 4 Nov 2003 19:35:37 -0500,
Marcel wrote:
>
> * Takashi Iwai (tiwai@suse.de) wrote:
> > 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?
>
> I tried. It's ok with stereo material. With 5.1 material, xine refuses to
> use it because I have 4 speakers only. Mplayer will use it but 2 channels
> only. Seems there is no way to force applications to use 6 channels when I
> got only 4 speakers. "Mplayer -ao alsa9:surround51 -channels 6" gives an
> error. And I don't have any 5.1 sound file in wav or mp3 format for aplay
> or alsaplayer to try. Never been able to locate some. But I suspect it
> will fail too. I think you'll need someone with 6 physical speakers to have
> this verified.
>
> >
> > > > 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?
>
> Great job! If I understand how it works, the mixer setting is gone for the
> 8738-MC[46] chipsets, and still there for plain 8[37]38. Works very well
> here, no more confusion. Multi-channel sound is enabled automatically.
> Front material is always in front, and surround material always in rear.
>
> Adjustment is unconventional, but straightforward for surround material:
>
> 1 - Master at 0.
> 2 - Adjust rear volume with PCM near maximum required.
> 3 - Increase front volume with Master to obtain rear-front balance.
> 4 - Decrease PCM to lower volume on all 4 speakers.
>
> Unusual, but that's the way its operates.
hmm, it seems there is something wrong in the SB-style mixer code.
perhaps we need to put some delay.
anyway, the changes are now applied to cvs.
> One more control that deserves to go in mixer: "3D Control Switch". It
> doesn't work, never did, does nothing at all.
well, it works for the older model.
it's a 3D-enhancement and not really 3d thing.
i'm not sure whether this doesn't work for all new models (> 037), so
it still remains there. we can remove it later after confirming that
all new chips don't support this.
Takashi
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-11-07 19:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[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
2003-11-05 0:35 ` Marcel
2003-11-07 19:50 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.