]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
9 years agoALSA: asihpi: don't fail probe if adapter mode read fails
Eliot Blennerhassett [Thu, 20 Nov 2014 03:22:56 +0000 (16:22 +1300)]
ALSA: asihpi: don't fail probe if adapter mode read fails

Only determining if low latency mode is enabled. Failure
indicates adapter has no modes

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: Use standard printk helpers
Eliot Blennerhassett [Thu, 20 Nov 2014 03:22:55 +0000 (16:22 +1300)]
ALSA: asihpi: Use standard printk helpers

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: Turn off msg/resp logging after DSP has crashed.
Eliot Blennerhassett [Thu, 20 Nov 2014 03:22:54 +0000 (16:22 +1300)]
ALSA: asihpi: Turn off msg/resp logging after DSP has crashed.

Prevents spewing of useless messages if app keeps trying to
access the card.

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: Add support for stream interrupt.
Eliot Blennerhassett [Thu, 20 Nov 2014 03:22:53 +0000 (16:22 +1300)]
ALSA: asihpi: Add support for stream interrupt.

Some cards have a so-called low-latency mode, in which they present
a single multichannel stream with no mixing or samplerate conversion.
In this mode the card can generate an interrupt per internal processing
block (typically 32 or 64 frames)

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: Refactor control cache code.
Eliot Blennerhassett [Thu, 20 Nov 2014 03:22:52 +0000 (16:22 +1300)]
ALSA: asihpi: Refactor control cache code.

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: Use CONFIG_64BIT directly
Eliot Blennerhassett [Thu, 20 Nov 2014 03:22:51 +0000 (16:22 +1300)]
ALSA: asihpi: Use CONFIG_64BIT directly

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: Logging format improvements
Eliot Blennerhassett [Thu, 20 Nov 2014 03:22:50 +0000 (16:22 +1300)]
ALSA: asihpi: Logging format improvements

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: New I/O types - AVB & BLUlink, DAB Rf receiver
Eliot Blennerhassett [Thu, 20 Nov 2014 03:22:49 +0000 (16:22 +1300)]
ALSA: asihpi: New I/O types - AVB & BLUlink, DAB Rf receiver

Audio cards wth have AVB or BLU Link IO.
Tuner card with DAB receiver

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: asihpi: Minor string and dead code cleanup
Eliot Blennerhassett [Thu, 20 Nov 2014 03:22:48 +0000 (16:22 +1300)]
ALSA: asihpi: Minor string and dead code cleanup

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agosound: oss: uart401: remove unneeded NULL check
Dan Carpenter [Sat, 22 Nov 2014 18:29:01 +0000 (21:29 +0300)]
sound: oss: uart401: remove unneeded NULL check

"devc" can't be NULL here so there is no need to check.  Also I removed
the "devc = NULL" assignment because devc is stored on stack so it's
a no-op.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: sb: Deletion of unnecessary checks before two function calls
Markus Elfring [Fri, 21 Nov 2014 18:32:02 +0000 (19:32 +0100)]
ALSA: sb: Deletion of unnecessary checks before two function calls

The functions release_and_free_resource() and snd_util_memhdr_free() test
whether their argument is NULL and then return immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: es1688_lib: Deletion of an unnecessary check before the function call "release_...
Markus Elfring [Fri, 21 Nov 2014 18:05:50 +0000 (19:05 +0100)]
ALSA: es1688_lib: Deletion of an unnecessary check before the function call "release_and_free_resource"

The release_and_free_resource() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: core: Deletion of unnecessary checks before two function calls
Markus Elfring [Fri, 21 Nov 2014 17:34:48 +0000 (18:34 +0100)]
ALSA: core: Deletion of unnecessary checks before two function calls

The functions snd_seq_oss_timer_delete() and vunmap() perform also input
parameter validation. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/realtek - Supported HP mute Led for ALC286
Kailang Yang [Fri, 21 Nov 2014 07:49:11 +0000 (15:49 +0800)]
ALSA: hda/realtek - Supported HP mute Led for ALC286

New HP machine supported output mute led and input mute led.
ALC286:
GPIO1 to control output mute led.
GPIO5 to control input mute led.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/realtek - Clean up mute/mic GPIO LED handling
Takashi Iwai [Wed, 19 Nov 2014 11:16:14 +0000 (12:16 +0100)]
ALSA: hda/realtek - Clean up mute/mic GPIO LED handling

There are a few duplicated codes handling the mute and mic-mute LEDs
via GPIO pins.  Let's consolidate to single helpers.  Here we
introduced two new fields to alc_spec, gpio_mute_led_mask and
gpio_mic_led_mask, to contain the bit mask to set/clear.  Also,
mute_led_polarity is evaluated as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: fix kerneldoc errors
Takashi Sakamoto [Tue, 18 Nov 2014 14:59:40 +0000 (23:59 +0900)]
ALSA: firewire-lib: fix kerneldoc errors

Complete missing parameters, correct wrong reference, and add an explaination
about the differences between the latest specification and our implementation.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: powermac: Deletion of an unnecessary check before the function call "pci_dev_put"
Markus Elfring [Mon, 17 Nov 2014 12:35:54 +0000 (13:35 +0100)]
ALSA: powermac: Deletion of an unnecessary check before the function call "pci_dev_put"

The pci_dev_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hdsp: Deletion of an unnecessary check before the function call "release_firmware"
Markus Elfring [Mon, 17 Nov 2014 12:04:14 +0000 (13:04 +0100)]
ALSA: hdsp: Deletion of an unnecessary check before the function call "release_firmware"

The release_firmware() function tests whether its argument is NULL and then
return immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: lola: Deletion of an unnecessary check before the function call "vfree"
Markus Elfring [Mon, 17 Nov 2014 11:42:16 +0000 (12:42 +0100)]
ALSA: lola: Deletion of an unnecessary check before the function call "vfree"

