1
0
Fork 0
Commit Graph

1089 Commits (42248979d5705e056b509cdcfb548e40f708cba8)

Author SHA1 Message Date
Joe Turner b62b998010 ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate
Adds a quirk to disable the check that the sample rate has been set correctly, as the Lifecam does not support getting the sample rate.

This means that we don't need to wait for the USB timeout when attempting to get the sample rate. Waiting for the timeout causes problems in some applications, which give up on the device acquisition process before it has had time to complete, resulting in no sound.

[minor tidy up by tiwai]

Signed-off-by: Joe Turner <joe@oampo.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-17 07:20:04 +01:00
Chris Rorvick 25a0707cf6 ALSA: line6: Improve line6_read/write_data() interfaces
The address cannot be negative so make it unsigned.  Also, an unsigned
int is always sufficient for the length, so no need to overdo it with a
size_t.  Finally, add in range checks to see if the values passed in
actually fit where they are used.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-12 11:07:48 +01:00
Chris Rorvick 0e806151e8 ALSA: line6: toneport: Use explicit type for firmware version
The firmware version is a single byte so have the variable type agree.
Since the address to this member is passed to the read function, using
an int is not even portable.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-11 10:41:59 +01:00
Chris Rorvick 12b00157fd ALSA: line6: Use explicit type for serial number
The serial number (aka ESN) is a 32-bit value.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-11 10:39:05 +01:00
Chris Rorvick e474e7fd40 ALSA: line6: Return EIO if read/write not successful
Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-11 10:37:43 +01:00
Chris Rorvick f3dfd1be08 ALSA: line6: Return error if device not responding
Put an upper bound on how long we will wait for the device to respond to
a read/write request (i.e., 100 milliseconds) and return an error if
this is reached.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-11 10:37:30 +01:00
Chris Rorvick e64e94df99 ALSA: line6: Add delay before reading status
The device indicates the result of a read/write operation by making the
status available on a subsequent request from the driver.  This is not
ready immediately, though, so the driver is currently slamming the
device with hundreds of pointless requests before getting the expected
response.  Add a two millisecond delay before each attempt.  This is
approximately the behavior observed with version 4.2.7.1 of the Windows
driver.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-11 10:33:55 +01:00
Pierre-Louis Bossart ea33d359c4 ALSA: usb: update trigger timestamp on first non-zero URB submitted
The first URBs are submitted during the prepare stage. When .trigger is
called, the ALSA core saves a trigger tstamp that doesn't correspond to
the actual time when the samples are submitted. The trigger_tstamp is
now updated when the first data are submitted to avoid any time offsets.

