Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Joachim Foerster <mls.JOFT@gmx.de>
To: alsa-devel@alsa-project.org
Cc: Lorenz Kolb <lorenz.kolb@lkmail.de>
Subject: How to enforce 32bit access?
Date: Tue, 02 Oct 2007 17:34:07 +0200	[thread overview]
Message-ID: <1191339247.30745.23.camel@localhost> (raw)

Hi ALSA devs,

(based on a Xilinx ML403, PPC405, OPB bus)
I have a custom sound controller, which allows 32bit write accesses to
its IO memory, only. The controller supports S16_LE, S16_BE, U16_LE,
U16_BE with min. and max. 2 channels (stereo), only! => So a frame has
to be 32bits wide and one frame has to be written at one point of time
(= one 32bit bus access).

Now, playing a 16kHz, S16_LE, Mono .wav-file with aplay invokes the
conversion framework of the alsa-lib. The following line of code (of
pcm_plugin.h) is executed:

conv_xx12_xx12: as_u16(dst) = as_u16c(src);

This is a 16bit access and thus fails with a Bus error/Kernel Oops.

Therefore my question is:

In my driver for the controller, how do I tell ALSA, that it is only
allowed to write in 32bit quantities?
Is this possible at all?
Or do I have to use a special .asoundrc file?

Thanks,
 Joachim

PS: 16bit, signed/unsigned, LE/BE, stereo (!) .wav files can be played
without any problem.

             reply	other threads:[~2007-10-02 15:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-02 15:34 Joachim Foerster [this message]
2007-10-05 17:09 ` How to enforce 32bit access? Joachim Foerster
2007-10-09  9:08   ` Takashi Iwai
2007-10-10 13:19     ` Joachim Foerster
2007-10-10 13:22       ` Takashi Iwai
2007-10-10 15:40         ` Joachim Foerster
2007-10-11  8:50           ` Takashi Iwai
2007-10-11 13:30             ` Joachim Foerster
2007-10-11 19:29               ` Trent Piepho

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=1191339247.30745.23.camel@localhost \
    --to=mls.joft@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=lorenz.kolb@lkmail.de \
    /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