The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ice17xx: Deletion of unnecessary checks before the function call "snd_ac97_resume"
Markus Elfring [Mon, 17 Nov 2014 10:28:02 +0000 (11:28 +0100)]
ALSA: ice17xx: Deletion of unnecessary checks before the function call "snd_ac97_resume"

The snd_ac97_resume() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda: Deletion of unnecessary checks before two function calls
Markus Elfring [Mon, 17 Nov 2014 09:44:33 +0000 (10:44 +0100)]
ALSA: hda: Deletion of unnecessary checks before two function calls

The functions kfree() and release_firmware() test whether their argument
is NULL and then return immediately. Thus the test around the call
is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ice1712: consider error value
Sudip Mukherjee [Fri, 14 Nov 2014 12:42:21 +0000 (18:12 +0530)]
ALSA: ice1712: consider error value

earlier we were ignoring the return value of snd_ak4114_create and
always returning 0.
now we are returning the actual status. revo_init is calling this
function, and revo_init is checking the return value.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ice1712: remove unused variable
Sudip Mukherjee [Fri, 14 Nov 2014 10:39:07 +0000 (16:09 +0530)]
ALSA: ice1712: remove unused variable

buf_size was initialized with snd_pcm_lib_buffer_bytes,
but never used. and so it is safe to be deleted.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ice1712: remove unneeded return statement
Sudip Mukherjee [Fri, 14 Nov 2014 10:39:05 +0000 (16:09 +0530)]
ALSA: ice1712: remove unneeded return statement

the functions:
        snd_ice1712_akm4xxx_build_controls
        snd_ice1712_build_pro_mixer
        snd_ctl_add
        snd_ak4114_build
        prodigy192_ak4114_init
        snd_ak4113_build
are all returning either 0 or a negetive error value.
so we can easily remove the check for a negative value and return
the value instead.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: 6fire: Convert byte_rev_table uses to bitrev8
Joe Perches [Tue, 28 Oct 2014 21:22:49 +0000 (14:22 -0700)]
ALSA: 6fire: Convert byte_rev_table uses to bitrev8

Use the inline function instead of directly indexing the array.

This allows some architectures with hardware instructions
for bit reversals to eliminate the array.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20
Chris J Arges [Wed, 12 Nov 2014 18:07:02 +0000 (12:07 -0600)]
ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20

This code contains the Scarlett mixer interface code that was originally
written by Tobias Hoffman and Robin Gareus. Because the device doesn't
properly implement UAC2 this code adds a mixer quirk for the device.

Changes from the original code include removing the metering code along with
dead code and comments. Compiler warnings were fixed. The code to initialize
the sampling rate was causing a crash this was fixed as discussed on the
mailing list. Error, and info messages were convered to dev_err and dev_info
interfaces. The custom scarlett_mixer_elem_info struct was replaced with the
more generic usb_mixer_elem_info to be able to recycle more code from mixer.c.

This patch also makes additional modifications based on upstream comments.
Individual control creation functions are removed and a generic
function is no used. Macros for function calls are removed to improve
readability. Hardcoded control initialization is removed. Save to HW
functionality has been removed. Strings for enums are created dynamically for
the mixer. Strings used for controls are now SNDRV_CTL_ELEM_ID_NAME_MAXLEN
length.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: make set_*_mix_values functions public
Chris J Arges [Wed, 12 Nov 2014 18:07:01 +0000 (12:07 -0600)]
ALSA: usb-audio: make set_*_mix_values functions public

Make the functions set_cur_mix_value and get_cur_mix_value accessible by files
that include mixer.h. In addition make usb_mixer_elem_free accessible.
This allows reuse of these functions by mixers that may require quirks.

The following summarizes the renamed functions:
  - set_cur_mix_value -> snd_usb_set_cur_mix_value
  - get_cur_mix_value -> snd_usb_get_cur_mix_value
  - usb_mixer_elem_free -> snd_usb_mixer_elem_free

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Add private_data pointer to usb_mixer_elem_info
Chris J Arges [Wed, 12 Nov 2014 18:07:00 +0000 (12:07 -0600)]
ALSA: usb-audio: Add private_data pointer to usb_mixer_elem_info

Add a private_data pointer to usb_mixer_elem_info to allow other mixer
implementations to extend the structure as necessary.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoRevert "ALSA: usb-audio: Add quirk for Focusrite Scarlett
Chris J Arges [Wed, 12 Nov 2014 18:06:59 +0000 (12:06 -0600)]
Revert "ALSA: usb-audio: Add quirk for Focusrite Scarlett

This reverts commit 1762a59d8e8b5e99f6f4a0f292b40f3cacb108ba.

This quirk is not needed because support for the Scarlett mixers will be added.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Add duplex mode for Digidesign Mbox 1 and enable mixer
Damien Zammit [Tue, 11 Nov 2014 14:09:55 +0000 (01:09 +1100)]
ALSA: usb-audio: Add duplex mode for Digidesign Mbox 1 and enable mixer

This patch provides duplex support for the Digidesign Mbox 1 sound
card and has been a work in progress for about a year.
Users have confirmed on my website that previous versions of this patch
have worked on the hardware and I have been testing extensively.

It also enables the mixer control for providing clock source
selector based on the previous patch.
The sample rate has been hardcoded to 48kHz because it works better with
the S/PDIF sync mode when the sample rate is locked.  This is the
highest rate that the device supports and no loss of functionality
is observed by restricting the sample rate apart from the inability to selec
a lower rate.

Signed-off-by: Damien Zammit <damien@zamaudio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Add mixer control for Digidesign Mbox 1 clock source
Damien Zammit [Tue, 11 Nov 2014 14:09:54 +0000 (01:09 +1100)]
ALSA: usb-audio: Add mixer control for Digidesign Mbox 1 clock source

