All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Arnold <nick.arnold@nautronix.com.au>
To: alsa-devel@lists.sourceforge.net
Subject: HDSP 9652: Input channel corruption
Date: Thu, 9 Oct 2003 11:22:24 +0800	[thread overview]
Message-ID: <20031009112224.A6020@nautronix.com.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3915 bytes --]

Hello,

(I'm posting this again with smaller attachments since my first attempt was
over-sized and appears to be stuck in the moderator's in-tray.  Many
appologies if both posts appear -- the content is otherwise identical.)

I've posted previously about problems getting the 9652 up-and-working.  We
overcame the original difficulties but have recently observed another problem
of which we were previously unaware.  I'll detail our setup first then the
symptoms:

Our setup:
----------

A RME Hammerfall HDSP 9652 card on a SMP redhat 9 box.  ALSA 0.9.6 with
Thomas Charbonnel's hdsp driver patch applied.  12 input channels and three
output channels, running at 96KHz 24bit samples.  The output of "uname -a" on
the box says:

    Linux wombat 2.4.20-19.9smp #1 SMP Tue Jul 15 16:45:28 EDT 2003 i686
    athlon i386 GNU/Linux

The amixer settings we use:

     #!/bin/bash
     amixer -c 0 cset numid=11 0
     amixer -c 0 cset numid=13 0
     for i in $(seq 1 26);do
         amixer -c 0 cset name=Chn,index=$i 32768
     done

(ie. sync reference is an external word clock, the card should not use any
internal clock source; and output channels should be turned on.)

I've also attached the contents of /proc/asound/card0/hdsp as hdsp.txt.

The symptoms:
------------

We connect a sine wave to the first 12 channels and record them, and see
three channels -- 0, 4, and 8 -- are "corrupted".  The remaining channels
appear to be well-formed and look as we expect them to.

We tried swapping the card with another identical card and the problem
remained.  We then tried swapping the HDSP 9652 with one of the older DIGI
9652 cards (and re-configuring ALSA) and the problem went-away.  This
indicates a problem with the HDSP 9652 or its driver (and absolves the
cables, AD/DA, and our recording software).

I've attached a plot of channel zero (corrupted) against channel one
(uncorrupted) as data.jpg.  We've determined that the samples on channel zero
are incorrectly ordered.  We've also found a formula that can reorder channel
zero to closely follow the samples of channel one, modulo an expected
difference in gain.

More specifically, it appears as though the following is occuring for (the
96KHz) channel zero:

    48kHz channel 0 samples:    0 2 4 6 ...
    48kHz channel 2 samples:    1 3 5 7 ...

    expected 96KHz channel :    0 1 2 3 4 5 6 7 ...
    observed 96KHz channel :    1 0 3 2 5 4 7 6 ...

(and we presume the same is happening for channels 4 and 8 also.)

It seems most likely to be some code in the driver, or perhaps the mixer is
responsible for this incorrect ordering.

The questions are:

    - could this be a bug, perhaps in the hdsp driver?

    - alternatively, could this be due to some mixer setting that has been
      turned on by default unbeknownst to us?  if so, how can we turn this
      off?

any help much appreciated,

nick.
--
This email is confidential and intended solely for the use of the individual to whom it is addressed.  Any views or opinions presented are solely those of the author and do not necessarily represent those of Nautronix Ltd.

If you are not the intended recipient, you have received this email in error and use, dissemination, forwarding, printing, or copying of this email is strictly prohibited.  If you have received this email in error please contact the sender.

Although our computer systems use active virus protection software, and we take various measures to reduce the risk of viruses being transmitted in e-mail messages and attachments sent from this company, we cannot guarantee that such
e-mail messages and attachments are free from viruses on receipt.  It is a condition of our using e-mail to correspond with you, that any and all liability on our part arising directly or indirectly out of any virus is excluded.
Please ensure that you run virus checking software on all e-mail messages and attachments before reading them.

[-- Attachment #2: hdsp.txt --]
[-- Type: text/plain, Size: 943 bytes --]

RME Hammerfall HDSP 9652 (Card #1)
Buffers: capture f6e00000 playback f6a00000
IRQ: 18 Registers bus: 0xe3000000 VM: 0xf8a07000
Control register: 0x100a0ef
Control2 register: 0x800
Status register: 0x747cf0e
Status2 register: 0xffff8479
FIFO status: 0
MIDI1 Output status: 0xffffff00
MIDI1 Input status: 0xffffff00
MIDI2 Output status: 0xffffff00
MIDI2 Input status: 0xffffff00

Buffer Size (Latency): 8192 samples (2 periods of 32768 bytes)
Hardware pointer (frames): 8192
Passthru: no
Line out: on
Firmware version: 1

Sample Clock Source: AutoSync
Preferred Sync Reference: Word Clock
AutoSync Reference: Word Clock
AutoSync Frequency: 48000
System Clock Mode: Slave
System Clock Frequency: 48000

IEC958 input: Internal
IEC958 output: Coaxial only
IEC958 quality: Consumer
IEC958 emphasis: off
IEC958 NonAudio: off
IEC958 sample rate: Error flag set

ADAT1: Sync
ADAT2: Sync
ADAT3: Sync
SPDIF: No Lock
Word Clock: Sync
ADAT Sync: No Lock


[-- Attachment #3: data.jpg --]
[-- Type: image/jpeg, Size: 36626 bytes --]

             reply	other threads:[~2003-10-09  3:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-09  3:22 Nick Arnold [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-09  3:12 HDSP 9652: Input channel corruption Nick Arnold
2003-10-09  4:07 ` Mark Knecht
2003-10-10  8:55   ` Nick Arnold
2003-10-10 19:34     ` Mark Knecht
2003-10-15 22:01       ` alsa-devel
2003-10-16  0:18         ` Paul Davis
     [not found]       ` <20031020164753.A16168@nautronix.com.au>
2003-10-21  0:39         ` Mark Knecht
2003-10-11  0:23     ` Mark Knecht

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=20031009112224.A6020@nautronix.com.au \
    --to=nick.arnold@nautronix.com.au \
    --cc=alsa-devel@lists.sourceforge.net \
    /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.