A usb-specific trigger_tstamp_pending_update flag is used for now,
at some point the flag would need to move to the ALSA core, USB
is not the only interface where silent block transfers are programmed
as part of the prepare stage, with actual data enabled when .trigger
is called.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-09 16:02:43 +01:00
Chris Rorvick 12865cac38 ALSA: line6: Pass driver name to line6_probe()
Provide a unique name for each driver instead of using "line6usb" for
all of them.  This will allow for different configurations based on the
driver type.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-08 09:07:07 +01:00
Chris Rorvick f2bd242fa1 ALSA: line6: Pass toneport pointer to toneport_has_led()
It is unlikely this function would ever be used in a context without a
pointer to a `struct usb_line6_toneport', so grab the device type from
it rather than having the caller do it.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-08 09:06:08 +01:00
Chris Rorvick 89444601e5 ALSA: line6: Add toneport_has_source_select()
Add a predicate for testing if the device supports source selection to
make the conditional logic around this a bit cleaner.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-08 09:05:56 +01:00
Takashi Iwai 9b6ff3fb96 ALSA: line6: Get rid of unused variable in pod.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-06 10:12:46 +01:00
Takashi Iwai 02fc76f6a7 ALSA: line6: Create sysfs via snd_card_add_dev_attr()
Use the new helper function to create sysfs entries in the card more
gracefully without races.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-06 10:09:23 +01:00
Nicholas Mc Guire 6ccd93bdb9 ALSA: line6: fixup of line6_start_timer argument type
line6_start_timer passes an unsigned int as argument to be used in mod_timer
which is then used by mod_timer as unsigned long, this just fixes up the
argument type. This change helps make static code checkers happy.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-03 09:44:04 +01:00
Nicholas Mc Guire 695758c6c4 ALSA: line6: use msecs_to_jiffies for conversion
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-03 09:43:55 +01:00
Chris Rorvick 58647286ab ALSA: line6: Remove unused line6_midibuf_skip_message()
Use of this function ended with commits 3e58c868db ("staging: line6:
drop midi_mask_receive") and af89d2897a ("staging: line6: drop
midi_mask_transmit".)

[Removed the corresponding line in midibuf.h, too -- tiwai]

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-01 09:35:25 +01:00
Chris Rorvick 642adf5f9a ALSA: line6: Remove unused line6_midibuf_status()
This function has not been used since merging the driver into the kernel
(and a good while before that.)

[Removed the corresponding line in midibuf.h, too -- tiwai]

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-01 09:35:24 +01:00
Takashi Iwai 6eb3db91f2 Merge branch 'topic/line6' into for-next 2015-01-30 12:15:55 +01:00
Takashi Iwai 1263f61179 ALSA: line6: Remove snd_line6_ prefix of pcm property fields
It's just superfluous and doesn't give any better readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:47 +01:00
Takashi Iwai 72f18d0075 ALSA: line6: Remove invalid capability bits for PODxt Live Variax
PODxt Live Variax doesn't have PCM and HWMON but only MIDI.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:46 +01:00
Takashi Iwai b3313476dd ALSA: line6: Remove struct usb_line6_podhd
It's identical with struct usb_line6.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:45 +01:00
Takashi Iwai 129b3be689 ALSA: line6: Move the contents of usbdefs.h into driver.h
Most of them are rather relevant with the definitions in driver.h,
and there are only a few lines, so just rip it off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:45 +01:00
Takashi Iwai fd9301d33f ALSA: line6: Remove revision.h
The definition is no longer used.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:44 +01:00
Takashi Iwai cddbd4f170 ALSA: line6: Tidy up and typo fixes in comments
Just reformatting the comments and typos fixed, no functional
changes.  Particularly,
- avoid the kerneldoc marker "/**",
- reduce multiple comment lines into single lines,
- corrected wrongly referred function names

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:54:43 +01:00
Takashi Iwai 0416980d0a ALSA: line6: Fix volume calculation for big-endian
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 20:50:54 +01:00
Takashi Iwai 5da7f924a4 ALSA: usx2y: Move UAPI definition into include/uapi/sound/usb_stream.h
The user-space API definition for usb_stream stuff should be moved
to include/uapi/sound to be exposed publicly.

While we're at it, add the missing ifdef guard for double inclusion,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 17:33:49 +01:00
Takashi Iwai 5e0ddd07fa Merge branch 'topic/line6' into for-next 2015-01-28 07:24:41 +01:00
Takashi Iwai 247d95ee6d ALSA: line6: Handle error from line6_pcm_acquire()
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:57 +01:00
Takashi Iwai 2954f914f2 ALSA: line6: Make common PCM pointer callback
Both playback and capture callbacks are identical, so let's merge
them.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:45 +01:00
Takashi Iwai 63e20df1e5 ALSA: line6: Reorganize PCM stream handling
The current code deals with the stream start / stop solely via
line6_pcm_acquire() and line6_pcm_release().  This was (supposedly)
intended to avoid the races, but it doesn't work as expected.  The
concurrent acquire and release calls can be performed without proper
protections, thus this might result in memory corruption.
Furthermore, we can't take a mutex to protect the whole function
because it can be called from the PCM trigger callback that is an
atomic context.  Also spinlock isn't appropriate because the function
allocates with kmalloc with GFP_KERNEL.  That is, these function just
lead to singular problems.

This is an attempt to reduce the existing races.  First off, separate
both the stream buffer management and the stream URB management.  The
former is protected via a newly introduced state_mutex while the
latter is protected via each line6_pcm_stream lock.

Secondly, the stream state are now managed in opened and running bit
flags of each line6_pcm_stream.  Not only this a bit clearer than
previous combined bit flags, this also gives a better abstraction.
These rewrites allows us to make common hw_params and hw_free
callbacks for both playback and capture directions.

For the monitor and impulse operations, still line6_pcm_acquire() and
line6_pcm_release() are used.  They call internally the corresponding
functions for both playback and capture streams with proper lock or
mutex.  Unlike the previous versions, these function don't take the
bit masks but the only single type value.  Also they are supposed to
be applied only as duplex operations.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:36 +01:00
Takashi Iwai f2bb614bb6 ALSA: line6: Clear prev_fbuf and prev_fsize properly
Clearing prev_fsize in line6_pcm_acquire() is pretty racy.
This can be called at any time while the stream is being played.
Rather better to clear prev_fbuf and prev_fsize at the proper place
like the stream stop for capture, and just after copying the monitor /
impulse data inside the spinlock.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:30 +01:00
Takashi Iwai 3d3ae4454d ALSA: line6: Fix racy loopback handling
The impulse and monitor handling in submit_audio_out_urb() isn't
protected thus this can be racy with the capture stream handling.
This patch extends the range to protect via each stream's spinlock
(now the whole submit_audio_*_urb() are covered), and take the capture
stream lock additionally for the impulse and monitor handling part.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:23 +01:00
Takashi Iwai d6ca69d825 ALSA: line6: Minor tidy up in line6_probe()
Move the check of multi configurations before snd_card_new() as a
short path, and reduce superfluous pointer references.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:16 +01:00
Takashi Iwai aca514b823 ALSA: line6: Let snd_card_new() allocate private data
Instead of allocating the private data individually in each driver's
probe at first, let snd_card_new() allocate the data that is called in
line6_probe().  This simplifies the primary probe functions.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:22:07 +01:00
Takashi Iwai f66fd990c5 ALSA: line6: Drop interface argument from private_init and disconnect callbacks
The interface argument is used just for retrieving the assigned
device, which can be already found in line6->ifcdev.  Drop them from
the callbacks.  Also, pass the usb id to private_init so that the
driver can deal with it there.  This is a preliminary work for the
further cleanup to move the whole allocation into driver.c.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:59 +01:00
Takashi Iwai 62a109d9e2 ALSA: line6: Skip volume manipulation during silence copying
A minor optimization; while pausing, the driver just copies the zero
that doesn't need any volume changes.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:52 +01:00
Takashi Iwai c8491535d7 ALSA: line6: Do clipping in volume / monitor manipulations
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:45 +01:00
Takashi Iwai e90576c595 ALSA: line6: Consolidate PCM stream buffer allocation and free
The PCM stream buffer allocation and free are identical for both
playback and capture streams.  Provide single helper functions.
These are used only in pcm.c, thus they can be even static.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:39 +01:00
Takashi Iwai ccaac9ed79 ALSA: line6: Use dev_err()
This is the last remaining snd_printk() usage in this driver.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:33 +01:00
Takashi Iwai d8131e67f0 ALSA: line6: Consolidate URB unlink and sync helpers
The codes to unlink and sync URBs are identical for both playback and
capture streams.  Consolidate to single helper functions.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:27 +01:00
Takashi Iwai ad0119abe2 ALSA: line6: Rearrange PCM structure
Introduce a new line6_pcm_stream structure and group individual
fields of snd_line6_pcm struct to playback and capture groups.

This patch itself just does rename and nothing else.  More
meaningful cleanups based on these fields shuffling will follow.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:18 +01:00
Takashi Iwai ab5cdcbab2 ALSA: line6: Drop voodoo workarounds
If the problem still really remains, we should fix it instead of
papering over it like this...

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:12 +01:00
Takashi Iwai 9fb754b79e ALSA: line6: Use incremental loop
Using a decremental loop without particular reasons worsens the
readability a lot.  Use incremental loops instead.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:06 +01:00
Takashi Iwai f2a76225b9 ALSA: line6: Drop superfluous spinlock for trigger
The trigger callback is already spinlocked, so we need no more lock
here (even for the linked substreams).  Let's drop it.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:21:00 +01:00
Takashi Iwai 5343ecf4e5 ALSA: line6: Fix the error recovery in line6_pcm_acquire()
line6_pcm_acquire() tries to restore the newly obtained resources at
the error path.  But some flags aren't recorded and released properly
when the corresponding buffer is already present.  These bits have to
be cleared in the error recovery, too.

Also, "flags_final" can be initialized to zero since we pass only the
subset of "channels" bits.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:53 +01:00
Takashi Iwai 6aa7f8ef29 ALSA: line6: Use logical OR
Fixed a few places using bits OR wrongly for condition checks.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:46 +01:00
Takashi Iwai eab22e4053 ALSA: line6: Fix missing error handling in line6_pcm_acquire()
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:40 +01:00
Takashi Iwai bc518ba4cc ALSA: line6: Reduce superfluous spinlock in midi.c
The midi_transmit_lock is used always inside the send_urb_lock, thus
it doesn't play any role.  Let's kill it.  Also, rename
"send_urb_lock" as a more simple name "lock" since this is the only
lock for midi.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:34 +01:00
Takashi Iwai b55004f9fd ALSA: line6: Remove unused line6_nop_read()
The function isn't used any longer after rewriting from sysfs to leds
class in toneport.c.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:28 +01:00
Takashi Iwai 6b562f63dd ALSA: line6: Fix memory leak at probe error path
Fix memory leak at probe error path by rearranging the call order in
line6_destruct() so that the common destructor is always called.
Also this simplifies the error path to a single goto label.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:21 +01:00
Takashi Iwai 644d90850c ALSA: line6: Minor refactoring
Split some codes in the lengthy line6_probe().

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:15 +01:00
Takashi Iwai f44edd7b2b ALSA: line6/toneport: Implement LED controls via LED class
Instead of non-standard sysfs, reimplement the LED controls on
TonePort as LED class devices.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:08 +01:00
Takashi Iwai bf115fcf95 ALSA: line6/toneport: Fix wrong argument for toneport_has_led()
Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:20:02 +01:00
Takashi Iwai eedd0e95d3 ALSA: line6: Don't forget to call driver's destructor at error path
Currently disconnect callback is used as a driver's destructor, and
this has to be called not only at the disconnection time but also at
the error paths during probe.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:19:55 +01:00
Takashi Iwai 6dd1c05cd7 ALSA: line6/toneport: Move setup_timer() at the beginning
... so that timer_del_sync() in the destructor can be called safely at
any time.  Also move the mod_timer() call in toneport_setup(), which
is a bit clearer place.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:19:47 +01:00
Takashi Iwai 8a3b7c086a ALSA: line6: Remove superfluous NULL checks in each driver
The interface and driver objects are always set when callbacks are
called.  Drop such superfluous NULL checks in init and disconnect
calls of each driver.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:19:37 +01:00
Takashi Iwai 2a324fcdb5 ALSA: line6: Abort if inconsistent usbdev is found at disconnect
It's utterly unsafe to proceed further the disconnect procedure if the
assigned usbdev is inconsistent with the expected object.  Better to
put a WARN_ON() for more cautions and abort immediately.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:19:29 +01:00
Takashi Iwai 270fd9c7f9 ALSA: line6: Yet more cleanup of superfluous NULL checks
... in line6_disconnect() as well.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 07:18:04 +01:00
Takashi Iwai 7533185eee Merge branch 'for-linus' into for-next
Sync with the latest 3.19-rc state for applying other ALSA sequencer
core fixes.
2015-01-26 13:53:41 +01:00
Takashi Iwai 3b15d0d505 Merge branch 'topic/timer-cleanup' into for-next 2015-01-20 10:11:27 +01:00
Takashi Iwai 86b5f3ec41 Merge branch 'topic/line6' into for-next 2015-01-20 10:08:06 +01:00
Chris Rorvick c078a4aac2 ALSA: line6: Remove driver version from header comment
The driver version string was removed in an ealier commit for being
useless.  These are equally useless.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 09:52:40 +01:00
Chris Rorvick c6fffce92e ALSA: line6: Refer to manufacturer as "Line 6"
The correct spelling includes the space.  Fix this in strings and
comments that refer to the manufacturer.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 09:52:30 +01:00
Chris Rorvick 35ae48a3f4 ALSA: line6: Remove superfluous NULL checks
Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 09:52:20 +01:00
Takashi Iwai 4d79fb1ed2 ALSA: line6: Drop line6_send_program() and line6_transmit_parameter()
Both functions are used nowhere.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:19:12 +01:00
Takashi Iwai 7372319028 ALSA: line6: Make line6_send_raw_message() static
It's used only locally.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:19:05 +01:00
Takashi Iwai 5a4753112a ALSA: line6: Sync PCM stop at disconnect
Call line6_pcm_disconnect() at disconnect to make sure that all URBs
are cleared.  Also reduce the superfluous snd_pcm_stop() calls from
the function (and remove the unused function) since the streams are
guaranteed to be stopped at this point via snd_card_disconnect().

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:18:44 +01:00
Takashi Iwai 31ca192139 ALSA: line6: Remove superfluous disconnect call in suspend handler
Calling line6_pcm_disconnect() at suspend callback is superfluous and
rather confusing.  Let's get rid of it.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:18:33 +01:00
Takashi Iwai b2a3b02392 ALSA: line6: Remove CHECK_RETURN macro
Such a macro doesn't improve readability.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:18:27 +01:00
Takashi Iwai 10e3a023c9 ALSA: line6: Drop MISSING_CASE macro
Such a debug is needed in the core code, not in each lowlevel driver.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:18:20 +01:00
Takashi Iwai 2cd53fa9d3 ALSA: line6: Remove driver version string
This is rather useless for a driver that has been already merged into
the official tree.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:18:10 +01:00
Takashi Iwai 85a9339bec ALSA: line6: Reorganize card resource handling
This is a fairly big rewrite regarding the card resource management in
line6 drivers:

- The card creation is moved into line6_probe().  This adds the global
  destructor to private_free, so that each driver doesn't have to call
  it any longer.

- The USB disconnect callback handles the card release, thus each
  driver needs to concentrate on only its own resources.  No need to
  snd_card_*() call in the destructor.

- Fix the potential stall in disconnection by removing
  snd_card_free().   It's replaced with snd_card_free_when_closed()
  for asynchronous release.

- The only remaining operation for the card in each driver is the call
  of snd_card_register().  All the rest are dealt in the common module
  by itself.

- These ended up with removal of audio.[ch] as a result of a reduction
  of one layer.  Each driver just needs to call line6_probe().

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:17:16 +01:00
Takashi Iwai 84ac9bb12e ALSA: line6: Drop superfluous irqsave/irqrestore in PCM trigger callback
The PCM trigger callback is guaranteed to be called already in
spinlock / irq-disabled context.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:16:18 +01:00
Takashi Iwai 7d70c81cca ALSA: line6: Don't handle PCM trigger for other cards
Otherwise it oopses.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:16:10 +01:00
Takashi Iwai a019f5e8c5 ALSA: line6: Remove superfluous out-of-memory error messages
Kernel already shows the error in the common path.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:16:01 +01:00
Takashi Iwai 45a82f1891 ALSA: line6: Drop usb_device sysfs symlink
It's non-standard and rather superfluous.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:15:53 +01:00
Takashi Iwai 988d350aef ALSA: line6: Drop invalid SNDRV_PCM_INFO_RESUME flag
The line6 drivers don't support the full resume although they set
SNDRV_PCM_INFO_RESUME.  These flags have to be dropped to inform
properly to the user-space.

Also, drop the CONFIG_PM in trigger callbacks, too, which are rather
superfluous.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:15:38 +01:00
Takashi Iwai aaa68d2f29 ALSA: line6: Drop superfluous snd_device for rawmidi
Like the previous fix for PCM, attach the card-specific resource into
rawmidi->private_data instead of handling in a snd_device object.
This simplifies the code and structure.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:15:02 +01:00
Takashi Iwai b45a7c5654 ALSA: line6: Drop superfluous snd_device for PCM
Instead of handling the card-specific resource in snd_device, attach
it into pcm->private_data and release it directly in private_free.
This simplifies the code and structure.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:14:55 +01:00
Takashi Iwai 075587b723 ALSA: line6: Handle impulse response via control API
Instead of sysfs and the conditional build with Kconfig, implement the
handling of the impulse response controls via control API, and always
enable the build.  Two new controls, "Impulse Response Volume" and
"Impulse Response Period" are added as a replacement for the former
sysfs files.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:14:36 +01:00
Takashi Iwai ccddbe4a99 ALSA: line6: Split to each driver
Split to each individual driver for POD, PODHD, TonePort and Variax
with a core LINE6 helper module.  The new modules follow the standard
ALSA naming rule with snd prefix: snd-usb-pod, snd-usb-podhd,
snd-usb-toneport and snd-usb-variax, together with the corresponding
CONFIG_SND_USB_* Kconfig items.

Tested-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-20 08:14:17 +01:00
Takashi Iwai 0f2524b347 ALSA: line6: Use setup_timer() and mod_timer()
No functional change, refactoring with the standard helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-19 11:46:02 +01:00
Takashi Iwai 28e237a9b7 ALSA: usb-audio: Use setup_timer() and mod_timer()
No functional change, refactoring with the standard helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-19 11:43:50 +01:00
Jason Lee Cragg 6455931186 ALSA: usb-audio: Add mic volume fix quirk for Logitech Webcam C210
Signed-off-by: Jason Lee Cragg <jcragg@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-18 10:03:50 +01:00
Takashi Iwai 7bfb8575b8 Merge branch 'topic/line6' into for-next 2015-01-12 22:33:16 +01:00
Takashi Iwai 61864d844c ALSA: move line6 usb driver into sound/usb
Promote line6 driver from staging to sound/usb/line6 directory, and
maintain through sound subsystem tree.

This commit just moves the code and adapts Makefile / Kconfig.
The further renames and misc cleanups will follow.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-12 22:29:57 +01:00
Paul Bonser e9f4936972 ALSA: usb-audio: Add support for Akai MPC Element USB MIDI controller
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.

Signed-off-by: Paul Bonser <misterpib@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-08 08:26:12 +01:00
Daniel Mack 49cdd5b641 ALSA: snd-usb-caiaq: fix stream count check
Commit 897c329bc ("ALSA: usb: caiaq: check for cdev->n_streams > 1")
introduced a safety check to protect against bogus data provided by
devices. However, the n_streams variable is already divided by
CHANNELS_PER_STREAM, so the correct check is 'n_streams > 0'.

Fix this to un-break support for stereo devices.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Cc: stable@kernel.org [v3.18+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-05 08:56:19 +01:00
Linus Torvalds 20e471fd34 sound fixes for 3.19-rc1
Here are a few fixes that have landed after the previous pull
 request.  All are driver specific fixes including:
 - error/int value fixes in OXFW,
 - Intel Skylake HD-audio HDMI codec support,
 - Additional HD-audio Realtek codecs and AD1986A codec fixes/quirks,
 - a few more DSD support and a quirk for Arcam rPAC in usb-audio,
 - a typo fix for Scarlett 6i6,
 - fixes for new ASIHPI firmware,
 - ASoC Exynos7 cleanups,
 - Intel ACPI support, and
 - a fix for PCM512 register cache sync.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUkwikAAoJEGwxgFQ9KSmkBq4QAJKgRY2eTJNhg9tZhI1ldxRi
 zSLtcMqDrFd/FjlutHxIlF8iXvm0dldfJP0rZwCQ/ULb6Fcy9tkXhhzfVsO4/507
 vYpPpaq7zGVLeOzT6zgguQUnEMzMc3VIIqiPG9YC73/NYx7cxgmG27oa/PJz+Brm
 /gVLlDzWn5rIagodSRMbUUf3YM5P9t2KZpRa8JAEUwWBy8PnzmMA9yx6cifbmnlV
 Gcd7j438O22cW6ubXFtKsezV2hrWYoBSKiH3kj2soEZafCpnoI+Y0rxDeW4vI1SB
 e/cI6C2ncxZodOD6fN1gJDgL5TLQetIAmN19ww9txb78UnP53b39J1fruJwGXdPV
 h+H4oftIkoDx2ACT02xcW5EFn309PJphZi/g8qOFSLRAXZBTb9yw1PfyCHxPynT5
 XbL7HTdgFU1S+eHjTFLjLGgsybJ7LaJCBwtQMeutXr1qjCAYTIKQeYxoi5ItSoM3
 NeNe68XVV5D4lq6udt42uVxjOdAggXQAnS5YDH8TDTWaERIMLmQGueZaDkZ7bGVO
 Wp3k4akURdF5mkVoQ5s3P4yYCOkf2zamZZsfSYIvT9MNZ9KWb+C/bslwsCzbmVLO
 sIMXQ1FYo9tbVIa9TTLBLfmYaIkPq/V2xERw5ugf5iLibO+o4K0fnoquctIeEXCI
 VQZ6BM6P7xB7iIyf7Of+
 =HRbM
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are a few fixes that have landed after the previous pull request.
  All are driver specific fixes including:

   - error/int value fixes in OXFW,
   - Intel Skylake HD-audio HDMI codec support,
   - Additional HD-audio Realtek codecs and AD1986A codec fixes/quirks,
   - a few more DSD support and a quirk for Arcam rPAC in usb-audio,
   - a typo fix for Scarlett 6i6,
   - fixes for new ASIHPI firmware,
   - ASoC Exynos7 cleanups,
   - Intel ACPI support, and
   - a fix for PCM512 register cache sync"

* tag 'sound-fix-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits)
  ALSA: usb-audio: extend KEF X300A FU 10 tweak to Arcam rPAC
  ALSA: hda/realtek - New codec support for ALC298
  ALSA: asihpi: update to HPI version 4.14
  ALSA: asihpi: increase tuner pad cache size
  ALSA: asihpi: relax firmware version check
  ALSA: usb-audio: Fix Scarlett 6i6 initialization typo
  ALSA: hda - Add quirk for Packard Bell EasyNote MX65
  ALSA: usb-audio: add native DSD support for Matrix Audio DACs
  ALSA: hda/realtek - New codec support for ALC256
  ALSA: hda/realtek - Add new Dell desktop for ALC3234 headset mode
  ASoC: Intel: fix possible acpi enumeration panic
  ALSA: hda/hdmi - apply Haswell fix-ups to Skylake display codec
  ASoC: Intel: fix return value check in sst_acpi_probe()
  ALSA: hda - Make add_stereo_mix_input flag tristate
  ALSA: hda - Create capture source ctls when stereo mix input is added
  ALSA: hda - Fix typos in snd_hda_get_int_hint() kerneldoc comments
  ALSA: hda - add codec ID for Skylake display audio codec
  ALSA: oxfw: some signedness bugs
  ALSA: oxfw: fix detect_loud_models() return value
  ASoC: rt5677: add REGMAP_I2C and REGMAP_IRQ dependency
  ...
2014-12-19 18:07:17 -08:00
Jiri Jaburek d70a1b9893 ALSA: usb-audio: extend KEF X300A FU 10 tweak to Arcam rPAC
The Arcam rPAC seems to have the same problem - whenever anything
(alsamixer, udevd, 3.9+ kernel from 60af3d037e, ..) attempts to
access mixer / control interface of the card, the firmware "locks up"
the entire device, resulting in
  SNDRV_PCM_IOCTL_HW_PARAMS failed (-5): Input/output error
from alsa-lib.

Other operating systems can somehow read the mixer (there seems to be
playback volume/mute), but any manipulation is ignored by the device
(which has hardware volume controls).

Cc: <stable@vger.kernel.org>
Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-18 17:49:50 +01:00
Chris J Arges c99b9e853d ALSA: usb-audio: Fix Scarlett 6i6 initialization typo
The num_controls field was incorrectly set to 0 causing 6i6 to not be
initialized. Set this to 9.

Reported-and-tested-by: Mark Roberts <sunifiram@gmail.com>
Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-18 08:39:17 +01:00
Jurgen Kramer 38f74d5b82 ALSA: usb-audio: add native DSD support for Matrix Audio DACs
This patch adds native DSD support for two XMOS based DACs from Matrix Audio:
- X-Sabre
- Mini-i Pro

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-17 17:55:20 +01:00
Linus Torvalds bae41e45b7 sound updates for 3.19-rc1
This became a fairly large pull request.  In addition to the usual
 driver updates / fixes, there have been a high amount of cleanups in
 ASoC area, as well as control API helpers and kernel documentations
 fixes touching through the whole tree.
 
 In the driver side, the biggest changes are the support for new Intel
 SoC found on new x86 machines, and the updates of FireWire dice and
 oxfw drivers.
 
 Some remarkable items are below:
 
 * ALSA core
  - PCM mmap code cleanup, removal of arch-dependent codes
  - PCM xrun injection support
  - PCM hwptr tracepoint support
  - Refactoring of snd_pcm_action(), simplification of PCM locking
  - Robustified sequecner auto-load functionality
  - New control API helpers and lots of cleanups along with them
  - Lots of kerneldoc fixes and cleanups
 
 * USB-audio
  - The mixer resume code was largely rewritten, and the devices with
    quirks are resumed properly.
  - New hardware support: Focusrite Scarlett, Digidesign Mbox1,
    Denon/Marantz DACs, Zoom R16/24
 
 * FireWire
  - DICE driver updates with better duplex and sync support, including
    MIDI support
  - New OXFW driver for Oxford Semiconductor FW970/971 chipset,
    including the previous LaCie Speakers device.  Fullduplex and MIDI
    support included as well as DICE driver.
 
 * HD-audio
  - Refactoring the driver-caps quirk handling in snd-hda-intel
  - More consistent control names representing the topology better
  - Fixups: HP mute LED with ALC268 codec, Ideapad S210 built-in mic
    fix, ASUS Z99He laptop EAPD
 
 * ASoC
  - Conversion of AC'97 drivers to use regmap, bringing us closer to
    the removal of the ASoC level I/O code
  - Clean up a lot of old drivers that were open coding things that
    have subsequently been implemented in the core
  - Some DAPM performance improvements
  - Removal of the now seldom used CODEC mutex
  - Lots of updates for the newer Intel SoC support, including support
    for the DSP and some Cherrytrail and Braswell machine drivers
  - Support for Samsung boards using rt5631 as the CODEC
  - Removal of the obsolete AFEB9260 machine driver
  - Driver support for the TI TS3A227E headset driver used in some
    Chrombeooks
 
 * Others
  - ASIHPI driver update and cleanups
  - Lots of dev_*() printk conversions
  - Lots of trivial cleanups for the codes spotted by Coccinelle
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUiYaqAAoJEGwxgFQ9KSmkeo0P/2aDx2w8iVi8n7Og/7VBubkm
 VZkk08IOpP3h1ojyQRsBQPI0H5AquqQTZN1TJUDcy+6PD9vckYYcag9JWhA+0RBr
 I+BfTMLB3E4umIkzOjxeoyOzheL7GoZ+eZYEm8DkAhaue+cFhjNJz+S6g8ENkxJ9
 lSjErXQxyiowc39I0v1WBZcuq6glX1psEsVup9U8m7KhNx6lexj28A2MkqicW4hs
 DZE6pYrk57W7y3+/NWxaBiglrItvScBAPpPqoyDm9zuDNTmAtGjf1uMRmRyHe30Z
 iunHXki8Fc2yBBapmfYrcLC2jyIyZykcxniF8Hd4nXUvddisFUEFFhNmB6v392d0
 4/NXSqTnsq48vm0Ezjia2LySWKZZVQtam8t9262BKHcosKYObxirekD6vijSoWO8
 ZWoXa+U1oWSFEoOAFDsu6GFqFHFRi5VhqBgIaPEIxrT2MQGHL3KU1bp8CJi/5CTU
 pNh0wC9SMtnSJJXBIP/nYH81WQxaik3c4eiHFPN4+0McBZQiIaIqMG6x+iiVNvPB
 MNLLVAzk0QiWeCmSo8OBdjOV0/T+pfQ7lrTCn2B1jdJi1CkAO8m2SwQrG4PpRx8k
 lUTBd4zTx5DYR+yPF69OyoCQg0XKjW9g62Qo5rmxrQreiidROZOBS1bljWzIPeft
 otupLmK5kz67n3eB2eto
 =sB6v
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "This became a fairly large pull request.  In addition to the usual
  driver updates / fixes, there have been a high amount of cleanups in
  ASoC area, as well as control API helpers and kernel documentations
  fixes touching through the whole tree.

  In the driver side, the biggest changes are the support for new Intel
  SoC found on new x86 machines, and the updates of FireWire dice and
  oxfw drivers.

  Some remarkable items are below:

  ALSA core:
   - PCM mmap code cleanup, removal of arch-dependent codes
   - PCM xrun injection support
   - PCM hwptr tracepoint support
   - Refactoring of snd_pcm_action(), simplification of PCM locking
   - Robustified sequecner auto-load functionality
   - New control API helpers and lots of cleanups along with them
   - Lots of kerneldoc fixes and cleanups

  USB-audio:
   - The mixer resume code was largely rewritten, and the devices with
     quirks are resumed properly.
   - New hardware support: Focusrite Scarlett, Digidesign Mbox1,
     Denon/Marantz DACs, Zoom R16/24

  FireWire:
   - DICE driver updates with better duplex and sync support, including
     MIDI support
   - New OXFW driver for Oxford Semiconductor FW970/971 chipset,
     including the previous LaCie Speakers device.  Fullduplex and MIDI
     support included as well as DICE driver.

  HD-audio:
   - Refactoring the driver-caps quirk handling in snd-hda-intel
   - More consistent control names representing the topology better
   - Fixups: HP mute LED with ALC268 codec, Ideapad S210 built-in mic
     fix, ASUS Z99He laptop EAPD

  ASoC:
   - Conversion of AC'97 drivers to use regmap, bringing us closer to
     the removal of the ASoC level I/O code
   - Clean up a lot of old drivers that were open coding things that
     have subsequently been implemented in the core
   - Some DAPM performance improvements
   - Removal of the now seldom used CODEC mutex
   - Lots of updates for the newer Intel SoC support, including support
     for the DSP and some Cherrytrail and Braswell machine drivers
   - Support for Samsung boards using rt5631 as the CODEC
   - Removal of the obsolete AFEB9260 machine driver
   - Driver support for the TI TS3A227E headset driver used in some
     Chrombeooks

  Others:
   - ASIHPI driver update and cleanups
   - Lots of dev_*() printk conversions
   - Lots of trivial cleanups for the codes spotted by Coccinelle"

* tag 'sound-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (594 commits)
  ALSA: pcxhr: NULL dereference on probe failure
  ALSA: lola: NULL dereference on probe failure
  ALSA: hda - Add "eapd" model string for AD1986A codec
  ALSA: hda - Add EAPD fixup for ASUS Z99He laptop
  ALSA: oxfw: Add hwdep interface
  ALSA: oxfw: Add support for capture/playback MIDI messages
  ALSA: oxfw: add support for capturing PCM samples
  ALSA: oxfw: Add support AMDTP in-stream
  ALSA: oxfw: Add support for Behringer/Mackie devices
  ALSA: oxfw: Change the way to start stream
  ALSA: oxfw: Add proc interface for debugging purpose
  ALSA: oxfw: Change the way to make PCM rules/constraints
  ALSA: oxfw: Add support for AV/C stream format command to get/set supported stream formation
  ALSA: oxfw: Change the way to name card
  ALSA: dice: Add support for MIDI capture/playback
  ALSA: dice: Add support for capturing PCM samples
  ALSA: dice: Support for non SYT-Match sampling clock source mode
  ALSA: dice: Add support for duplex streams with synchronization
  ALSA: dice: Change the way to start stream
  ALSA: jack: Add dummy snd_jack_set_key() definition
  ...
2014-12-11 13:20:50 -08:00
Linus Torvalds 2183a58803 media updates for v3.19-rc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUhxhbAAoJEAhfPr2O5OEV4JwP/2I7D2KGz5tdNGDAh1H8+swR
 hoj3tX7HLhwBmF6XIUlMYbk5L/ClDace6kcjT6OjwJ9SktrrKks6ZSsYsBjCIyOC
 yS7xNQArUKzWk4vV+uJVAvtF8V57LLFul8dhHk0JJwAxrkWnPvDdfJNs4PhUAkgn
 1i0PPshNo5Ow/+4YMiOjEDR+q9TMSUUzaq5zkPF7AFCnykuJ1wUJwUE0qjTfGi+4
 gl1yMye0TEawTYSM8h/+Lh7wosNFZYcXg85r04A6a8h6GLgg0h6KSOJjyPITmQ+j
 hLdtyiYs8a6XT+Y8o416zxpbSozo7KXCUTtet/N5g+lgQMqZqSd9WxE52SOY+kfd
 UVeob0VfWR0xdDzaJp5rLQ/MQ16RTHaHppgUidFxxGe9D5f9JM/88I0OfwNzl4uO
 cv2cyeNktHH6bcjfOGqxSVmZWgAm6q6qU7MN07PoN+5TcUlYTAOi1WLE5K+7HGgw
 CxzOZ61oxi/OO1FapaVoipq6ycjltTql2kbcARvmrRrbge0ocAqHxHqFyUbDDhNw
 Wn/O6VzLfpW0vGTacC6+xcUSpIhwajJ80UJAOqJP8sw0Xtmian5Lcs6gVzxwkOdU
 36Po4RRGFqsG6Sq3HR+toNwKt/nHNEFkJwYcNFHdvBiXTEYYkMe6MccUxxb3i/iI
 KxB1s51zVy9t3PqjP+3J
 =i7gx
 -----END PGP SIGNATURE-----

Merge tag 'media/v3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:
 - Two new dvb frontend drivers: mn88472 and mn88473
 - A new driver for some PCIe DVBSky cards
 - A new remote controller driver: meson-ir
 - One LIRC staging driver got rewritten and promoted to mainstream:
   igorplugusb
 - A new tuner driver (m88rs6000t)
 - The old omap2 media driver got removed from staging.  This driver
   uses an old DMA API and it is likely broken on recent kernels.
   Nobody cared enough to fix it
 - Media bus format moved to a separate header, as DRM will also use the
   definitions there
 - mem2mem_testdev were renamed to vim2m, in order to use the same
   naming convention taken by the other virtual test driver (vivid)
 - Added a new driver for coda SoC (coda-jpeg)
 - The cx88 driver got converted to use videobuf2 core
 - Make DMABUF export buffer to work with DMA Scatter/Gather and Vmalloc
   cores
 - Lots of other fixes, improvements and cleanups on the drivers.

* tag 'media/v3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (384 commits)
  [media] mn88473: One function call less in mn88473_init() after error
  [media] mn88473: Remove uneeded check before release_firmware()
  [media] lirc_zilog: Deletion of unnecessary checks before vfree()
  [media] MAINTAINERS: Add myself as img-ir maintainer
  [media] img-ir: Don't set driver's module owner
  [media] img-ir: Depend on METAG or MIPS or COMPILE_TEST
  [media] img-ir/hw: Drop [un]register_decoder declarations
  [media] img-ir/hw: Fix potential deadlock stopping timer
  [media] img-ir/hw: Always read data to clear buffer
  [media] redrat3: ensure dma is setup properly
  [media] ddbridge: remove unneeded check before dvb_unregister_device()
  [media] si2157: One function call less in si2157_init() after error
  [media] tuners: remove uneeded checks before release_firmware()
  [media] arm: omap2: rx51-peripherals: fix build warning
  [media] stv090x: add an extra protetion against buffer overflow
  [media] stv090x: Remove an unreachable code
  [media] stv090x: Some whitespace cleanups
  [media] em28xx: checkpatch cleanup: whitespaces/new lines cleanups
  [media] si2168: add support for firmware files in new format
  [media] si2168: debug printout for firmware version
  ...
2014-12-11 11:49:23 -08:00
Takashi Iwai 77de61c397 Merge branch 'for-next' into for-linus 2014-12-08 11:33:24 +01:00
Takashi Iwai 66139a48ce ALSA: usb-audio: Don't resubmit pending URBs at MIDI error recovery
In snd_usbmidi_error_timer(), the driver tries to resubmit MIDI input
URBs to reactivate the MIDI stream, but this causes the error when
some of URBs are still pending like:

 WARNING: CPU: 0 PID: 0 at ../drivers/usb/core/urb.c:339 usb_submit_urb+0x5f/0x70()
 URB ef705c40 submitted while active
 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.16.6-2-desktop #1
 Hardware name: FOXCONN TPS01/TPS01, BIOS 080015  03/23/2010
  c0984bfa f4009ed4 c078deaf f4009ee4 c024c884 c09a135c f4009f00 00000000
  c0984bfa 00000153 c061ac4f c061ac4f 00000009 00000001 ef705c40 e854d1c0
  f4009eec c024c8d3 00000009 f4009ee4 c09a135c f4009f00 f4009f04 c061ac4f
 Call Trace:
  [<c0205df6>] try_stack_unwind+0x156/0x170
  [<c020482a>] dump_trace+0x5a/0x1b0
  [<c0205e56>] show_trace_log_lvl+0x46/0x50
  [<c02049d1>] show_stack_log_lvl+0x51/0xe0
  [<c0205eb7>] show_stack+0x27/0x50
  [<c078deaf>] dump_stack+0x45/0x65
  [<c024c884>] warn_slowpath_common+0x84/0xa0
  [<c024c8d3>] warn_slowpath_fmt+0x33/0x40
  [<c061ac4f>] usb_submit_urb+0x5f/0x70
  [<f7974104>] snd_usbmidi_submit_urb+0x14/0x60 [snd_usbmidi_lib]
  [<f797483a>] snd_usbmidi_error_timer+0x6a/0xa0 [snd_usbmidi_lib]
  [<c02570c0>] call_timer_fn+0x30/0x130
  [<c0257442>] run_timer_softirq+0x1c2/0x260
  [<c0251493>] __do_softirq+0xc3/0x270
  [<c0204732>] do_softirq_own_stack+0x22/0x30
  [<c025186d>] irq_exit+0x8d/0xa0
  [<c0795228>] smp_apic_timer_interrupt+0x38/0x50
  [<c0794a3c>] apic_timer_interrupt+0x34/0x3c
  [<c0673d9e>] cpuidle_enter_state+0x3e/0xd0
  [<c028bb8d>] cpu_idle_loop+0x29d/0x3e0
  [<c028bd23>] cpu_startup_entry+0x53/0x60
  [<c0bfac1e>] start_kernel+0x415/0x41a

For avoiding these errors, check the pending URBs and skip
resubmitting such ones.

Reported-and-tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-06 21:35:38 +01:00
Panu Matilainen dacacb0aa0 ALSA: usb-audio: Add support for Zoom R16/24 capture and midi interfaces
This makes the midi interface and capture work out of the box with
R16 (and presumably R24 too but untested). Playback stream would also
seem to function fine except for one caveat: no sound is produced,
so it is disabled for now. Mixer descriptors are garbage and will
require further quirks to enable functionality, also disabled here.

Signed-off-by: Panu Matilainen <pmatilai@laiskiainen.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-01 17:38:03 +01:00
Takashi Iwai 5031466387 Merge branch 'for-linus' into for-next
The commit [7a2e9ddc: ALSA: usb-audio: Add native DSD support for
Denon/Marantz DACs] requires the new format definition that has
landed only in for-next branch.
2014-11-28 18:30:19 +01:00
Jurgen Kramer 6874daad4b ALSA: usb-audio: Add mode select quirk for Denon/Marantz DACs
Denon/Marantz USB DACs need a specific vendor command to switch between PCM and
DSD mode. This patch adds a new quirk function to switch between the two modes
using the specific USB vendor command.

This patch applies to the following devices:
- Marantz SA-14S1
- Marantz HD-DAC1

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-28 18:02:35 +01:00
Jurgen Kramer 7a2e9ddc90 ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs
This patch adds native DSD support for the following devices:
- Marantz SA-14S1
- Marants HD-DAC1

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-28 18:00:50 +01:00