This patch provides the infrastructure for the Digidesign Mbox 1
to have a mixer control for selecting the clock source.
Valid options are Internal and S/PDIF external sync.
A non-documented command is sent to the device to enable this feature
found by reverse engineering and bus snooping.

Signed-off-by: Damien Zammit <damien@zamaudio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: Fix invalid kerneldoc markers
Takashi Iwai [Mon, 10 Nov 2014 16:24:26 +0000 (17:24 +0100)]
ALSA: Fix invalid kerneldoc markers

They are no real kerneldoc comments, so drop such markers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: mixart: Fix kerneldoc comments
Takashi Iwai [Mon, 10 Nov 2014 16:09:22 +0000 (17:09 +0100)]
ALSA: mixart: Fix kerneldoc comments

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix kerneldoc errors in patch_ca0132.c
Takashi Iwai [Mon, 10 Nov 2014 15:47:26 +0000 (16:47 +0100)]
ALSA: hda - Fix kerneldoc errors in patch_ca0132.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: vx: Fix missing kerneldoc parameter descriptions
Takashi Iwai [Mon, 10 Nov 2014 15:46:35 +0000 (16:46 +0100)]
ALSA: vx: Fix missing kerneldoc parameter descriptions

The file isn't processed, but it's not bad to fix beforehand.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Fix Oops by composite quirk enhancement
Takashi Iwai [Mon, 10 Nov 2014 06:41:59 +0000 (07:41 +0100)]
ALSA: usb-audio: Fix Oops by composite quirk enhancement

The quirk argument itself was used as iterator, so it cannot be taken
back to the original value, obviously.

Fixes: d4b8fc66f770 ('ALSA: usb-audio: Allow multiple entries for the same iface in composite quirk')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: Fix document for snd_pcm_stop_xrun()
Takashi Iwai [Mon, 10 Nov 2014 06:38:22 +0000 (07:38 +0100)]
ALSA: pcm: Fix document for snd_pcm_stop_xrun()

Fix a copy & paste error:
 Warning(sound/core/pcm_native.c:1112): Excess function parameter 'state' description in 'snd_pcm_stop_xrun'

The state argument was dropped from snd_pcm_stop_xrun().

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Allow multiple entries for the same iface in composite quirk
Takashi Iwai [Sun, 9 Nov 2014 17:21:23 +0000 (18:21 +0100)]
ALSA: usb-audio: Allow multiple entries for the same iface in composite quirk

Currently the composite quirk doesn't work when multiple entries are
assigned to the same interface because it marks the interface as
claimed then checks whether the interface has been already claimed for
the secondary entry.  But, if you look at the code, you'll notice that
multiple entries are allowed if the entry is the current interface;
i.e. the current behavior is anyway inconsistent, and this is an
unintended shortcoming.

This patch fixes the problem by marking the relevant interfaces as
claimed after applying the all composite entries.  This fix will be
needed for the upcoming enhancements for Digidesign Mbox 1 quirks.

Reviewed-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: Add snd_pcm_stop_xrun() helper
Takashi Iwai [Fri, 7 Nov 2014 16:08:28 +0000 (17:08 +0100)]
ALSA: pcm: Add snd_pcm_stop_xrun() helper

Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
existing open codes with this helper.

The function checks the PCM running state to prevent setting the wrong
state, too, for more safety.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: snd_ctl_activate_id(): Fix index look-up
Lars-Peter Clausen [Fri, 7 Nov 2014 13:12:34 +0000 (14:12 +0100)]
ALSA: snd_ctl_activate_id(): Fix index look-up

We want to know the offset for the id that was passed to the function, not
the offset of the first id of the control (which is always 0).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: usb-audio: Trigger PCM XRUN at XRUN
Takashi Iwai [Thu, 6 Nov 2014 12:04:49 +0000 (13:04 +0100)]
ALSA: usb-audio: Trigger PCM XRUN at XRUN

The usb-audio driver detects XRUN at its complete callback, but the
actual code to trigger PCM XRUN is commented out because it caused
deadlock in the past.  This patch revives the PCM trigger properly.
It resulted in more than just enabling snd_pcm_stop(), but it had to
deduce the PCM substream with proper NULL checks and holds the stream
lock around the call.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: Update the state properly before notification
Takashi Iwai [Thu, 6 Nov 2014 11:15:25 +0000 (12:15 +0100)]
ALSA: pcm: Update the state properly before notification

Some state changes (e.g. snd_pcm_stop()) sets the runtime state after
calling snd_timer_notify().  This is basically racy, since the
notification may wakes up the user even before the state change.
Although the possibility is low, we should set the state before the
notifications.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Wed, 5 Nov 2014 14:37:22 +0000 (15:37 +0100)]
Merge branch 'for-linus' into for-next

This merges the USB-audio disconnect fix and resolves the conflicts
so that we can continue working on development of usb-audio stuff.

Conflicts:
sound/usb/card.c

10 years agoALSA: usb-audio: Fix device_del() sysfs warnings at disconnect
Takashi Iwai [Wed, 5 Nov 2014 14:08:49 +0000 (15:08 +0100)]
ALSA: usb-audio: Fix device_del() sysfs warnings at disconnect

