alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jason Mancine <jason@mancine.net>
To: alsa-devel@alsa-project.org
Subject: Re: Zoom R16
Date: Mon, 10 Mar 2014 10:36:33 -0400	[thread overview]
Message-ID: <CAPrbH=tQ3H1wUnK2417ap5jHSSO=y7vkBcCXBJqWn2V9sqbGHQ@mail.gmail.com> (raw)
In-Reply-To: <CAPrbH=uHUhWMYiGcHKLwFYiWwGhahNqAWjio1RKECM_dUnNN6A@mail.gmail.com>

I am still working on trying to get the R16 to work for playback.   The
problem is that no matter what .formats setting I use, ALSA sets the R16 to
32 bit LE (the R16 operates at 24 bit integer only).   This is fine for
capture as the R16 is sending a 24 bit stream into a 24-in-32 ALSA
capture... but for playback, the 32 bit ALSA stream chokes when it hits the
24 bit integer R16 device.

So, the main question is how do I force ALSA to initialize this device at
24 bit integer?

For the record, here is the quirk that I am working with (working for
capture, recognized for playback but crashes on data).   Thanks for any
suggestions.


{
        /* ZOOM R16 in USB 2.0 mode */
        USB_DEVICE(0x1686, 0x00dd),
        .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk)
{
                .ifnum = QUIRK_ANY_INTERFACE,
                .type = QUIRK_COMPOSITE,
                .data = (const struct snd_usb_audio_quirk[]) {

                        {
                                .ifnum = 0,
                                .type = QUIRK_IGNORE_INTERFACE
                        },

                       {
                                .ifnum = 1,  /*PLAYBACK*/
                                .type = QUIRK_AUDIO_FIXED_ENDPOINT,
                                .data = & (const struct audioformat) {
                                .formats = SNDRV_PCM_FMTBIT_S24_LE,
                                .channels = 2,
                                .iface = 0,
                                .altsetting = 1,
                                 altset_idx = 1,
                                .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
                                .endpoint = 0x03,
                                .ep_attr = 9,
                                .rates = SNDRV_PCM_RATE_44100 |
                                      SNDRV_PCM_RATE_48000 |
                                      SNDRV_PCM_RATE_88200 |
                                      SNDRV_PCM_RATE_96000,
                               .rate_min = 44100,
                               .rate_max = 96000,
                               .nr_rates = 4,
                               .rate_table = (unsigned int[]) {
                                44100, 48000, 88200, 96000
                                 }
                              }
                           },

                        {
                               .ifnum = 2,  /*CAPTURE*/
                              .type = QUIRK_AUDIO_FIXED_ENDPOINT,
                              .data = & (const struct audioformat) {
                                 .formats = SNDRV_PCM_FMTBIT_S24_LE,
                                 .channels = 8,
                                 .iface = 0,
                                 .altsetting = 1,
                                 .altset_idx = 1,
                                 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
                                  .endpoint = 0x84,
                                  .ep_attr = 13,
                                  .rates = SNDRV_PCM_RATE_44100 |
                                          SNDRV_PCM_RATE_48000 |
                                        SNDRV_PCM_RATE_88200 |
                                             SNDRV_PCM_RATE_96000,
                                .rate_min = 44100,
                                 .rate_max = 96000,
                                 .nr_rates = 4,
                                 .rate_table = (unsigned int[]) {
                                       44100, 48000, 88200, 96000
                                 }
                              }
                           },

                        {
                                .ifnum = 3,
                                .type = QUIRK_MIDI_STANDARD_INTERFACE
                        },


                        {
                                .ifnum = .1
                        },


                        }

        }

},





On Fri, Dec 6, 2013 at 12:28 PM, Jason Mancine <jason@mancine.net> wrote:

> With it set to 3LE format it fails on both capture and playback, and is
> still trying to initialize at 32 bits for both.
>
> Any other formats I could try?
>  On Dec 6, 2013 11:25 AM, "Takashi Iwai" <tiwai@suse.de> wrote:
>
>> At Fri, 6 Dec 2013 16:10:01 +0000 (UTC),
>> Jason Mancine wrote:
>> >
>> > It seems that ALSA is trying to initialize the device at 32-bit integer
>> > little endian despite having the .formats set to
>> SNDRV_PCM_FMTBIT_S24_LE in
>> > the quirk. The device is 24-bit integer only.  Other devices I have
>> > initialize properly at 24 bits.
>>
>> Do you mean the 24bit physical size, i.e. each frame is packed in 3
>> bytes?  If so, you used a wrong format.  SNDRV_PCM_FMTBIT_S24_LE is
>> for 24bit format packed in 32bit frame.  If you need a 3-bytes frame,
>> use SNDRV_PCM_FMTBIT_S24_3LE instead.
>>
>>
>> Takashi
>>
>

  reply	other threads:[~2014-03-10 14:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 18:12 Zoom R16 Jason Mancine
2013-11-22 20:31 ` Jason Mancine
2013-11-24 13:03 ` Daniel Mack
     [not found]   ` <CAPrbH=tGph7__rgx-5BsBSi9-E95FpsTL9Yy0zbum0TccTPbyQ@mail.gmail.com>
     [not found]     ` <20131124141803.GC23126@tamtam.fritz.box>
2013-11-26 18:22       ` Jason Mancine
2013-11-28 14:42         ` Jason Mancine
2013-11-28 14:50           ` Jason Mancine
2013-12-06 16:10             ` Jason Mancine
2013-12-06 16:25               ` Takashi Iwai
2013-12-06 17:28                 ` Jason Mancine
2014-03-10 14:36                   ` Jason Mancine [this message]
2014-03-10 20:28                     ` Alan Horstmann
2014-03-10 20:44                       ` Jason Mancine
2014-03-11  7:09                         ` Takashi Iwai
2014-03-11  7:59                           ` Jason Mancine
2014-03-11  8:13                             ` Takashi Iwai
2014-03-11 13:34                               ` Jason Mancine
2014-03-11 13:40                                 ` Takashi Iwai
2014-03-11 15:16                                   ` Jason Mancine
2014-03-11 15:32                                     ` Takashi Iwai

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='CAPrbH=tQ3H1wUnK2417ap5jHSSO=y7vkBcCXBJqWn2V9sqbGHQ@mail.gmail.com' \
    --to=jason@mancine.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).