From: Ladislav Michl <ladis@psi.cz>
To: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>,
Ulf Karlsson <md1ulfc@mdstud.chalmers.se>
Subject: [PATCH] HAL2: fix LE stream playback
Date: Fri, 10 Jan 2003 21:43:13 +0100 [thread overview]
Message-ID: <20030110204313.GA712@kopretinka> (raw)
Hi,
several people complained about it on IRC, so here is a patch against
linux_2_4 branch. Please apply.
Side note: recording still doesn't work. while ago i tried to play with
PBUS configuration and found following (refer to hpc3.ps):
1) writing 0x08248844 (ie. 16bit DMA stream) into pbus_dmacfgs produces
noise at output.
2) writing 0x082c8844 (ie. 16bit with EVEN_HIGH bit set) make playback
two times faster.
3) writing 0x08248844 (ie. 8 bit stream) works as expected. That is
strange, because I still believe that HAL2 is 16bit device. I'd guess
that there are two bugs in driver which neutralizes each other.
In all cases DMA stream wasn't started for recording.
--- XXX/drivers/sound/hal2.c Mon Aug 5 19:40:50 2002
+++ linux/drivers/sound/hal2.c Fri Jan 10 21:06:27 2003
@@ -1,6 +1,6 @@
/*
* Driver for HAL2 sound processors
- * Copyright (c) 2001, 2002 Ladislav Michl <ladis@psi.cz>
+ * Copyright (c) 2001-2003 Ladislav Michl <ladis@linux-mips.org>
*
* Based on Ulf Carlsson's code.
*
@@ -394,7 +394,8 @@
fifobeg = 0; /* playback is first */
fifoend = (sample_size * 4) >> 3; /* doublewords */
pbus->ctrl = HPC3_PDMACTRL_RT | HPC3_PDMACTRL_LD |
- (highwater << 8) | (fifobeg << 16) | (fifoend << 24);
+ (highwater << 8) | (fifobeg << 16) | (fifoend << 24) |
+ (hal2->dac.format & AFMT_S16_LE ? HPC3_PDMACTRL_SEL : 0);
/* We disable everything before we do anything at all */
pbus->pbus->pbdma_ctrl = HPC3_PDMACTRL_LD;
hal2_i_clearbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECTX);
@@ -420,7 +421,8 @@
fifobeg = (4 * 4) >> 3; /* record is second */
fifoend = (4 * 4 + sample_size * 4) >> 3; /* doublewords */
pbus->ctrl = HPC3_PDMACTRL_RT | HPC3_PDMACTRL_RCV | HPC3_PDMACTRL_LD |
- (highwater << 8) | (fifobeg << 16) | (fifoend << 24);
+ (highwater << 8) | (fifobeg << 16) | (fifoend << 24) |
+ (hal2->adc.format & AFMT_S16_LE ? HPC3_PDMACTRL_SEL : 0);
pbus->pbus->pbdma_ctrl = HPC3_PDMACTRL_LD;
hal2_i_clearbit16(hal2, H2I_DMA_PORT_EN, H2I_DMA_PORT_EN_CODECR);
hal2_i_clearbit16(hal2, H2I_DMA_DRV, (1 << pbus->pbusnr));
reply other threads:[~2003-01-10 20:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030110204313.GA712@kopretinka \
--to=ladis@psi.cz \
--cc=linux-mips@linux-mips.org \
--cc=md1ulfc@mdstud.chalmers.se \
--cc=ralf@linux-mips.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