Some USB-audio devices show weird sysfs warnings at disconnecting the
devices, e.g.
 usb 1-3: USB disconnect, device number 3
 ------------[ cut here ]------------
 WARNING: CPU: 0 PID: 973 at fs/sysfs/group.c:216 device_del+0x39/0x180()
 sysfs group ffffffff8183df40 not found for kobject 'midiC1D0'
 Call Trace:
  [<ffffffff814a3e38>] ? dump_stack+0x49/0x71
  [<ffffffff8103cb72>] ? warn_slowpath_common+0x82/0xb0
  [<ffffffff8103cc55>] ? warn_slowpath_fmt+0x45/0x50
  [<ffffffff813521e9>] ? device_del+0x39/0x180
  [<ffffffff81352339>] ? device_unregister+0x9/0x20
  [<ffffffff81352384>] ? device_destroy+0x34/0x40
  [<ffffffffa00ba29f>] ? snd_unregister_device+0x7f/0xd0 [snd]
  [<ffffffffa025124e>] ? snd_rawmidi_dev_disconnect+0xce/0x100 [snd_rawmidi]
  [<ffffffffa00c0192>] ? snd_device_disconnect+0x62/0x90 [snd]
  [<ffffffffa00c025c>] ? snd_device_disconnect_all+0x3c/0x60 [snd]
  [<ffffffffa00bb574>] ? snd_card_disconnect+0x124/0x1a0 [snd]
  [<ffffffffa02e54e8>] ? usb_audio_disconnect+0x88/0x1c0 [snd_usb_audio]
  [<ffffffffa015260e>] ? usb_unbind_interface+0x5e/0x1b0 [usbcore]
  [<ffffffff813553e9>] ? __device_release_driver+0x79/0xf0
  [<ffffffff81355485>] ? device_release_driver+0x25/0x40
  [<ffffffff81354e11>] ? bus_remove_device+0xf1/0x130
  [<ffffffff813522b9>] ? device_del+0x109/0x180
  [<ffffffffa01501d5>] ? usb_disable_device+0x95/0x1f0 [usbcore]
  [<ffffffffa014634f>] ? usb_disconnect+0x8f/0x190 [usbcore]
  [<ffffffffa0149179>] ? hub_thread+0x539/0x13a0 [usbcore]
  [<ffffffff810669f5>] ? sched_clock_local+0x15/0x80
  [<ffffffff81066c98>] ? sched_clock_cpu+0xb8/0xd0
  [<ffffffff81070730>] ? bit_waitqueue+0xb0/0xb0
  [<ffffffffa0148c40>] ? usb_port_resume+0x430/0x430 [usbcore]
  [<ffffffffa0148c40>] ? usb_port_resume+0x430/0x430 [usbcore]
  [<ffffffff8105973e>] ? kthread+0xce/0xf0
  [<ffffffff81059670>] ? kthread_create_on_node+0x1c0/0x1c0
  [<ffffffff814a8b7c>] ? ret_from_fork+0x7c/0xb0
  [<ffffffff81059670>] ? kthread_create_on_node+0x1c0/0x1c0
 ---[ end trace 40b1928d1136b91e ]---

This comes from the fact that usb-audio driver may receive the
disconnect callback multiple times, per each usb interface.  When a
device has both audio and midi interfaces, it gets called twice, and
currently the driver tries to release resources at the last call.
At this point, the first parent interface has been already deleted,
thus deleting a child of the first parent hits such a warning.

For fixing this problem, we need to call snd_card_disconnect() and
cancel pending operations at the very first disconnect while the
release of the whole objects waits until the last disconnect call.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80931
Reported-and-tested-by: Tomas Gayoso <tgayoso@gmail.com>
Reported-and-tested-by: Chris J Arges <chris.j.arges@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: echoaudio: cleanup of unnecessary messages
Sudip Mukherjee [Wed, 5 Nov 2014 14:21:56 +0000 (19:51 +0530)]
ALSA: echoaudio: cleanup of unnecessary messages

commit "b5b4a41b392960010fccf1f9ccf8334d612bd450" was dereferencing
chip after it has been freed. This patch fixes that and at the same
time removes some debugging messages, which are unnecessary, as they
are just printing information about entry and exit from a function,
and which switch-case it is executing.
we can easily get from ftrace the information about the entry and exit
from a function.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'topic/pcm-locking' into for-next
Takashi Iwai [Wed, 5 Nov 2014 10:34:36 +0000 (11:34 +0100)]
Merge branch 'topic/pcm-locking' into for-next

here is a small series of patches for cleaning up / enhancing the
PCM core stuff.

10 years agoALSA: hda - fix mute led problem for three HP laptops
Hui Wang [Wed, 5 Nov 2014 04:17:58 +0000 (12:17 +0800)]
ALSA: hda - fix mute led problem for three HP laptops

Without the fix, the mute led can't work on these three machines.

After apply this fix, these three machines will fall back on the led
control quirk as below, and through testing, the mute led works very
well.
PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED,
            ALC282_STANDARD_PINS,
            {0x12, 0x90a60140},
            ...

BugLink: https://bugs.launchpad.net/bugs/1389497
Tested-by: TieFu Chen <tienfu.chen@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: usb-audio: Use strim() instead of open code
Takashi Iwai [Fri, 31 Oct 2014 10:32:19 +0000 (11:32 +0100)]
ALSA: usb-audio: Use strim() instead of open code

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: usb-audio: Pass direct struct pointer instead of list_head
Takashi Iwai [Fri, 31 Oct 2014 10:24:32 +0000 (11:24 +0100)]
ALSA: usb-audio: Pass direct struct pointer instead of list_head

Some functions in mixer.c and endpoint.c receive list_head instead of
the object itself.  This is not obvious and rather error-prone.  Let's
pass the proper object directly instead.

The functions in midi.c still receive list_head and this can't be
changed since the object definition isn't exposed to the outside of
midi.c, so left as is.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: usb-audio: Flatten probe and disconnect functions
Takashi Iwai [Fri, 31 Oct 2014 10:00:23 +0000 (11:00 +0100)]
ALSA: usb-audio: Flatten probe and disconnect functions

