All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Felix Homann <fexpop@web.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: How to create an Alsa mixer for a USB device w/o mixer descriptor?
Date: Wed, 17 Mar 2010 12:28:04 +0100	[thread overview]
Message-ID: <20100317112804.GB30801@buzzloop.caiaq.de> (raw)
In-Reply-To: <4BA094B9.8010907@web.de>

On Wed, Mar 17, 2010 at 09:37:13AM +0100, Felix Homann wrote:
> as posted earlier, I've got a USB device (Fast Track Ultra 8R) wich 
> *has* a mixer unit but doesn't have a descriptor for it. It's operated 
> by standard control messages. Although I'm specifically interested in 
> my  device, I guess there are many more USB interfaces out there with 
> similar issues.

Does that mean it doesn't export _any_ descriptors for that? Or just not
output terminal?

> So in general:
> What's the best way to build a Alsa mixer for such devices. Should one 
> bypass all the descriptor parsing and build a mixer specifically for the 
> device in interest? Or should one think about  passing a "fake" 
> descriptor to the mixer build process?

Check out the latest USB audio sources from the ALSA git - they have
been undergoing a major refactoring lately.

Thinking about what you're trying to achieve, I think at least one way
to go is to implement a new function ('handle_audio_mixer_unit_quirks'
for example) in sound/usb/mixer_quirks.c and call it from
snd_usb_create_mixer(). The function would need to return a static fake
descriptor, hard-coded in mixer_quirks.c. Now that the driver works with
structs for descriptors, that shouldn't be hard to do.

One thing to pay attention to is that this fake descriptor must not have
any references to other entities or descriptors of the device unless you
take care for them, too. In particular, you would need to add a hook to
snd_usb_copy_string_descriptor() if you want to give your controls a
name.

Hope that helps,
Daniel

  reply	other threads:[~2010-03-17 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17  8:37 How to create an Alsa mixer for a USB device w/o mixer descriptor? Felix Homann
2010-03-17 11:28 ` Daniel Mack [this message]
2010-03-17 11:47   ` Felix Homann
2010-03-17 16:11     ` Daniel Mack

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=20100317112804.GB30801@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=fexpop@web.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 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.