Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, charles.eidsness@ieee.org
Subject: Re: S24_LE Mode for USB Driver
Date: Wed, 13 Aug 2008 13:17:44 +0200	[thread overview]
Message-ID: <48A2C2D8.4040401@ladisch.de> (raw)
In-Reply-To: <s5htzdpi62s.wl%tiwai@suse.de>

Takashi Iwai wrote:
> Charles Eidsness wrote:
> > It looks like the parse_audio_format_i_type function at line 2369 of usbaudio.c
> > (linux v2.6.23) doesn't support the case where  bSubframeSize (fmt[5]) = 4 bytes
> > and  bBitResolution (fmt[6]) = 24 bits, which should correspond to a S24_LE (or
> > BE) type. I'm developing a new USD DAC which supports this mode (24-bit sample
> > in a 4 byte package). Right now Linux sends me S32_LE formated data, which is
> > wrong. Would it be possible to expand this function to support S24_LE/BE? It
> > would only require adding a few lines of code.
>
> Yes, it's possible, of course.
>
> BTW, is this behavior strictly defined?  I fail to find in the
> usb-audio spec that bBitResolution specifies the lower bits, not the
> higher bits...

The spec assumes that 24-bit samples use S24_3LE.  24-bit samples in
32-bit words are an extension that must be handled with some device-
specific code (like with the UA-1000).

(The audio 2.0 spec allows 32-bit words, and the wording seems to imply
that samples are aligned to the most significant bit, i.e., that S32_LE
would be used in this case.)


Regards,
Clemens

  reply	other threads:[~2008-08-13 11:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 20:25 S24_LE Mode for USB Driver Charles Eidsness
2008-08-13 10:04 ` Takashi Iwai
2008-08-13 11:17   ` Clemens Ladisch [this message]
2008-08-13 12:27     ` Takashi Iwai
2008-08-13 12:39       ` Charles Eidsness
2008-08-13 12:55         ` Takashi Iwai
2008-08-13 14:15           ` Charles Eidsness

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=48A2C2D8.4040401@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=charles.eidsness@ieee.org \
    --cc=tiwai@suse.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