Re: [alsa-devel] [PATCH 6/9] ALSA: usb: caiaq: use usb_fill_int_urb()

2018-06-22 Thread Takashi Iwai
On Thu, 21 Jun 2018 23:16:39 +0200, Sebastian Andrzej Siewior wrote: > > On 2018-06-21 22:19:32 [+0200], Daniel Mack wrote: > > On Tuesday, June 19, 2018 11:55 PM, Sebastian Andrzej Siewior wrote: > > > Using usb_fill_int_urb() helps to find code which initializes an > > > URB. A grep for members

Re: [PATCH 8/9] ALSA: usx2y: usbusx2yaudio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Wed, 20 Jun 2018 17:47:01 +0200, Sebastian Andrzej Siewior wrote: > > On 2018-06-20 17:38:44 [+0200], To Takashi Iwai wrote: > > okay, as you wish: > > I'm sorry, I compiled one patch and send the other. Here is the fixed > one. Well, you seem to have forgotten to

Re: [PATCH 8/9] ALSA: usx2y: usbusx2yaudio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Wed, 20 Jun 2018 16:39:22 +0200, Sebastian Andrzej Siewior wrote: > > On 2018-06-20 14:51:12 [+0200], Takashi Iwai wrote: > > On Tue, 19 Jun 2018 23:55:20 +0200, > > Sebastian Andrzej Siewior wrote: > > > -

Re: [PATCH 4/9 v2] ALSA: usb-audio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Wed, 20 Jun 2018 15:56:53 +0200, Takashi Iwai wrote: > > On Wed, 20 Jun 2018 15:52:49 +0200, > Sebastian Andrzej Siewior wrote: > > > > On 2018-06-20 15:21:49 [+0200], Takashi Iwai wrote: > > > > usb_fill_int_urb() ensures that syncinterval is within t

Re: [PATCH 4/9 v2] ALSA: usb-audio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
On Wed, 20 Jun 2018 15:52:49 +0200, Sebastian Andrzej Siewior wrote: > > On 2018-06-20 15:21:49 [+0200], Takashi Iwai wrote: > > > usb_fill_int_urb() ensures that syncinterval is within the allowed range > > > on HS/SS. The interval value seems to come from > >

