All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simone Camporeale <simone.camporeale@gmail.com>
To: alsa-devel@alsa-project.org
Subject: [PATCH] Maya44+ Support in ALSA
Date: Sat, 16 Nov 2013 14:44:07 +0100	[thread overview]
Message-ID: <CAK+n=GUBR=bt_YLg0Gzg9xax93H0cgvO12Nwz7r=YmULnfqpSQ@mail.gmail.com> (raw)

I found some problems on Maya44+ USB support in linux.
Using ubuntu 13.04 , Ubuntu 13.10 with alsa driver alsa-driver-1.0.25+dfsg
i found that this card isn't supported.
Only 2 of 4 channels work and they are mixed .
This card mounts TI TUSB3200AC chip.
This chip is also used in Re Loop devices and in Herlcues DJ Console.
To fix this problem i found on google a patch for Reloop device. I chanaged
VID and PID for MAYA44+ and now it works .
This patch involves in edititing ./sound/usb/quirks-table.h according to
attached patch

Also i provide an .asoundrc. With this .asoundrc you are able to use each
input and output channel

maya44+ patch

--- a/sound/usb/quirks-table.h    2013-11-12 12:43:24.380251603 +0100
+++ b/sound/usb/quirks-table.h    2013-11-06 12:28:20.000000000 +0100
@@ -320,6 +320,93 @@
 #undef YAMAHA_DEVICE
 #undef YAMAHA_INTERFACE

+
+/* Reloop Play */
+{
+    USB_DEVICE(0x200c, 0x100b),
+    .bInterfaceClass = USB_CLASS_PER_INTERFACE,
+    .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_AUDIO_STANDARD_MIXER,
+            },
+            {
+                .ifnum = 1,
+                .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+                .data = &(const struct audioformat) {
+                    .formats = SNDRV_PCM_FMTBIT_S24_3LE,
+                    .channels = 4,
+                    .iface = 1,
+                    .altsetting = 1,
+                    .altset_idx = 1,
+                    .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
+                    .endpoint = 0x01,
+                    .ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE,
+                    .rates = SNDRV_PCM_RATE_44100 |
+                         SNDRV_PCM_RATE_48000,
+                    .rate_min = 44100,
+                    .rate_max = 48000,
+                    .nr_rates = 2,
+                    .rate_table = (unsigned int[]) {
+                        44100, 48000
+                    }
+                }
+            },
+            {
+                .ifnum = -1
+            }
+        }
+    }
+},
+
+/* Maya44 USB+ Play */
+{
+    USB_DEVICE(0x2573, 0x0008),
+    .bInterfaceClass = USB_CLASS_PER_INTERFACE,
+    .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_AUDIO_STANDARD_MIXER,
+            },
+            {
+                .ifnum = 1,
+                .type = QUIRK_AUDIO_FIXED_ENDPOINT,
+                .data = &(const struct audioformat) {
+                    .formats = SNDRV_PCM_FMTBIT_S24_3LE,
+                    .channels = 4,
+                    .iface = 1,
+                    .altsetting = 1,
+                    .altset_idx = 1,
+                    .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
+                    .endpoint = 0x01,
+                    .ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE,
+                    .rates = SNDRV_PCM_RATE_44100 |
+                         SNDRV_PCM_RATE_48000,
+                    .rate_min = 44100,
+                    .rate_max = 48000,
+                    .nr_rates = 2,
+                    .rate_table = (unsigned int[]) {
+                        44100, 48000
+                    }
+                }
+            },
+            {
+                .ifnum = -1
+            }
+        }
+    }
+},
+
+
+
+
+
 /*
  * Roland/RolandED/Edirol/BOSS devices
  */

.asoundrc example:

pcm.dshare {
    type dmix
    ipc_key 2048
    slave {
        pcm "hw:1"
        rate 44100
        period_time 0
        period_size 1024
        buffer_size 8192
        channels 4
    }
    bindings {
        0 0
        1 1
        2 2
        3 3
    }
}

pcm.dsnooped {
    type dsnoop
    ipc_key 2048
    slave {
        pcm "hw:1"
        rate 48000
    periods 0
        period_time 0
        period_size 1024
        buffer_size 4096
        channels 4
    }
}

pcm.mayaAin1 {
   type plug
   slave {
    pcm "dsnooped"
    channels 4
   }
   ttable.0.0 1
}
pcm.mayaAin2 {
   type plug
   slave {
    pcm "dsnooped"
    channels 4
   }
   ttable.0.1 1
}
pcm.mayaAin3 {
   type plug
   slave {
    pcm "dsnooped"
    channels 4
   }
   ttable.0.2 1
}
pcm.mayaAin4 {
   type plug
   slave {
    pcm "dsnooped"
    channels 4
   }
   ttable.0.3 1
}

pcm.mayaAout1 {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.0 1
}
pcm.mayaAout2 {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.1 1
}
pcm.mayaAout3 {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.2 1
}

pcm.mayaAout4 {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.3 1
}

             reply	other threads:[~2013-11-16 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-16 13:44 Simone Camporeale [this message]
2013-11-16 18:04 ` [PATCH] Maya44+ Support in ALSA Clemens Ladisch
2013-11-19 11:42   ` Simone Camporeale
2013-11-19 12:03     ` Clemens Ladisch
2013-11-20 11:05       ` Simone Camporeale

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='CAK+n=GUBR=bt_YLg0Gzg9xax93H0cgvO12Nwz7r=YmULnfqpSQ@mail.gmail.com' \
    --to=simone.camporeale@gmail.com \
    --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 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.