- 22 12月, 2020 1 次提交
-
-
由 Mike Oliphant 提交于
The BOSS GT-1 (USB ID 0582:01d6) requires implicit feedback like other similar BOSS devices. This patch adds this support. [ rearranged the table entry in the ID order -- tiwai ] Signed-off-by: NMike Oliphant <oliphant@nostatic.org> Link: https://lore.kernel.org/r/20201221215533.2511-1-oliphant@nostatic.orgSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 21 12月, 2020 1 次提交
-
-
由 Takashi Iwai 提交于
ASUS PRIME TRX40 PRO-S mobo with 0b05:1918 needs the same quirk alias for another ASUS mobo (0b05:1917) for the proper mixer mapping, etc. Add the corresponding entry. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210783 Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201221080159.24468-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 19 12月, 2020 1 次提交
-
-
由 Takashi Iwai 提交于
Some buggy firmware don't give the current sample rate but leaves zero. Handle this case more gracefully without warning but just skip the current rate verification from the next time. Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201218145858.2357-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 17 12月, 2020 1 次提交
-
-
由 Amadej Kastelic 提交于
Add VID to support native DSD reproduction on FiiO devices. Tested-by: NAmadej Kastelic <amadejkastelic7@gmail.com> Signed-off-by: NEmilio Moretti <emilio.moretti@gmail.com> Signed-off-by: NAmadej Kastelic <amadejkastelic7@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/X9j7wdXSr4XyK7Bd@ryzen.localdomainSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 14 12月, 2020 1 次提交
-
-
由 Takashi Iwai 提交于
syzbot spotted a potential out-of-bounds shift in the USB-audio format parser that receives the arbitrary shift value from the USB descriptor. Add a range check for avoiding the undefined behavior. Reported-by: syzbot+df7dc146ebdd6435eea3@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201209084552.17109-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 11 12月, 2020 2 次提交
-
-
由 Takashi Iwai 提交于
The current channel-map control implementation in USB-audio driver may lead to an error message like "control 3:0:0:Playback Channel Map:0: access overflow" when CONFIG_SND_CTL_VALIDATION is set. It's because the chmap get callback clears the whole array no matter which count is set, and rather the false-positive detection. This patch fixes the problem by clearing only the needed array range at usb_chmap_ctl_get(). Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201211130048.6358-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Steinberg UR22 (with USB ID 0499:1509) requires the implicit feedback for the proper playback, otherwise it causes occasional cracks. This patch adds the corresponding the quirk table entry with the recently added generic implicit fb support. Reported-and-tested-by: NKilian <meschi@posteo.de> Link: https://lore.kernel.org/r/20201209161835.13625-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 30 11月, 2020 1 次提交
-
-
由 Takashi Iwai 提交于
Yet another quirk for Pioneer DJ DDJ-SR2, which is quite similar like other DJ DDJ models but with slightly different EPs or channels. Reported-by: NGeraldo <geraldogabriel@gmail.com> Link: https://lore.kernel.org/r/20201130083714.10640-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 28 11月, 2020 1 次提交
-
-
由 Daniel Martin 提交于
This patch allows the Pioneer DJ DDJ-RR to be seen as a USB audio device under Linux and therefore usable in such applications as Mixxx. Tested Master Audio out, headphones (both output jacks) and microphone input. All work perfectly. Signed-off-by: NDaniel Martin <dmanlfc@gmail.com> Link: https://lore.kernel.org/r/20201128084035.2958-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 27 11月, 2020 1 次提交
-
-
由 Hector Martin 提交于
The level meter control returns 34 integers of info. This fixes: snd-usb-audio 3-1:1.0: control 2:0:0:Level Meter:0: access overflow Fixes: d2bb390a ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk") Cc: stable@vger.kernel.org Signed-off-by: NHector Martin <marcan@marcan.st> Link: https://lore.kernel.org/r/20201127132635.18947-1-marcan@marcan.stSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 23 11月, 2020 30 次提交
-
-
由 Dylan Robinson 提交于
Now that the usb audio driver correctly finds implicit feedback endpoints, the implicit feedback quirk for the MOTU M-Series is no longer required. This also removes some unnecessary vendor specific messages from the MOTU M-Series boot quirk. The removed vendor specific messages turned on vendor specific interrupts to the host every 32 samples. The only thing the boot quirk needs to do is wait for 2 seconds. Tested-by: NDylan Robinson <dylan_robinson@motu.com> Signed-off-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-42-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
A few other BOSS devices (BR-80, GT-100v2, Katana) seem requiring the same quirk as BOSS GT-001, i.e. no implicit feedback for playback but tying with capture. Add and correct the corresponding quirk table entries for them. Reported-and-tested-by: NKeith Milner <kamilner@superlative.org> Link: https://lore.kernel.org/r/20201123085347.19667-41-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
A new module option, implicit_fb, is added to specify the driver looking for the implicit feedback sync. This can be useful for a device that could be working better in the implicit feed back mode and user wants to test it quickly. When this works, we can add the quirk entry easily. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-40-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This patch extends the implicit feedback mode parser code to check the description more generically, so that the quirk entries can be added without the explicit EP and interface numbers. The search is done for the next and the previous interface of the given altset, and if both entries are ASYNC mode and the direction matches, it just takes as the sync endpoint. The generic parser is applicable only for the playback stream. As of now, only a few M-Audio devices have been converted to use this mode. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-39-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The code dealing with the implicit feedback mode grew recently, and it's becoming messy. As we receive more and more devices that need the similar handling, it's better to be processed through a table instead of the open code. This patch moves the code that is relevant with parsing the implicit feedback mode and some helpers into another file, implicit.c. The detection and the setup of the implicit feedback sync EPs are rewritten to use the ID/class matching table instead. There should be no functional changes. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-38-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The capture stream of BOSS GT-001 seems always requiring to be tied with the playback stream. OTOH, the playback stream of this device doesn't seem working in the implicit fb mode, per se, since the playback must be running before the capture stream. This patch tries to address the points above: - Avoid the implicit fb mode for the playback - Set up a fake sync EP for the capture stream with the hard-coded playback stream using the implicit fb mode Reported-by: NKeith Milner <kamilner@superlative.org> Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-37-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Now the sync endpoints have been parsed at the beginning and won't be changed dynamically, let's show them in the proc outputs for helping debugging. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-36-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Just for consistency, use unsigned char for iface and altsetting in allover places. Also rearrange the field positions of snd_usb_endpiont and tidy up with some comments. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-35-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Follow the inclusive terminology, just replace sync_master/sync_slave with sync_source/sync_sink. It's also a bit clearer from its meaning, too. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-34-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
There are multiple places in format.c performing the similar code for setting the rate_min, rate_max and rates fields. This patch unifies those in a helper function and calls it at the end of the parser phase so that all rate_table entries have been already determined. No functional changes, just a minor code refactoring. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-33-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
There are two places calculating the next packet size for the playback stream in the exactly same way. Provide the single helper for this purpose and use it from both places gracefully. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-32-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Some fields like interface and alt_idx in snd_usb_substream are mostly useless now as they can be referred via either cur_audiofmt or data_endpoint assigned to the substream. Drop those, and also assure the concurrency about the access of cur_audiofmt field. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-31-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Minor code refactoring to consolidate the URB deactivation code in endpoint.c. A slight behavior change is that the error handling in snd_usb_endpoint_start() leaves EP_FLAG_STOPPING now. This should be synced with the later PCM sync_stop callback. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-30-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The endpoint objects may be started/stopped concurrently by different substreams in the case of implicit feedback mode, while the current code handles the reference counter without any protection. This patch changes the refcount to atomic_t for avoiding the inconsistency. We need no reference_t here as the refcount goes only up to 2. Also the name "use_count" is renamed to "running" since this is about actually the running status, not the open refcount. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-29-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The audioformat is referred in many places but most of usages are read-only. Let's add const prefix in the possible places. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-28-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The implicit feedback mode uses a ring buffer for storing the received packet sizes from the feedback source, and the code has a slight flaw; when a playback stream stalls by some reason and the URBs aren't processed, the next_packet FIFO might become empty, but the driver can't distinguish whether it's empty or full because it's managed with read_poss and write_pos. This patch addresses those by changing the next_packet array management. Instead of keeping read and write positions, now the head position and the queued amount are kept. It's easier to understand about the emptiness. Also, the URB active flag is now cleared before calling queue_pending_output_urbs() for avoiding (theoretically) possible inconsistency. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-27-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This is an intensive surgery for the endpoint and stream management for achieving more robust and clean code. The goals of this patch are: - More clear endpoint resource changes - The interface altsetting control in a single place Below are brief description of the whole changes. First off, most of the endpoint operations are moved into endpoint.c, so that the snd_usb_endpoint object is only referred in other places. The endpoint object is acquired and released via the new functions snd_usb_endpoint_open() and snd_usb_endpoint_close() that are called at PCM hw_params and hw_free callbacks, respectively. Those are ref-counted and EPs can manage the multiple opens. The open callback receives the audioformat and hw_params arguments, and those are used for initializing the EP parameters; especially the endpoint, interface and altset numbers are read from there, as well as the PCM parameters like the format, rate and channels. Those are stored in snd_usb_endpoint object. If it's the secondary open, the function checks whether the given parameters are compatible with the already opened EP setup, too. The coupling with a sync EP (including an implicit feedback sync) is done by the sole snd_usb_endpoint_set_sync() call. The configuration of each endpoint is done in a single shot via snd_usb_endpoint_configure() call. This is the place where most of PCM configurations are done. A few flags and special handling in the snd_usb_substream are dropped along with this change. A significant difference wrt the configuration from the previous code is the order of USB host interface setups. Now the interface is always disabled at beginning and (re-)enabled at the last step of snd_usb_endpoint_configure(), in order to be compliant with the standard UAC2/3. For UAC1, the interface is set before the parameter setups since there seem devices that require it (e.g. Yamaha THR10), just like how it was done in the previous driver code. The start/stop are almost same as before, also single-shots. The URB callbacks need to be set via snd_usb_endpoint_set_callback() like the previous code at the trigger phase, too. Finally, the flag for the re-setup is set at the device suspend through the full EP list, instead of PCM trigger. This catches the overlooked cases where the PCM hasn't been running yet but the device needs the full setup after resume. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-26-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The function to evaluate the match of the parameters with an EP assumes only the discrete rate tables and doesn't handle the continuous rates properly. This patch fixes match_endpoint_audioformats() to handle the continuous rates. Also the almost useless debug prints there are dropped. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-25-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The commit 92adc96f ("ALSA: usb-audio: set the interface format after resume on Dell WD19") introduced the workaround for the broken setup after the resume specifically on a Dell dock model. However, the full setup should have been performed after the resume on all devices, as we can't guarantee the same state. So this patch removes the conditional check and applies the workaround always. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-24-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The prepare_data_urb and retire_data_urb fields of the endpoint object are set dynamically at PCM trigger start/stop. Those are evaluated in the endpoint handler, but there can be a race, especially if two different PCM substreams are handling the same endpoint for the implicit feedback case. Also, the data_subs field of the endpoint is set and accessed dynamically, too, which has the same risk. As a slight improvement for the concurrency, this patch introduces the function to set the callbacks and the data in a shot with the memory barrier. In the reader side, it's also fetched with the memory barrier. There is still a room of race if prepare and retire callbacks are set during executing the URB completion. But such an inconsistency may happen only for the implicit fb source, i.e. it's only about the capture stream. And luckily, the capture stream never sets the prepare callback, hence the problem doesn't happen practically. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-23-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
start_endpoints() may leave the data endpoint running if an error happens at starting the sync endpoint. We should stop both streams properly, instead. While we're at it, move the debug prints into the endpoint.c that is a more suitable place. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-22-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
A preliminary change for the later big changes. This is a minor code refactoring to drop the unnecessary arguments that can be retrieved in a different way. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-21-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
A preliminary change for the later big changes. This is a minor code refactoring to drop the unnecessary arguments that can be retrieved in a different way. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-20-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
A preliminary patch for the later big change. Just a minor code refactoring. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-19-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Setting the active altsetting at changing sample rate seems unrecommended. The host should deselect the altsetting at first before that, then select it again. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-18-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Add a helper function to retrieve the usb_host_interface object from the given interface and altsetting number pair, which is a commonly used procedure in the driver code. No functional changes, just minor code refactoring. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-17-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This behavior turned out to be invalid from the USB spec POV and shouldn't be applied. As it's an optional flag that is set only via an card control element that must be hardly used, let's drop it again. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-16-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Currently snd_usb_endpoint objects are created at first when the substream is opened and tries to assign the endpoints corresponding to the matching audioformat. But since basically the all endpoints have been already parsed and the information have been obtained, we may create the endpoint objects statically at the init phase. It's easier to manage for the implicit fb case, for example. This patch changes the endpoint object management and lets the parser to create the all endpoint objects. This change shouldn't bring any functional changes. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-15-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The implicit feedback mode initializes both the main data stream and the sync data stream. When a sync stream was already opened, this would result in the doubly initialization and might screw up things. Add the check of already opened sync streams and skip the unnecessary initialization. Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-14-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The file debug.h contains a simple macro for debug prints, and it's used only in two places, the format parser and the hw_params rules. The former actually should print a more informative message instead, so the only users are the hw_parmas rules. This patch moves the contents of debug.h into the hw_params rules local code and remove the unneeded includes. Also, the debug print in the format parser is replaced with the information print with more useful information, and the raw printk() call is replaced with pr_debug(). Tested-by: NKeith Milner <kamilner@superlative.org> Tested-by: NDylan Robinson <dylan_robinson@motu.com> Link: https://lore.kernel.org/r/20201123085347.19667-13-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
-