Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Zammit <damien.zammit@gmail.com>
To: Daniel Mack <daniel@zonque.org>
Cc: Clemens Ladisch <clemens@ladisch.de>,
	alsa-devel@alsa-project.org, Mark Hills <mark@xwax.org>
Subject: Re: [PATCH] ALSA: usb-audio - Capture and duplex support for Digidesign Mbox 1 sound card.
Date: Tue, 01 Apr 2014 13:41:29 +1100	[thread overview]
Message-ID: <533A2759.8070609@gmail.com> (raw)
In-Reply-To: <5339AA49.6060906@zonque.org>

On 01/04/14 04:47, Daniel Mack wrote:
> Yeah, now that you changed the code to handle an arbitrary amount of
> endpoints, you could as well change all user of
> QUIRK_AUDIO_FIXED_ENDPOINT over to the new one, and initialize .epmulti
> to 1. That should already work, right? (Though, I have to mention that
> I'm unhappy with the name of that variable :)).
Given Mark's concerns, I'm not sure this will work for devices which
share an interface with multiple endpoints where the endpoints have
different properties.  I think my code only works when the multiple
endpoints have the same properties apart from the endpoint #.

For example, the existing code which brings up a fixed interface assumes
that there is only one endpoint and refers to it via an index which is
usually hardcoded to 0.  So most of the quirk would be ignored as only
the data for the first mentioned endpoint would be used for certain
functions.
For example, functions such as get_endpoint(alts, 0) etc.  This is the
major stumbling block that Mark is referring to I think.  What are your
thoughts on this one Daniel?  Have you seen Mark's untested code?  It's
part of this thread and seems to address this problem.

> A const void* can hold any kind of struct, and you need to cast it back
> to your struct eventually anyway. Thinking about it again, I don't like
> the idea of an extra member in struct snd_usb_audio_quirk either. What
> would be nicer is to introduce something like this:
> 
> struct audioformats {
> 	unsigned int n_formats;
> 	const struct audioformat *format;
> };
Yes, this looks good, I can use this idea.

> Also, you can write the actual quirk handler so that it loops over the
> array entries, so you can re-use the code for both
> QUIRK_AUDIO_FIXED_MULTI_ENDPOINTS and QUIRK_AUDIO_FIXED_ENDPOINT.
> 
> Do you follow? :)
Yes, it makes sense.

  reply	other threads:[~2014-04-01  2:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-26 15:10 [PATCH] ALSA: usb-audio - Capture and duplex support for Digidesign Mbox 1 sound card Damien Zammit
2014-01-26 15:30 ` Damien Zammit
2014-01-26 16:52 ` Clemens Ladisch
2014-01-27  3:02   ` Damien Zammit
2014-03-01  7:40     ` Damien Zammit
2014-03-03 21:01     ` Daniel Mack
2014-03-29  5:01       ` Mark Hills
2014-03-29 12:27         ` [alsa-devel] " Damien Zammit
2014-03-29 22:57           ` Mark Hills
2014-03-30  3:21             ` Damien Zammit
2014-03-31 17:47               ` Daniel Mack
2014-04-01  2:41                 ` Damien Zammit [this message]
2014-03-29  5:35       ` Damien Zammit
2014-03-31 17:58         ` 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=533A2759.8070609@gmail.com \
    --to=damien.zammit@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=daniel@zonque.org \
    --cc=mark@xwax.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