The usb-audio probe and disconnect functions have been split just for
adapting the (new!) API at 2.5 kernel time.  We left them until now,
partly because we wanted to build with the pretty old kernels in the
external alsa-driver tree.  But the support of such old kernels has
been longly stopped, so it's good time to clean up this mess.

One good point by this cleanup is that now the probe function returns
a proper error code instead of only -EIO.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: Add xrun_injection proc entry
Takashi Iwai [Tue, 4 Nov 2014 13:02:40 +0000 (14:02 +0100)]
ALSA: pcm: Add xrun_injection proc entry

This patch adds a new proc entry for PCM substreams to inject an
XRUN.  When a PCM substream is running and any value is written to its
xrun_injection proc file, the driver triggers XRUN.  This is a useful
feature for debugging XRUN and error handling code paths.

Note that this entry is enabled only when CONFIG_SND_PCM_XRUN_DEBUG is
set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: Replace PCM hwptr tracking with tracepoints
Takashi Iwai [Tue, 4 Nov 2014 11:45:59 +0000 (12:45 +0100)]
ALSA: pcm: Replace PCM hwptr tracking with tracepoints

ALSA PCM core has a mechanism tracking the PCM hwptr updates for
analyzing XRUNs.  But its log is limited (up to 10) and its log output
is a kernel message, which is hard to handle.

In this patch, the hwptr logging is moved to the tracing
infrastructure instead of its own.  Not only the hwptr updates but
also XRUN and hwptr errors are recorded on the trace log, so that user
can see such events at the exact timing.

The new "snd_pcm" entry will appear in the tracing events:
  # ls -F /sys/kernel/debug/tracing/events/snd_pcm
  enable  filter  hw_ptr_error/  hwptr/  xrun/

The hwptr is for the regular hwptr update events.  An event trace
looks like:

  aplay-26187 [004] d..3  4012.834761: hwptr: pcmC0D0p/sub0: POS: pos=488, old=0, base=0, period=1024, buf=16384

"POS" shows the hwptr update by the explicit position update call and
"IRQ" means the hwptr update by the interrupt,
i.e. snd_pcm_period_elapsed() call.  The "pos" is the passed
ring-buffer offset by the caller, "old" is the previous hwptr, "base"
is the hwptr base position, "period" and "buf" are period- and
buffer-size of the target PCM substream.
(Note that the hwptr position displayed here isn't the ring-buffer
 offset.  It increments up to the PCM position boundary.)

The XRUN event appears similarly, but without "pos" field.
The hwptr error events appear with the PCM identifier and its reason
string, such as "Lost interrupt?".

The XRUN and hwptr error reports on kernel message are still left, can
be turned on/off via xrun_debug proc like before.  But the bit 3, 4, 5
and 6 bits of xrun_debug proc are dropped by this patch.  Also, along
with the change, the message strings have been reformatted to be a bit
more consistent.

Last but not least, the hwptr reporting is enabled only when
CONFIG_SND_PCM_XRUN_DEBUG is set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: Correct PCM BUG error message
Takashi Iwai [Tue, 4 Nov 2014 12:57:15 +0000 (13:57 +0100)]
ALSA: pcm: Correct PCM BUG error message

While converting to dev_*(), the message showing the invalid PCM
position was wrongly tagged as if an XRUN although it's actually a
BUG.  This patch corrects the message again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: es18xx: Add GPO controls
Ondrej Zary [Mon, 3 Nov 2014 20:35:48 +0000 (21:35 +0100)]
ALSA: es18xx: Add GPO controls

Add GPO0 and GPO1 (General Purpose Outputs) controls to mixer.
These can be used on some cards to control amplifier mute (seen in ES1868
datasheet) or additional onboard chips such as QX2130 QXpander processor.

These GPOs are present on ES1868, ES1869, ES1887 and ES1888 chips.

Tested on ES1868 with QX2130.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: emu10k1: Deletion of unnecessary checks before three function calls
Markus Elfring [Mon, 3 Nov 2014 13:54:36 +0000 (14:54 +0100)]
ALSA: emu10k1: Deletion of unnecessary checks before three function calls

The functions kfree(), release_firmware() and snd_util_memhdr_free() test
whether their argument is NULL and then return immediately. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: echoaudio: remove all snd_printk
Sudip Mukherjee [Mon, 3 Nov 2014 10:34:13 +0000 (16:04 +0530)]
ALSA: echoaudio: remove all snd_printk

removed all references of snd_printk with the standard dev_* macro.

[a few places degraded to dev_dbg(), too -- tiwai]

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: echoaudio: add reference of struct echoaudio
Sudip Mukherjee [Mon, 3 Nov 2014 10:34:12 +0000 (16:04 +0530)]
ALSA: echoaudio: add reference of struct echoaudio

added reference of struct echoaudio to free_firmware function.
this structure will be later used to get a reference of the card
when converting snd_printk to dev_* in the next patch of the series.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: Refactoring snd_pcm_action()
Takashi Iwai [Fri, 31 Oct 2014 14:19:36 +0000 (15:19 +0100)]
ALSA: pcm: Refactoring snd_pcm_action()

Just a small code refactoring to reduce more lines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: Simplify snd_pcm_action_lock_irq()
Takashi Iwai [Fri, 31 Oct 2014 13:45:04 +0000 (14:45 +0100)]
ALSA: pcm: Simplify snd_pcm_action_lock_irq()

The function snd_pcm_action_lock_irq() can be much simplified by
simply wrapping snd_pcm_action() with the stream lock.  This was
rather the original idea, but later it was open coded for
optimization.  However, looking at the optimization part closely, one
notices that the probability of the optimized path is quite low; in
normal situations, the linked stream action happens only for the
triggered substream, thus the operation becomes identical.  So the
code simplification has a clear win, especially because we have now
doubly codes for both atomic and non-atomic locks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'topic/kerneldoc' into for-next
Takashi Iwai [Fri, 31 Oct 2014 08:31:06 +0000 (09:31 +0100)]
Merge branch 'topic/kerneldoc' into for-next