Re: [PATCH 4/9 v2] ALSA: usb-audio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
rval + 1 works for FULL_SPEED as well, as (1 + 1) == (1 << 1). thanks, Takashi > Cc: Jaroslav Kysela > Cc: Takashi Iwai > Signed-off-by: Sebastian Andrzej Siewior > --- > v1…v2: description changes (spelling + usb_fill_int_urb() ensures >"syncinterval"

Re: ALSA: use irqsave() in URB completion + usb_fill_int_urb

2018-06-20 Thread Takashi Iwai
On Tue, 19 Jun 2018 23:55:12 +0200, Sebastian Andrzej Siewior wrote: > > This series is mostly about using _irqsave() primitives in the > completion callback in order to get rid of local_irq_save() in > __usb_hcd_giveback_urb(). While at it, I also tried to move drivers to > use

Re: [PATCH 8/9] ALSA: usx2y: usbusx2yaudio: use usb_fill_int_urb()

2018-06-20 Thread Takashi Iwai
ansfer_buffer" check has been removed because the > URB has been freshly allocated a few lines above so ->transfer_buffer > has to be NULL here. > The `dev' and `transfer_size' assignments have been moved from > usX2Y_urbs_start() to usX2Y_urbs_allocate() because they don't change

[PATCH] usb: audio-v2: Correct the comment for struct uac_clock_selector_descriptor

2018-04-06 Thread Takashi Iwai
The comment in UAC2 clock selector descriptor definition mentions the bAssocTerminal after baCSourceID[], but it doesn't exist in the actual definition. Let's correct it. Fixes: 5dd360ebd832 ("include/linux/usb/audio-v2.h: add more UAC2 details") Signed-off-by: Takashi Iwai <

Re: Mixer regression with usb soundcard

2017-12-18 Thread Takashi Iwai
On Tue, 19 Dec 2017 02:04:51 +0100, Mauro Santos wrote: > > On 18-12-2017 22:48, Takashi Iwai wrote: > > On Mon, 18 Dec 2017 22:56:07 +0100, > > Mauro Santos wrote: > >> > >> On 18-12-2017 19:30, Takashi Iwai wrote: > >>> On Mon, 18 D

Re: Mixer regression with usb soundcard

2017-12-18 Thread Takashi Iwai
On Mon, 18 Dec 2017 22:56:07 +0100, Mauro Santos wrote: > > On 18-12-2017 19:30, Takashi Iwai wrote: > > On Mon, 18 Dec 2017 20:10:44 +0100, > > Mauro Santos wrote: > >> > >> On 18-12-2017 17:50, Jaejoong Kim wrote: > >>> Mauro, > >>> &g

Re: Mixer regression with usb soundcard

2017-12-18 Thread Takashi Iwai
On Mon, 18 Dec 2017 20:10:44 +0100, Mauro Santos wrote: > > On 18-12-2017 17:50, Jaejoong Kim wrote: > > Mauro, > > > > Could you please try debug patch(I also attach the patch file)? > > With the attached patch I get the following when plugging in the usb dac > directly to a usb3 port: > [

Re: Mixer regression with usb soundcard

2017-12-18 Thread Takashi Iwai
On Mon, 18 Dec 2017 18:05:18 +0100, Mauro Santos wrote: > > On 18-12-2017 15:45, Takashi Iwai wrote: > > On Mon, 18 Dec 2017 16:30:13 +0100, > > Mauro Santos wrote: > >> > >> On 18-12-2017 13:53, Takashi Iwai wrote: > >>> On Mon,

Re: Mixer regression with usb soundcard

2017-12-18 Thread Takashi Iwai
On Mon, 18 Dec 2017 17:59:38 +0100, Jaejoong Kim wrote: > > AudioControl Interface Descriptor: > bLength 8 > bDescriptorType36 > bDescriptorSubtype 5 (SELECTOR_UNIT) > bUnitID11 > bNrInPins 2 >

Re: Mixer regression with usb soundcard

2017-12-18 Thread Takashi Iwai
On Mon, 18 Dec 2017 16:30:13 +0100, Mauro Santos wrote: > > On 18-12-2017 13:53, Takashi Iwai wrote: > > On Mon, 18 Dec 2017 14:44:44 +0100, > > Greg KH wrote: > >> > >> On Sun, Dec 17, 2017 at 06:56:05PM +, Mauro Santos wrote: > >>> I believ

Re: Mixer regression with usb soundcard

2017-12-18 Thread Takashi Iwai
On Mon, 18 Dec 2017 14:44:44 +0100, Greg KH wrote: > > On Sun, Dec 17, 2017 at 06:56:05PM +, Mauro Santos wrote: > > I believe this is the right place to report this problem, but if it > > isn't please point me in the right direction. > > Adding the developer of that patch, and the sound

Re: [PATCH v2 3/9] ALSA: caiaq: Add a sanity check for invalid EPs

2017-10-11 Thread Takashi Iwai
On Wed, 11 Oct 2017 16:49:10 +0200, Johan Hovold wrote: > > On Wed, Oct 11, 2017 at 04:40:36PM +0200, Takashi Iwai wrote: > > On Wed, 11 Oct 2017 16:20:31 +0200, > > Johan Hovold wrote: > > > > Unrelated to this patch, but this driver fails to kill the ep1_in

Re: [PATCH v2 4/9] ALSA: line6: Add a sanity check for invalid EPs

2017-10-11 Thread Takashi Iwai
On Wed, 11 Oct 2017 16:52:09 +0200, Johan Hovold wrote: > > On Wed, Oct 11, 2017 at 04:45:16PM +0200, Takashi Iwai wrote: > > On Wed, 11 Oct 2017 16:28:37 +0200, > > Johan Hovold wrote: > > > > > > On Wed, Oct 11, 2017 at 12:36:41PM +0200, Takashi Iwai

Re: [PATCH v2 9/9] ALSA: line6: Add yet more sanity checks for invalid EPs

2017-10-11 Thread Takashi Iwai
On Wed, 11 Oct 2017 16:39:52 +0200, Johan Hovold wrote: > > On Wed, Oct 11, 2017 at 12:36:46PM +0200, Takashi Iwai wrote: > > There are a few other places calling usb_submit_urb() with the URB > > composed from the fixed endpoint without validation. For avoiding the > >

Re: [PATCH v2 4/9] ALSA: line6: Add a sanity check for invalid EPs

2017-10-11 Thread Takashi Iwai
On Wed, 11 Oct 2017 16:28:37 +0200, Johan Hovold wrote: > > On Wed, Oct 11, 2017 at 12:36:41PM +0200, Takashi Iwai wrote: > > As syzkaller spotted, currently line6 drivers submit a URB with the > > fixed EP without checking whether it's actually available, which may > > re

Re: [PATCH v2 6/9] ALSA: usx2y: Add sanity checks for invalid EPs

2017-10-11 Thread Takashi Iwai
On Wed, 11 Oct 2017 16:33:37 +0200, Johan Hovold wrote: > > On Wed, Oct 11, 2017 at 12:36:43PM +0200, Takashi Iwai wrote: > > usx2y driver sets up URBs containing the fixed endpoints without > > validation. This may end up with an oops-like kernel warning

Re: [PATCH v2 3/9] ALSA: caiaq: Add a sanity check for invalid EPs

2017-10-11 Thread Takashi Iwai
On Wed, 11 Oct 2017 16:20:31 +0200, Johan Hovold wrote: > > On Wed, Oct 11, 2017 at 12:36:40PM +0200, Takashi Iwai wrote: > > As syzkaller spotted, currently caiaq driver submits a URB with the > > fixed EP without checking whether it's actually available, which may > > re

Re: [PATCH v2 1/9] usb: core: Add a helper function to check the validity of EP type in URB

2017-10-11 Thread Takashi Iwai
On Wed, 11 Oct 2017 16:14:55 +0200, Johan Hovold wrote: > > On Wed, Oct 11, 2017 at 12:36:38PM +0200, Takashi Iwai wrote: > > This patch adds a new helper function to perform a sanity check of the > > given URB to see whether it contains a valid endpoint. It's a light- > >

Re: [PATCH v2 0/9] sound: Add sanity checks for invalid EPs

2017-10-11 Thread Takashi Iwai
On Wed, 11 Oct 2017 15:03:29 +0200, Greg KH wrote: > > On Wed, Oct 11, 2017 at 12:36:37PM +0200, Takashi Iwai wrote: > > Hi, > > > > this is a revised patch set to cover the codes that may submit URBs > > containing invalid EPs without validation, which result

[PATCH v2 6/9] ALSA: usx2y: Add sanity checks for invalid EPs

2017-10-11 Thread Takashi Iwai
usx2y driver sets up URBs containing the fixed endpoints without validation. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the calls of the new sanity-check helper for URBs. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb

[PATCH v2 7/9] ALSA: hiface: Add sanity checks for invalid EPs

2017-10-11 Thread Takashi Iwai
hiface usb-audio driver sets up URBs containing the fixed endpoints without validation. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the calls of the new sanity-check helper for URBs. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sou

[PATCH v2 5/9] ALSA: usb-audio: Add sanity checks for invalid EPs

2017-10-11 Thread Takashi Iwai
are needed only for MIDI I/O as the other places have already some other checks. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/midi.c | 38 ++ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/sound/usb/midi.c b/sound/usb/midi.c

[PATCH v2 2/9] ALSA: bcd2000: Add a sanity check for invalid EPs

2017-10-11 Thread Takashi Iwai
initialization phase for avoiding the call with an invalid EP. Reported-by: Andrey Konovalov <andreyk...@google.com> Tested-by: Andrey Konovalov <andreyk...@google.com> Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/bcd2000/bcd2000.c | 7 +++ 1 file changed, 7 insertions(+)

[PATCH v2 4/9] ALSA: line6: Add a sanity check for invalid EPs

2017-10-11 Thread Takashi Iwai
check of validity of EPs at the device initialization phase for avoiding the call with an invalid EP. Reported-by: Andrey Konovalov <andreyk...@google.com> Tested-by: Andrey Konovalov <andreyk...@google.com> Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/line6/drive

[PATCH v2 9/9] ALSA: line6: Add yet more sanity checks for invalid EPs

2017-10-11 Thread Takashi Iwai
There are a few other places calling usb_submit_urb() with the URB composed from the fixed endpoint without validation. For avoiding the spurious kernel warnings, add the sanity checks to appropriate places. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/line6/driver.

[PATCH v2 1/9] usb: core: Add a helper function to check the validity of EP type in URB

2017-10-11 Thread Takashi Iwai
for a driver that doesn't parse the descriptor but fills the URB with the fixed endpoint (e.g. some quirks for non-compliant devices), this kind of check is preferable at the probe phase before actually submitting the urb. Tested-by: Andrey Konovalov <andreyk...@google.com> Signed-off-by: Takashi Iw

[PATCH v2 8/9] ALSA: caiaq: Add yet more sanity checks for invalid EPs

2017-10-11 Thread Takashi Iwai
A few other places in caiaq driver have the URB handling with the fixed endpoints without checking the validity, too. Add the sanity check with the new helper function at each appropriate place for avoiding the spurious kernel warnings due to invalid EPs. Signed-off-by: Takashi Iwai <

[PATCH v2 3/9] ALSA: caiaq: Add a sanity check for invalid EPs

2017-10-11 Thread Takashi Iwai
Konovalov <andreyk...@google.com> Tested-by: Andrey Konovalov <andreyk...@google.com> Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/caiaq/device.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c index 0fb6b1b7

Re: [PATCH 3/8] Documentation: fix input related doc refs

2017-10-10 Thread Takashi Iwai
On Tue, 10 Oct 2017 19:36:23 +0200, Tom Saeger wrote: > > Make `input` document refs valid including: > - joystick > - joystick-parport > > Signed-off-by: Tom Saeger <tom.sae...@oracle.com> For the sound part: Reviewed-by: Takashi Iwai <ti...@

Re: [PATCH 2/9] ALSA: bcd2000: Add a sanity check for invalid EPs

2017-10-10 Thread Takashi Iwai
On Tue, 10 Oct 2017 16:00:25 +0200, Andrey Konovalov wrote: > > On Tue, Oct 10, 2017 at 3:38 PM, Takashi Iwai <ti...@suse.de> wrote: > > As syzkaller spotted, currently bcd2000 driver submits a URB with the > > fixed EP without checking whether it's actually availab

Re: [PATCH 1/9] usb: core: Add a helper function to check the validity of EP type in URB

2017-10-10 Thread Takashi Iwai
On Tue, 10 Oct 2017 15:53:49 +0200, Greg KH wrote: > > On Tue, Oct 10, 2017 at 03:38:11PM +0200, Takashi Iwai wrote: > > This patch adds a new helper function to perform a sanity check of the > > given URB to see whether it contains a valid endpoint. It's a light- > >

[PATCH 0/9] sound: Add sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
similar cases. thanks, Takashi === Takashi Iwai (9): usb: core: Add a helper function to check the validity of EP type in URB ALSA: bcd2000: Add a sanity check for invalid EPs ALSA: caiaq: Add a sanity check for invalid EPs ALSA: line6: Add a sanity check for invalid EPs ALSA: usb

[PATCH 7/9] ALSA: hiface: Add sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
hiface usb-audio driver sets up URBs containing the fixed endpoints without validation. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the calls of the new sanity-check helper for URBs. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sou

[PATCH 5/9] ALSA: usb-audio: Add sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
are needed only for MIDI I/O as the other places have already some other checks. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/midi.c | 38 ++ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/sound/usb/midi.c b/sound/usb/midi.c

[PATCH 2/9] ALSA: bcd2000: Add a sanity check for invalid EPs

2017-10-10 Thread Takashi Iwai
initialization phase for avoiding the call with an invalid EP. Reported-by: Andrey Konovalov <andreyk...@google.com> Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/bcd2000/bcd2000.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sound/usb/bcd2000/bcd2000.c b/sound/usb/bcd20

[PATCH 9/9] ALSA: line6: Add yet more sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
There are a few other places calling usb_submit_urb() with the URB composed from the fixed endpoint without validation. For avoiding the spurious kernel warnings, add the sanity checks to appropriate places. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/line6/driver.

[PATCH 8/9] ALSA: caiaq: Add yet more sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
A few other places in caiaq driver have the URB handling with the fixed endpoints without checking the validity, too. Add the sanity check with the new helper function at each appropriate place for avoiding the spurious kernel warnings due to invalid EPs. Signed-off-by: Takashi Iwai <

[PATCH 6/9] ALSA: usx2y: Add sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
usx2y driver sets up URBs containing the fixed endpoints without validation. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the calls of the new sanity-check helper for URBs. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb

[PATCH 4/9] ALSA: line6: Add a sanity check for invalid EPs

2017-10-10 Thread Takashi Iwai
check of validity of EPs at the device initialization phase for avoiding the call with an invalid EP. Reported-by: Andrey Konovalov <andreyk...@google.com> Cc: <sta...@vger.kernel.org> Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/line6/driver.c | 7 +++ 1 file cha

[PATCH 3/9] ALSA: caiaq: Add a sanity check for invalid EPs

2017-10-10 Thread Takashi Iwai
Konovalov <andreyk...@google.com> Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/usb/caiaq/device.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c index 0fb6b1b79261..a29674bf96e5 100644 --- a/sound/usb/caiaq/device.c

[PATCH 1/9] usb: core: Add a helper function to check the validity of EP type in URB

2017-10-10 Thread Takashi Iwai
for a driver that doesn't parse the descriptor but fills the URB with the fixed endpoint (e.g. some quirks for non-compliant devices), this kind of check is preferable at the probe phase before actually submitting the urb. Signed-off-by: Takashi Iwai <ti...@suse.de> --- drivers/usb/core/urb.

Re: usb/sound/bcd2000: warning in bcd2000_init_device

2017-10-04 Thread Takashi Iwai
On Wed, 04 Oct 2017 14:03:25 +0200, Johan Hovold wrote: > > On Wed, Oct 04, 2017 at 12:41:55PM +0200, Takashi Iwai wrote: > > On Wed, 04 Oct 2017 12:23:11 +0200, > > Johan Hovold wrote: > > > > > > On Wed, Oct 04, 2017 at 12:04:06PM +0200, Takashi Iwai wrote:

Re: usb/sound/bcd2000: warning in bcd2000_init_device

2017-10-04 Thread Takashi Iwai
On Wed, 04 Oct 2017 12:23:11 +0200, Johan Hovold wrote: > > On Wed, Oct 04, 2017 at 12:04:06PM +0200, Takashi Iwai wrote: > > On Wed, 04 Oct 2017 11:24:42 +0200, Johan Hovold wrote: > > > On Wed, Oct 04, 2017 at 08:10:59AM +0200, Takashi Iwai wrote: > > > > >

Re: usb/sound/bcd2000: warning in bcd2000_init_device

2017-10-04 Thread Takashi Iwai
On Wed, 04 Oct 2017 11:24:42 +0200, Johan Hovold wrote: > > On Wed, Oct 04, 2017 at 08:10:59AM +0200, Takashi Iwai wrote: > > On Tue, 03 Oct 2017 19:42:21 +0200, > > Greg Kroah-Hartman wrote: > > > > > > On Tue, Oct 03, 2017 at 12:50:08PM -0400, Alan Ste

Re: usb/sound/bcd2000: warning in bcd2000_init_device

2017-10-04 Thread Takashi Iwai
On Wed, 04 Oct 2017 09:52:36 +0200, Greg Kroah-Hartman wrote: > > On Wed, Oct 04, 2017 at 08:10:59AM +0200, Takashi Iwai wrote: > > On Tue, 03 Oct 2017 19:42:21 +0200, > > Greg Kroah-Hartman wrote: > > > > > > On Tue, Oct 03, 2017 at 12:50:08PM -0400, Alan Ste

Re: usb/sound/bcd2000: warning in bcd2000_init_device

2017-10-04 Thread Takashi Iwai
On Tue, 03 Oct 2017 19:42:21 +0200, Greg Kroah-Hartman wrote: > > On Tue, Oct 03, 2017 at 12:50:08PM -0400, Alan Stern wrote: > > On Tue, 3 Oct 2017, Takashi Iwai wrote: > > > > > > It's a dev_WARN because it indicates a potentially serious error in the > >

Re: usb/sound/bcd2000: warning in bcd2000_init_device

2017-10-03 Thread Takashi Iwai
On Tue, 03 Oct 2017 16:21:57 +0200, Alan Stern wrote: > > On Tue, 3 Oct 2017, Takashi Iwai wrote: > > > On Mon, 25 Sep 2017 14:39:51 +0200, > > Andrey Konovalov wrote: > > > > > > Hi! > > > > > > I've got the following report while

Re: usb/sound/bcd2000: warning in bcd2000_init_device

2017-10-03 Thread Takashi Iwai
On Mon, 25 Sep 2017 14:39:51 +0200, Andrey Konovalov wrote: > > Hi! > > I've got the following report while fuzzing the kernel with syzkaller. > > On commit e19b205be43d11bff638cad4487008c48d21c103 (4.14-rc2). > > It seems that there's no check of the endpoint type. > > usb 1-1: BOGUS urb

Re: [alsa-devel] [PATCH] ALSA: hda - Fix applying MSI dual-codec mobo quirk

2017-06-01 Thread Takashi Iwai
On Thu, 01 Jun 2017 22:58:24 +0200, Takashi Iwai wrote: > > The previous commit [63691587f7b0: ALSA: hda - Apply dual-codec quirk > for MSI Z270-Gaming mobo] attempted to apply the existing dual-codec > quirk for a MSI mobo. But it turned out that this isn't applied > properly

[PATCH v2 02/27] ALSA: pcm: Introduce copy_user, copy_kernel and fill_silence ops

2017-06-01 Thread Takashi Iwai
nify the implementations of both interleaved and non-interleaved cases, as we'll see in the later patch. As of this stage, copy_kernel ops isn't referred yet, but only copy_user is used. Signed-off-by: Takashi Iwai <ti...@suse.de> --- include/sound/pcm.h | 7 + sound/core/pcm_

[PATCH v2 12/27] ALSA: sb: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. For avoiding the code redundancy, slightly hackish macros are introduced. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/isa/sb/emu8000_pcm.c | 190 ++--- 1 file changed, 109 inse

[PATCH v2 03/27] ALSA: dummy: Convert to new PCM copy ops

2017-06-01 Thread Takashi Iwai
It's a dummy ops, so just replacing it. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/drivers/dummy.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 172dacd925f5..dd5ed037adf2

[PATCH] ALSA: hda - Fix applying MSI dual-codec mobo quirk

2017-06-01 Thread Takashi Iwai
lfschmidt.com> Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 918e45268915..a57988d617e9 100644 --- a/sound/pci/hda/patch

[PATCH v2 15/27] [media] solo6x10: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. The device supports only 1 channel and 8bit sample, so it's always bytes=frames, and we need no conversion of unit in the callback. Also, it's a capture stream, thus no silence is needed. Signed-off-by: Takashi Iwai <ti...@suse

[PATCH v2 04/27] ALSA: es1938: Convert to the new PCM copy ops

2017-06-01 Thread Takashi Iwai
Replace the copy ops with the new copy_user and copy_kernel ops. It's used only for a capture stream (for some hardware workaround), thus we need no silence operation. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/pci/es1938.c | 33 + 1 file chang

[PATCH v2 10/27] ALSA: hdsp: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. The conversion is straightforward with standard helper functions. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/pci/rme9652/hdsp.c | 67 1 file changed, 50 insertions(

[PATCH v2 08/27] ALSA: rme96: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/pci/

[PATCH v2 14/27] ASoC: blackfin: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. In AC97 and I2S-TDM mode, we need to convert back to frames, but otherwise the conversion is pretty straightforward. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/soc/blackfin/bf5xx-ac97-pcm.

[PATCH v2 20/27] ALSA: pcm: More unification of PCM transfer codes

2017-06-01 Thread Takashi Iwai
the specific copy ops or it's the standard read/write. Another bonus by this change is that we now guarantee the silencing behavior when NULL buffer is passed to write helpers. It'll simplify some codes later. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/core/pcm_lib.c

[PATCH v2 13/27] ALSA: sh: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. Fixed also the user-space buffer copy with the proper copy_from_user*() variant. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/sh/sh_dac_audio.c | 54 +++-- 1 file chang

[PATCH v2 11/27] ALSA: gus: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. For simplifying the code a bit, two local helpers are introduced here: get_bpos() and playback_copy_ack(). Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/isa/gus/gus_pcm.c | 97 ++

[PATCH v2 17/27] ALSA: pcm: Check PCM state by a common helper function

2017-06-01 Thread Takashi Iwai
Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/core/pcm_lib.c | 81 +++- 1 file changed, 29 insertions(+), 52 deletions(-) diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 0db8d4e0fca2..e4f5c43b6448 100644 --- a/soun

[PATCH v2 05/27] ALSA: nm256: Convert to new PCM copy ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/pci/nm256/

[PATCH v2 19/27] ALSA: pcm: Call directly the common read/write helpers

2017-06-01 Thread Takashi Iwai
Make snd_pcm_lib_read() and *_write() static inline functions that call the common helper functions directly. This reduces a slight amount of codes, and at the same time, it's a preparation for the further cleanups / fixes. Signed-off-by: Takashi Iwai <ti...@suse.de> --- include/sound

[PATCH v2 24/27] usb: gadget: u_uac1: Kill set_fs() usage

2017-06-01 Thread Takashi Iwai
With the new API to perform the in-kernel buffer copy, we can get rid of set_fs() usage in this driver, finally. Signed-off-by: Takashi Iwai <ti...@suse.de> --- drivers/usb/gadget/function/u_uac1.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/usb/

[PATCH v2 23/27] ALSA: pcm: Direct in-kernel read/write support

2017-06-01 Thread Takashi Iwai
simple because of the code refactoring until now. Signed-off-by: Takashi Iwai <ti...@suse.de> --- include/sound/pcm.h | 38 +- sound/core/pcm_lib.c | 26 +- 2 files changed, 58 insertions(+), 6 deletions(-) diff --git a/include

[PATCH v2 25/27] ALSA: pcm: Kill set_fs() in PCM OSS layer

2017-06-01 Thread Takashi Iwai
-by: Takashi Iwai <ti...@suse.de> --- sound/core/oss/pcm_oss.c | 77 1 file changed, 12 insertions(+), 65 deletions(-) diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index e306f05ce51d..2d6a825cfe88 100644 --- a/sound/core/oss/pcm

[PATCH v2 22/27] ALSA: pcm: Simplify snd_pcm_playback_silence()

2017-06-01 Thread Takashi Iwai
Use the existing silence helper codes for simplification. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/core/pcm_lib.c | 50 -- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/sound/core/pcm_lib.c b/sound/core/pcm

[PATCH v2 07/27] ALSA: rme32: Convert to the new PCM copy ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/pci/

[PATCH v2 27/27] ALSA: doc: Update copy_user, copy_kernel and fill_silence PCM ops

2017-06-01 Thread Takashi Iwai
Signed-off-by: Takashi Iwai <ti...@suse.de> --- .../sound/kernel-api/writing-an-alsa-driver.rst| 111 ++--- 1 file changed, 76 insertions(+), 35 deletions(-) diff --git a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst b/Documentation/sound/kernel-api/w

[PATCH v2 16/27] ALSA: pcm: Drop the old copy and silence ops

2017-06-01 Thread Takashi Iwai
Now that all users of old copy and silence ops have been converted to the new PCM ops, the old stuff can be retired and go away. Signed-off-by: Takashi Iwai <ti...@suse.de> --- include/sound/pcm.h | 5 - sound/core/pcm_lib.c | 38 +- sound/soc/soc

[PATCH v2 18/27] ALSA: pcm: Shuffle codes

2017-06-01 Thread Takashi Iwai
Just shuffle the codes, without any change otherwise. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/core/pcm_lib.c | 212 +-- 1 file changed, 106 insertions(+), 106 deletions(-) diff --git a/sound/core/pcm_lib.c b/sound/core/pcm

[PATCH v2 26/27] ALSA: pcm: Build OSS writev/readv helpers conditionally

2017-06-01 Thread Takashi Iwai
() directly instead. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/core/oss/io.c | 4 ++-- sound/core/oss/pcm_oss.c| 12 ++-- sound/core/oss/pcm_plugin.h | 6 ++ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sound/core/oss/io.c b/sound/core/os

[PATCH v2 09/27] ALSA: rme9652: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. The conversion is straightforward with standard helper functions. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/pci/rme9652/rme9652.c | 71 ++--- 1 file changed, 54 insertions(

[PATCH v2 00/27] Revised full patchset for PCM in-kernel copy support

2017-06-01 Thread Takashi Iwai
. I'm Cc'ing the media and the USB people since it touches solo6x10 and usb-gadget drivers. The previous ACK was dropped as each patch was rewritten again. Sorry for the doubly patch-review labours. thanks, Takashi === Takashi Iwai (26): ALSA: pcm: Introduce copy_user, copy_kernel

[PATCH v2 06/27] ALSA: korg1212: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. Although we can refactor this messy code, at this time, the changes are kept as small as possible. Let's clean up later. Signed-off-by: Takashi Iwai <ti...@suse.de> --- sound/pci/korg1212/korg1212.c

[PATCH v2 21/27] ALSA: pcm: Unify read/write loop

2017-06-01 Thread Takashi Iwai
Both __snd_pcm_lib_read() and __snd_pcm_write() functions have almost the same code to loop over samples. For simplification, this patch unifies both as the single helper, __snd_pcm_lib_xfer(). Other than that, there should be no functional change by this patch. Signed-off-by: Takashi Iwai <

Re: [alsa-devel] Distorted audio from microphone (Logitech C310)

2017-05-16 Thread Takashi Iwai
On Tue, 16 May 2017 07:58:43 +0200, Greg KH wrote: > > On Mon, May 15, 2017 at 03:29:09PM +0200, Domker_ wrote: > > My webcam Logitech C310 have a distored microphone audio on kernel 4.10.15-1 > > and 4.11.0-1. (on 4.9.27-1 and the older ones is fine). > > The distortion effect is as if I spoke

Re: [PATCH v4 6/6] sound: replace /proc/bus/usb by /dev/bus/usb

2017-04-17 Thread Takashi Iwai
On Mon, 17 Apr 2017 02:51:11 +0200, Mauro Carvalho Chehab wrote: > > The /proc/bus/usb devices don't exist anymore, since when we > got rid of usbfs. Those devices are now seen at > /dev/bus/usb. > > Signed-off-by: Mauro Carvalho Chehab Since it's a driver fix, I

Re: [PATCH] ALSA: line6: Always setup isochronous transfer properties

2017-02-07 Thread Takashi Iwai
On Mon, 06 Feb 2017 22:54:59 +0100, Andrej Kruták wrote: > > On Mon, Feb 6, 2017 at 10:19 PM, Takashi Iwai <ti...@suse.de> wrote: > > On Mon, 06 Feb 2017 20:34:58 +0100, > > Andrej Krutak wrote: > >> > >> While not all line6 devices currently su

Re: [PATCH] ALSA: line6: Always setup isochronous transfer properties

2017-02-06 Thread Takashi Iwai
On Mon, 06 Feb 2017 20:34:58 +0100, Andrej Krutak wrote: > > While not all line6 devices currently support PCM, it causes no > harm to 'have it prepared'. > > This also fixes toneport, which only has PCM - in which case > we previously skipped the USB transfer properties detection completely. >

Re: Fwd: Regression: Line6 Toneport stops working on 4.10-rc5

2017-02-06 Thread Takashi Iwai
On Mon, 06 Feb 2017 12:04:29 +0100, Andrej Kruták wrote: > > On Mon, Feb 6, 2017 at 12:01 PM, Takashi Iwai <ti...@suse.de> wrote: > > On Mon, 06 Feb 2017 11:18:44 +0100, > > Greg KH wrote: > >> > >> On Mon, Feb 06, 2017 at 01:01:56PM +03

Re: Fwd: Regression: Line6 Toneport stops working on 4.10-rc5

2017-02-06 Thread Takashi Iwai
On Mon, 06 Feb 2017 11:18:44 +0100, Greg KH wrote: > > On Mon, Feb 06, 2017 at 01:01:56PM +0300, Igor Zinovev wrote: > > Hello again! > > > > Thanks for the advice, but bisecting the whole tree took me quite a > > while and I ended up stuck because booting on some bisect states has > > led my

Re: [alsa-devel] Jack sensing in snd_usb_audio ?

2016-10-18 Thread Takashi Iwai
On Tue, 18 Oct 2016 15:33:42 +0200, Felipe Ferreri Tonello wrote: > > Hi Takashi > > On 18/10/16 13:07, Takashi Iwai wrote: > > On Wed, 12 Oct 2016 18:15:04 +0200, > > Bastien Nocera wrote: > >> > >> On Wed, 2016-10-12 at 18:06 +0200, Clemens

Re: [alsa-devel] Jack sensing in snd_usb_audio ?

2016-10-18 Thread Takashi Iwai
On Wed, 12 Oct 2016 18:15:04 +0200, Bastien Nocera wrote: > > On Wed, 2016-10-12 at 18:06 +0200, Clemens Ladisch wrote: > > Bastien Nocera wrote: > > > On Wed, 2016-10-12 at 14:43 +0200, Clemens Ladisch wrote: > > > > Bastien Nocera wrote: > > > > > " > > > > > A change of state in the audio

Re: [PATCH] ALSA: usb: caiaq: audio: don't print error when allocating urb fails

2016-08-11 Thread Takashi Iwai
On Thu, 11 Aug 2016 22:40:11 +0200, Wolfram Sang wrote: > > kmalloc will print enough information in case of failure. > > Signed-off-by: Wolfram Sang Applied, thanks. Takashi > --- > sound/usb/caiaq/audio.c | 1 - > 1 file changed, 1 deletion(-) > > diff

Re: [PATCH 1/2] usb-audio: correct speed checking

2016-05-08 Thread Takashi Iwai
On Wed, 04 May 2016 14:18:39 +0200, Oliver Neukum wrote: > > Allow handling SS+ USB devices correctly. > > Signed-off-by: Oliver Neukum Thanks, applied both patches now. Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message

Re: [PATCH] Documentation: nousb is a module parameter

2015-11-10 Thread Takashi Iwai
On Tue, 10 Nov 2015 14:15:44 +0100, Oliver Neukum wrote: > > The documentation wrongly implied that it is a core parameter. > That is not true. If usbcore is compiled as a module, a module > parameter needs a prefix. The code drivers/usb/core/usb.c has the following: /* To disable USB, kernel

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-21 Thread Takashi Iwai
At Thu, 21 May 2015 13:37:56 -0400 (EDT), Alan Stern wrote: On Thu, 21 May 2015, Takashi Iwai wrote: At Thu, 21 May 2015 11:26:17 -0400 (EDT), Alan Stern wrote: On Thu, 21 May 2015, Takashi Iwai wrote: At Thu, 21 May 2015 10:18:08 -0400 (EDT), Alan Stern wrote

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-21 Thread Takashi Iwai
At Thu, 21 May 2015 14:07:11 +0200, Marcel Holtmann wrote: Hi Takashi, The data is cached in RAM. More specifically, the former loaded firmware files are reloaded and saved at suspend for each device object. See fw_pm_notify() in firmware_class.c. OK, this may be a stupid idea,

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-21 Thread Takashi Iwai
At Thu, 21 May 2015 10:18:08 -0400 (EDT), Alan Stern wrote: On Thu, 21 May 2015, Takashi Iwai wrote: Then avoiding the failed firmware is no solution, indeed. If it's a new probe, it should be never executed during resume. Can you expand this comment? What's wrong with probing during

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-21 Thread Takashi Iwai
At Thu, 21 May 2015 11:26:17 -0400 (EDT), Alan Stern wrote: On Thu, 21 May 2015, Takashi Iwai wrote: At Thu, 21 May 2015 10:18:08 -0400 (EDT), Alan Stern wrote: On Thu, 21 May 2015, Takashi Iwai wrote: Then avoiding the failed firmware is no solution, indeed. If it's

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-21 Thread Takashi Iwai
At Thu, 21 May 2015 19:27:41 +0200, Arend van Spriel wrote: On 05/21/15 17:35, Takashi Iwai wrote: At Thu, 21 May 2015 11:26:17 -0400 (EDT), Alan Stern wrote: On Thu, 21 May 2015, Takashi Iwai wrote: At Thu, 21 May 2015 10:18:08 -0400 (EDT), Alan Stern wrote: On Thu, 21 May

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-20 Thread Takashi Iwai
At Tue, 19 May 2015 19:42:55 +0200, Oliver Neukum wrote: On Tue, 2015-05-19 at 19:13 +0200, Takashi Iwai wrote: At Tue, 19 May 2015 10:26:46 -0400 (EDT), Alan Stern wrote: Of just have request_firmware() actually sleep until userspace is ready. Seriously, why

Re: [RESEND][PATCH] Bluetooth: Make request workqueue freezable

2015-05-20 Thread Takashi Iwai
just cache the status of a missing firmware as well. OK, below is a quick hack to record the failed f/w files, too. Not sure whether this helps, though. Proper tests are appreciated. Takashi --- From: Takashi Iwai ti...@suse.de Subject: [PATCH] firmware: cache failed firmwares, too Signed-off

  1   2   >