From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757346AbbAIK0Q (ORCPT ); Fri, 9 Jan 2015 05:26:16 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59728 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751726AbbAIK0M (ORCPT ); Fri, 9 Jan 2015 05:26:12 -0500 Date: Fri, 09 Jan 2015 11:26:11 +0100 Message-ID: From: Takashi Iwai To: Clemens Ladisch Cc: Paul Bonser , Jaroslav Kysela , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [alsa-devel] [PATCH v2] ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller In-Reply-To: <54AF95EA.90505@ladisch.de> References: <54AE16D8.6080302@gmail.com> <54AEFCFF.3060406@ladisch.de> <54AF24D6.6010701@gmail.com> <54AF95EA.90505@ladisch.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 09 Jan 2015 09:48:42 +0100, Clemens Ladisch wrote: > > Paul Bonser wrote: > > On 01/08/2015 03:56 PM, Clemens Ladisch wrote: > >> Paul Bonser wrote: > >>> The Akai MPC Element incorrectly reports its bInterfaceClass as 255, but > >>> otherwise implements the USB MIDI spec correctly. > >>> > >>> This adds a quirks-table.h entry which allows the device to be > >>> recognized as a standard USB MIDI device. > >>> > >>> +++ b/sound/usb/quirks-table.h > >>> +{ > >>> + /* Akai MPC Element */ > >>> + USB_DEVICE(0x09e8, 0x0021), > >>> + .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, > >>> + .type = QUIRK_MIDI_STANDARD_INTERFACE > >>> + }, > >>> + { > >>> + .ifnum = -1 > >>> + } > >>> + } > >>> + } > >>> +}, > >> > >> Why a composite quirk? Does a single quirk entry not work? > > > > A single quirk entry results in an error message in dmesg: > > "snd-usb-audio: probe of 3-2:1.0 failed with error -5" > > That message is normal for unhandled interfaces. It's still not good to show a message, so using QUIRK_IGNORE_INTERFACE is good enough as a workaround. So I applied it as is to for-next branch now. Though... > Does it actually prevent the device from working? ... it's still interesting why it needs a special handling. If we find out more and have a better fix, let's put on top of the current patch. thanks, Takashi