10 years agoALSA: doc: Fix missing "I" for kerneldoc inclusion
Takashi Iwai [Thu, 30 Oct 2014 14:37:37 +0000 (15:37 +0100)]
ALSA: doc: Fix missing "I" for kerneldoc inclusion

Fixes: 90446d0746c3 ('ALSA: doc: Add missing headers and compress stuff to alsa-driver-api.tmpl')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: doc: More kerneldoc comments on core components
Takashi Iwai [Thu, 30 Oct 2014 14:19:43 +0000 (15:19 +0100)]
ALSA: doc: More kerneldoc comments on core components

Some functions missed the proper kerneldoc comments.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: Convert params_*() with static inline functions
Takashi Iwai [Thu, 30 Oct 2014 14:06:13 +0000 (15:06 +0100)]
ALSA: pcm: Convert params_*() with static inline functions

... and add proper kerneldoc comments.
There is no big reason to keep them as macros.  Static inline
functions are safer in general, and suitable for kerneldoc, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: More kerneldoc updates
Takashi Iwai [Thu, 30 Oct 2014 14:02:50 +0000 (15:02 +0100)]
ALSA: pcm: More kerneldoc updates

Add proper kerneldoc comments to the exported functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: Use static inline for snd_pcm_lib_alloc_vmalloc_buffer()
Takashi Iwai [Thu, 30 Oct 2014 12:45:58 +0000 (13:45 +0100)]
ALSA: pcm: Use static inline for snd_pcm_lib_alloc_vmalloc_buffer()

... instead of #if 0 hack.  It's more straightforward and obvious.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: control: Add missing kerneldoc comments to exported functions
Takashi Iwai [Thu, 30 Oct 2014 12:44:34 +0000 (13:44 +0100)]
ALSA: control: Add missing kerneldoc comments to exported functions

A few functions have no proper documentation yet, so let's add them.
Along with it, remove superfluous blank line between the closing brace
and EXPORT_SYMBOL() line.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: doc: Add ASoC codes into API documentation
Takashi Iwai [Thu, 30 Oct 2014 11:44:00 +0000 (12:44 +0100)]
ALSA: doc: Add ASoC codes into API documentation

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add kerneldoc comments to hda_generic.c
Takashi Iwai [Thu, 30 Oct 2014 11:04:50 +0000 (12:04 +0100)]
ALSA: hda - Add kerneldoc comments to hda_generic.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda/realtek - Update Initial AMP for EAPD control
Kailang Yang [Wed, 29 Oct 2014 08:10:13 +0000 (16:10 +0800)]
ALSA: hda/realtek - Update Initial AMP for EAPD control

The default EAPD control uses verb command to control EAPD. Some codec
does not have verb command for EAPD. It needs to control by hidden
register.

This update will avoid wrong behavior for some codec.  This patch will
fix double setup for EAPD.  It just needs to turn on by one site for
verb command or hidden register controlled.

Detailed changes:
- alc889_coef_init() is replaced with alc_update_coef_idx() with a
  correct COEF value.
- for ALC262, ALC887 and ALC900, the EAPD setup via the hidden
  register is removed because this rather conflicts with the EAPD verb
  setup.
-  For ALC888-VC, also the hidden register access is removed in
  alc888_coef_init().
- Remove the dead #if 0 code for ALC267/ALC268.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - change three SSID quirks to one pin quirk
David Henningsson [Thu, 30 Oct 2014 07:26:02 +0000 (08:26 +0100)]
ALSA: hda - change three SSID quirks to one pin quirk

These three HP machines all have the same pin config, so we can
change it to a pin quirk.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Set GPIO 4 low for a few HP machines
David Henningsson [Thu, 30 Oct 2014 07:26:01 +0000 (08:26 +0100)]
ALSA: hda - Set GPIO 4 low for a few HP machines

These HP machines needs GPIO 4 low to enable the headphone amplifier.
In addition, we still need to control LEDs via vref and GPIO.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1387128
Tested-by: TienFu Chen <tienfu.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'topic/kerneldoc' into for-next
Takashi Iwai [Thu, 30 Oct 2014 07:05:12 +0000 (08:05 +0100)]
Merge branch 'topic/kerneldoc' into for-next

10 years agoALSA: es1968: Replace timeval with ktime_t
Tina Ruchandani [Wed, 29 Oct 2014 17:48:10 +0000 (10:48 -0700)]
ALSA: es1968: Replace timeval with ktime_t

es1968_measure_clock uses struct timeval, which on 32-bit systems will overflow
in 2038, leading to incorrect interpretation of time.This patch changes the
function to use ktime_t instead of struct timeval, which implies:
- no y2038: ktime_t uses a 64-bit datatype explicitly.
- efficent subtraction: The earlier version computes the difference in usecs
  while dealing with secs and nsecs. It requires checks to see if the nsecs of
  stop is less than start. This patch uses a direct subtract of ktime_t and
  converts to usecs.
- use of monotonic clock (ktime_get) over real time (do_gettimeofday),
  which simplifies timekeeping, as it does not have to deal with cases
  where stop_time is less than start_time.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add ultra dock support for Thinkpad X240.
Lukas Bossard [Wed, 29 Oct 2014 17:31:07 +0000 (18:31 +0100)]
ALSA: hda - Add ultra dock support for Thinkpad X240.

Adding ultra doch support for Lenovo Thinkpad X240 (17aa:2214).
[Actually replaced the entry with ALC292_FIXUP_TPT440_DOCK -- tiwai]

