From: Gorka Olaizola <gorka@escomposlinux.org>
To: alsa-devel@alsa-project.org
Subject: Re: Channels jumping with snd_intel8x0, nforce2 and 5.1 output
Date: Thu, 8 Jan 2004 23:24:31 +0100 [thread overview]
Message-ID: <20040108222431.GA16232@helvete.escomposlinux.org> (raw)
In-Reply-To: <20040105175916.GA22830@helvete.escomposlinux.org>
[-- Attachment #1: Type: text/plain, Size: 2309 bytes --]
I think i've found something interesting.
I downloaded de nvaudio driver from Nvidia's site and read the source a bit.
I found this function:
void __start_dac(struct Nvaudio_state *state)
{
int i =0;
unsigned int i_glob_cnt = 0;
struct Nvaudio_card *card = state->card;
struct dmabuf *dmabuf = &state->dmabuffer;
if (dmabuf->count > 0 && state->ready && !state->enable &&
(state->trigger & PCM_ENABLE_OUTPUT)) {
----------------------------------------------------------------------
/* Reset the Global Cnt back to Stereo 16ch and set the format
This is needed to keep the 6 channel data in alignment ,
to start from Front Left always */
i_glob_cnt = inl(card->iobase + GLOB_CNT);
outl((i_glob_cnt & 0xcfffff),card->iobase + GLOB_CNT);
mdelay(50);
outl(i_glob_cnt,card->iobase + GLOB_CNT);
----------------------------------------------------------------------
/* Reset the leftover datainfo*/
for(i=0; i < 5 ; i++)
AnalogLeftovers[i] = 0;
AnalogLeftoverCount = 0;
state->enable = DAC_RUNNING;
/* Interrupt Enable, LVI Enable, DMA Enable*/
outb((0x10|0x04|0x01), state->card->iobase + PO_CR);
#ifdef NV_DEBUG_PLAY
printk("Starting DAC \n");
#endif
}
}
I translated the part that I thought interesting to the function
"snd_intel8x0_setup_multi_channels" in the file intel8x0.c of Alsa (Line
923)
I have added this to the function
case DEVICE_NFORCE:
cnt = igetdword(chip, ICHREG(GLOB_CNT));
cnt &= ~ICH_PCM_246_MASK;
if (chip->multi4 && channels == 4)
cnt |= ICH_PCM_4;
else if (chip->multi6 && channels == 6)
cnt |= ICH_PCM_6;
iputdword(chip, ICHREG(GLOB_CNT), (cnt & 0xcfffff));
mdelay(50);
iputdword(chip, ICHREG(GLOB_CNT), cnt);
break;
Now speaker_test works well for me and the sound is coming from the right
speaker all the time. But there are some problems.
With mplayer in oss emulation the sound is very choppy and with
alsa9:surround51 there are constant cracks and pops.
If I play a DVD with xine with alsa:surround51 the sound seems correct and I
don't hear cracks. Maybe mplayer has some problems with alsa 1.0.x
I hope it's useful.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-01-08 22:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-04 17:55 Channels jumping with snd_intel8x0, nforce2 and 5.1 output Gorka Olaizola
2004-01-05 14:27 ` Takashi Iwai
2004-01-05 17:59 ` Gorka Olaizola
2004-01-08 22:24 ` Gorka Olaizola [this message]
2004-01-12 17:08 ` Clemens Ladisch
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=20040108222431.GA16232@helvete.escomposlinux.org \
--to=gorka@escomposlinux.org \
--cc=alsa-devel@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 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.