From: Daniel Mack <zonque@gmail.com>
To: Louis Gorenfeld <louis@museresearch.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] UAC2 clock selector - fixed?
Date: Sun, 03 Feb 2013 16:31:25 +0100 [thread overview]
Message-ID: <510E82CD.1010105@gmail.com> (raw)
In-Reply-To: <3388A7F4-A801-4013-8A4A-66E52AA70947@museresearch.com>
On 03.01.2013 02:01, Louis Gorenfeld wrote:
> Hi,
> I'd been struggling with a UAC2 device that I couldn't set the clock on. I finally got in touch with a driver author who pointed me to some official documentation (the USB Device Class Definition for Audio Devices). Where the ALSA code always sends a 16-bit packet to control mixer settings, the docs say that the clock selector control uses layout 1 which is 8-bit. By changing the routine to send an 8-bit packet, that control now works.
>
> This is the patch that fixes the problem for me (for ALSA 1.0.25). Is this proper?
Sorry for the late reply!
> --- a/linux-3.4/sound/usb/mixer.c 2012-05-20 15:29:13.000000000 -0700
> +++ b/vanilla-3.4/sound/usb/mixer.c 2013-01-02 17:06:11.009660059 -0800
> @@ -422,8 +422,13 @@
> if (cval->mixer->protocol == UAC_VERSION_1) {
> val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1;
> } else { /* UAC_VERSION_2 */
> - /* audio class v2 controls are always 2 bytes in size */
> - val_len = sizeof(__u16);
> + /* audio class v2 controls are often but not always 2 bytes in size */
> + /* For example, the clock selector (see 5.2.5.2.1 in the Universal Serial
> + * Bus Device Class Definition for Audio Devices document) */
> + if (cval->control == UAC2_CX_CLOCK_SELECTOR)
> + val_len = sizeof(__u8);
> + else
> + val_len = sizeof(__u16);
This seems about right. Please provide a proper patch with your
Signed-off-by line (see Documentantation/SubmittingPatches for details).
You can add my Acked-by: right away when posting.
Thanks a lot,
Daniel
prev parent reply other threads:[~2013-02-03 15:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 1:01 [PATCH] UAC2 clock selector - fixed? Louis Gorenfeld
2013-02-03 15:31 ` Daniel Mack [this message]
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=510E82CD.1010105@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=louis@museresearch.com \
/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.