Signed-off-by: Lukas Bossard <mr.bobukas@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add workaround for CMI8888 snoop behavior
Takashi Iwai [Wed, 29 Oct 2014 15:13:05 +0000 (16:13 +0100)]
ALSA: hda - Add workaround for CMI8888 snoop behavior

CMI8888 shows the stuttering playback when the snooping is disabled
on the audio buffer.  Meanwhile, we've got reports that CORB/RIRB
doesn't work in the snooped mode.  So, as a compromise, disable the
snoop only for CORB/RIRB and enable the snoop for the stream buffers.

The resultant patch became a bit ugly, unfortunately, but we still can
live with it.

Reported-and-tested-by: Geoffrey McRae <geoff@spacevs.com>
Cc: <stable@vger.kernel.org> # 3.17+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hdspm: remove unused variable
Sudip Mukherjee [Wed, 29 Oct 2014 14:39:45 +0000 (20:09 +0530)]
ALSA: hdspm: remove unused variable

removed the unused variables. These variables were only being
assigned some value, but the values were never being used.

it has been build tested after removing the variables.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - More kerneldoc comments
Takashi Iwai [Wed, 29 Oct 2014 15:03:58 +0000 (16:03 +0100)]
ALSA: hda - More kerneldoc comments

Put more kerneldoc comments to the exported functions.
Still the generic parser code and the HD-audio controller code aren't
covered yet, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Correct kerneldoc comments
Takashi Iwai [Wed, 29 Oct 2014 14:06:01 +0000 (15:06 +0100)]
ALSA: hda - Correct kerneldoc comments

Complete the missing parameters and fix anything wrong there.
Just comment changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: doc: Include uapi/sound/compress_*.h, too
Takashi Iwai [Wed, 29 Oct 2014 07:23:31 +0000 (08:23 +0100)]
ALSA: doc: Include uapi/sound/compress_*.h, too

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: doc: Fix uapi/sound/compress_offload.h kerneldoc comments
Takashi Iwai [Wed, 29 Oct 2014 07:22:05 +0000 (08:22 +0100)]
ALSA: doc: Fix uapi/sound/compress_offload.h kerneldoc comments

so that make htmldocs works properly.
Since kerneldoc can't handle noname enum properly, name enum
sndrv_compress_encoder.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: doc: Fix enum snd_jack_types comments
Takashi Iwai [Wed, 29 Oct 2014 07:20:46 +0000 (08:20 +0100)]
ALSA: doc: Fix enum snd_jack_types comments

Follow the proper kerneldoc rule, and complete enum item comments.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: au88x0: Kill the rest snd_print*()
Takashi Iwai [Tue, 28 Oct 2014 16:36:50 +0000 (17:36 +0100)]
ALSA: au88x0: Kill the rest snd_print*()

Use the standard dev_*() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcxhr: Kill the rest snd_print*()
Takashi Iwai [Tue, 28 Oct 2014 16:22:45 +0000 (17:22 +0100)]
ALSA: pcxhr: Kill the rest snd_print*()

Use the standard dev_*() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: ctxfi: Kill the rest snd_print*()
Takashi Iwai [Tue, 28 Oct 2014 16:16:51 +0000 (17:16 +0100)]
ALSA: ctxfi: Kill the rest snd_print*()

Use the standard dev_*() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: compress: fix documentation errors
Vinod Koul [Tue, 28 Oct 2014 15:55:13 +0000 (21:25 +0530)]
ALSA: compress: fix documentation errors

Some structure documentation was not right so fix it now

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: jack: Fix kerneldoc comments
Takashi Iwai [Tue, 28 Oct 2014 14:30:00 +0000 (15:30 +0100)]
ALSA: jack: Fix kerneldoc comments

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: doc: Add missing headers and compress stuff to alsa-driver-api.tmpl
Takashi Iwai [Tue, 28 Oct 2014 14:28:07 +0000 (15:28 +0100)]
ALSA: doc: Add missing headers and compress stuff to alsa-driver-api.tmpl

Some header files have kereldoc comments but are not referred
properly.  Let's add them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcxhr: convert timeval to ktime_t
Aya Mahfouz [Tue, 28 Oct 2014 12:27:44 +0000 (14:27 +0200)]
ALSA: pcxhr: convert timeval to ktime_t

This patch is concerned with migrating the time variables in the pcxhr
module found in the sound driver. The changes are concerend with the
y2038 problem where timeval will overflow in the year 2038. ktime_t
was used instead of timeval to get the wall time. The difference
is displayed now in nanoseconds instead of microseconds.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcm: Zero-clear reserved fields of PCM status ioctl in compat mode
Takashi Iwai [Tue, 28 Oct 2014 11:42:19 +0000 (12:42 +0100)]
ALSA: pcm: Zero-clear reserved fields of PCM status ioctl in compat mode

In compat mode, we copy each field of snd_pcm_status struct but don't
touch the reserved fields, and this leaves uninitialized values
there.  Meanwhile the native ioctl does zero-clear the whole
structure, so we should follow the same rule in compat mode, too.

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Pass printf argument directly to request_module()
Takashi Iwai [Mon, 27 Oct 2014 14:15:44 +0000 (15:15 +0100)]
ALSA: hda - Pass printf argument directly to request_module()

request_module() handles the printf style arguments, so we don't have
to render strings in the caller side.  Not only it reduces the
unnecessary temporary string buffer, it's even safer from the security
POV.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 27 Oct 2014 13:11:07 +0000 (14:11 +0100)]
Merge branch 'for-linus' into for-next

Merged upstream branch to make further fireworks development easier
(and avoid conflicts earlier).

Conflicts:
sound/firewire/bebob/bebob_focusrite.c

10 years agoALSA: bebob: Uninitialized id returned by saffirepro_both_clk_src_get
Christian Vogel [Sat, 25 Oct 2014 11:40:41 +0000 (13:40 +0200)]
ALSA: bebob: Uninitialized id returned by saffirepro_both_clk_src_get

snd_bebob_stream_check_internal_clock() may get an id from
saffirepro_both_clk_src_get (via clk_src->get()) that was uninitialized.

a) make logic in saffirepro_both_clk_src_get explicit
b) test if id used in snd_bebob_stream_check_internal_clock matches array size

[fixed missing signed prefix to *_maps[] by tiwai]

Signed-off-by: Christian Vogel <vogelchr@vogel.cx>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge tag 'asoc-v3.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 27 Oct 2014 11:52:29 +0000 (12:52 +0100)]
Merge tag 'asoc-v3.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.18

A few small driver fixes for v3.18 plus the removal of the s6000 support
since the relevant chip is no longer supported in mainline.

10 years agoMerge remote-tracking branches 'asoc/fix/adau1761', 'asoc/fix/fsl', 'asoc/fix/intel...
Mark Brown [Mon, 27 Oct 2014 11:17:41 +0000 (11:17 +0000)]
Merge remote-tracking branches 'asoc/fix/adau1761', 'asoc/fix/fsl', 'asoc/fix/intel', 'asoc/fix/s6000' and 'asoc/fix/sgtl5000' into asoc-linus

10 years agoALSA: hda/realtek - New SSID for Headset quirk
Kailang Yang [Mon, 27 Oct 2014 08:20:30 +0000 (16:20 +0800)]
ALSA: hda/realtek - New SSID for Headset quirk

It is lite version of AIO machine(0x0626).
The audio layout of this machine was similar with SSID 0x0626.
The audio was same as commit ad8ff99e6beb8708b0bdefd9d5658324e90200f0.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: ad1889: Fix probable mask then right shift defects
Joe Perches [Mon, 27 Oct 2014 05:25:07 +0000 (22:25 -0700)]
ALSA: ad1889: Fix probable mask then right shift defects

Precedence of & and >> is not the same and is not left to right.
shift has higher precedence and should be done after the mask.

Add parentheses around the mask.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: bebob: fix wrong decoding of clock information for Terratec PHASE 88 Rack FW
Takashi Sakamoto [Sun, 26 Oct 2014 13:49:45 +0000 (22:49 +0900)]
ALSA: bebob: fix wrong decoding of clock information for Terratec PHASE 88 Rack FW

Terratec PHASE 88 rack fw has two registers for source of clock, one is
for internal/external, and another is for wordclock/spdif for external.

When clock source is internal, information in another register has no meaning.
Thus it must be ignored, but current implementation decodes it. This causes
over-indexing reference to labels.

Reported-by: András Murányi <muranyia@gmail.com>
Tested-by: András Murányi <muranyia@gmail.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoLinux 3.18-rc2
Linus Torvalds [Sun, 26 Oct 2014 23:48:41 +0000 (16:48 -0700)]
Linux 3.18-rc2

10 years agoMerge tag 'armsoc-for-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Sun, 26 Oct 2014 18:35:51 +0000 (11:35 -0700)]
Merge tag 'armsoc-for-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Another week, another small batch of fixes.

  Most of these make zynq, socfpga and sunxi platforms work a bit
  better:

   - due to new requirements for regulators, DWMMC on socfpga broke past
     v3.17
   - SMP spinup fix for socfpga
   - a few DT fixes for zynq
   - another option (FIXED_REGULATOR) for sunxi is needed that used to
     be selected by other options but no longer is.
   - a couple of small DT fixes for at91
   - ...and a couple for i.MX"

* tag 'armsoc-for-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: dts: imx28-evk: Let i2c0 run at 100kHz
  ARM: i.MX6: Fix "emi" clock name typo
  ARM: multi_v7_defconfig: enable CONFIG_MMC_DW_ROCKCHIP
  ARM: sunxi_defconfig: enable CONFIG_REGULATOR_FIXED_VOLTAGE
  ARM: dts: socfpga: Add a 3.3V fixed regulator node
  ARM: dts: socfpga: Fix SD card detect
  ARM: dts: socfpga: rename gpio nodes
  ARM: at91/dt: sam9263: fix PLLB frequencies
  power: reset: at91-reset: fix power down register
  MAINTAINERS: add atmel ssc driver maintainer entry
  arm: socfpga: fix fetching cpu1start_addr for SMP
  ARM: zynq: DT: trivial: Fix mc node
  ARM: zynq: DT: Add cadence watchdog node
  ARM: zynq: DT: Add missing reference for memory-controller
  ARM: zynq: DT: Add missing reference for ADC
  ARM: zynq: DT: Add missing address for L2 pl310
  ARM: zynq: DT: Remove 222 MHz OPP
  ARM: zynq: DT: Fix GEM register area size

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sun, 26 Oct 2014 18:19:18 +0000 (11:19 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs updates from Al Viro:
 "overlayfs merge + leak fix for d_splice_alias() failure exits"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  overlayfs: embed middle into overlay_readdir_data
  overlayfs: embed root into overlay_readdir_data
  overlayfs: make ovl_cache_entry->name an array instead of pointer
  overlayfs: don't hold ->i_mutex over opening the real directory
  fix inode leaks on d_splice_alias() failure exits
  fs: limit filesystem stacking depth
  overlay: overlay filesystem documentation
  overlayfs: implement show_options
  overlayfs: add statfs support
  overlay filesystem
  shmem: support RENAME_WHITEOUT
  ext4: support RENAME_WHITEOUT
  vfs: add RENAME_WHITEOUT
  vfs: add whiteout support
  vfs: export check_sticky()
  vfs: introduce clone_private_mount()
  vfs: export __inode_permission() to modules
  vfs: export do_splice_direct() to modules
  vfs: add i_op->dentry_open()