]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
9 years agoALSA: hda - remove controller dependency on i915 power well for SKL
Libin Yang [Wed, 3 Jun 2015 01:30:15 +0000 (09:30 +0800)]
ALSA: hda - remove controller dependency on i915 power well for SKL

For SKL, only the HDMI codec is in the display power well while the
HD-A controller isn't. So the controller flag 'need_i915_power' is
not set to release the display power after probe, and the codec flag
'link_power_control' is set to request/release the display power via
bus link_power ops.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agosound/oss: use schedule_timeout_interruptible()
Nicholas Mc Guire [Fri, 29 May 2015 15:11:14 +0000 (17:11 +0200)]
sound/oss: use schedule_timeout_interruptible()

API consolidation with coccinelle found:
./sound/oss/msnd_pinnacle.c:1292:2-18:
        consolidation with schedule_timeout_*() recommended

This is a 1:1 conversion of the current calls to an available helper
only - so only an API consolidation to improve readability.

Patch was compile tested with x86_64_defconfig

Patch is against 4.1-rc5 (localversion-next is -next-20150529)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: jack: Fix the id uniqueness check
Takashi Iwai [Fri, 29 May 2015 12:06:32 +0000 (14:06 +0200)]
ALSA: jack: Fix the id uniqueness check

snd_kctl_jack_new() tries to assign a unique index number when a name
string that has been already registered is passed.  However, it checks
with the base string without "Jack" suffix, so it never hits.
Fix the call with the properly processed name string instead.

Fixes: b8dd086674cf 'ALSA: Jack: handle jack embedded kcontrol creating within ctljack')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ppc: keywest: check if DEQ was already instantiated
Wolfram Sang [Sat, 23 May 2015 16:15:11 +0000 (18:15 +0200)]
ALSA: ppc: keywest: check if DEQ was already instantiated

Due to changes in i2c-powermac, for some Macs the DEQ is instantiated
now in i2c-powermac while some need the instantiation here in the
keywest sound driver. The proper fix is to convert this driver to AOA.
Until then support both ways of instantiation. Before this patch, some
Macs lost sound because the sound driver failed when instantiating the
DEQ for the second time.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Tested-by: Dan DeVoto <dand1972@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Set patch_ops before calling auto-parser
Takashi Iwai [Fri, 29 May 2015 08:42:14 +0000 (10:42 +0200)]
ALSA: hda - Set patch_ops before calling auto-parser

... so that the parser code can overwrite some optional ops.  For
Realtek and others, it can be set solely in the spec allocator, so it
results in a good code cleanup, too.

With this change, we can finally remove the local stream_pm setup and
rely on the generic parser's automatic setting.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Fri, 29 May 2015 08:27:50 +0000 (10:27 +0200)]
Merge branch 'for-linus' into for-next

Merge back the latest HD-audio stuff for further development.

9 years agoALSA: hda - Fix lost sound due to stream_pm ops cleanup
Takashi Iwai [Fri, 29 May 2015 07:43:29 +0000 (09:43 +0200)]
ALSA: hda - Fix lost sound due to stream_pm ops cleanup

The commit [49fb18972581: ALSA: hda - Set stream_pm ops automatically
by generic parser] resulted in regressions on some Realtek and VIA
codecs because these drivers set patch_ops after calling the generic
parser, thus stream_pm got cleared to NULL again.  I haven't noticed
since I tested with IDT codec.

Restore (partial revert) the stream_pm ops for them to fix the
regression.

Fixes: 49fb18972581 ('ALSA: hda - Set stream_pm ops automatically by generic parser')
Reported-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 06:00:06 +0000 (08:00 +0200)]
ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS

The compiler can optimize the unused code away, so we can drop
ifdefs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: emux: Fix/cleanup old ifdef CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:58:11 +0000 (07:58 +0200)]
ALSA: emux: Fix/cleanup old ifdef CONFIG_PROC_FS

Build emux_proc.o and drop the unneeded ifdefs.
Replace the left CONFIG_PROC with the new CONFIG_SND_PROC_FS.

Along with this, fix the build of emux_oss.o in Makefile, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: emu10k1: Fix/cleanup ifdef CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:56:42 +0000 (07:56 +0200)]
ALSA: emu10k1: Fix/cleanup ifdef CONFIG_PROC_FS

Build emuproc.o conditionally and drop the unneeded ifdefs.
Some are replaced with the new CONFIG_SND_PROC_FS.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: cs46xx: Fix old ifdef CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:55:37 +0000 (07:55 +0200)]
ALSA: cs46xx: Fix old ifdef CONFIG_PROC_FS

Replaced with the new CONFIG_SND_PROC_FS.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ca0106: Fix/cleanup ifdef CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:53:52 +0000 (07:53 +0200)]
ALSA: ca0106: Fix/cleanup ifdef CONFIG_PROC_FS

Build ca0106_proc.o conditionally to drop unneeded ifdef.
Some are replaced with the new CONFIG_SND_PROC_FS.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ac97: Fix ifdef CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:52:43 +0000 (07:52 +0200)]
ALSA: ac97: Fix ifdef CONFIG_PROC_FS

Replaced with the new CONFIG_SND_PROC_FS.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ak4xxx-adda: Drop unnecessary ifdef CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:51:23 +0000 (07:51 +0200)]
ALSA: ak4xxx-adda: Drop unnecessary ifdef CONFIG_PROC_FS

The compiler can optimize it away if not needed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: opl4: Fix / cleanup ifdef CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:49:55 +0000 (07:49 +0200)]
ALSA: opl4: Fix / cleanup ifdef CONFIG_PROC_FS

Some are replaced with the new ifdef CONFIG_SND_PROC_FS.  Some are
removed by building opl4_proc.o conditionally.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: dummy: Replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:47:50 +0000 (07:47 +0200)]
ALSA: dummy: Replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

Although there shouldn't be a problem in practice (the compiler should
handle well), it's better to follow to the new Kconfig.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: aloop: Drop unnecessary ifdef CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:46:05 +0000 (07:46 +0200)]
ALSA: aloop: Drop unnecessary ifdef CONFIG_PROC_FS

Since the compiler can optimize away the unused code, we can reduce
the messy ifdef.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: core: Fix randconfig build wrt CONFIG_PROC_FS
Takashi Iwai [Fri, 29 May 2015 05:01:28 +0000 (07:01 +0200)]
ALSA: core: Fix randconfig build wrt CONFIG_PROC_FS

There are a few leftover CONFIG_PROC_FS forgotten to replace with
CONFIG_SND_PROC_FS.

Fixes: cd6a65036f0e ('ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS')
Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Drop unused fields from struct hda_codec_preset
Takashi Iwai [Thu, 28 May 2015 12:46:55 +0000 (14:46 +0200)]
ALSA: hda - Drop unused fields from struct hda_codec_preset

It's very unlikely that we'd need these fields out of sudden.
Let's drop them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Disable Headphone Mic boost for ALC662
David Henningsson [Thu, 28 May 2015 07:40:23 +0000 (09:40 +0200)]
ALSA: hda - Disable Headphone Mic boost for ALC662

When headphone mic boost is above zero, some 10 - 20 second delay
might occur before the headphone mic is operational.
Therefore disable the headphone mic boost control (recording gain is
sufficient even without it).

(Note: this patch is not about the headset mic, it's about the less
common mic-in only mode.)

BugLink: https://bugs.launchpad.net/bugs/1454235
Suggested-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS
Jie Yang [Wed, 27 May 2015 11:45:45 +0000 (19:45 +0800)]
ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

We may disable proc fs only for sound part, to reduce ALSA
memory footprint. So add CONFIG_SND_PROC_FS and replace the
old CONFIG_PROC_FSs in alsa code.

With sound proc fs disabled, we can save about 9KB memory
size on X86_64 platform.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: Kconfig: add config item SND_PROC_FS for expert
Jie Yang [Wed, 27 May 2015 11:45:44 +0000 (19:45 +0800)]
ALSA: Kconfig: add config item SND_PROC_FS for expert

For some embedded devices, we need reduce code size and data
footprint as much as possible, e.g. disabling procfs, hw/sw
params refinement, mmap, dpcm, dapm, compressed API...

Here add SND_PROC_FS item for expert, we can unselect it to
disable sound proc FS and reduce memory footprint.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Disable power_save_node for IDT92HD71bxx
Takashi Iwai [Wed, 27 May 2015 19:20:12 +0000 (21:20 +0200)]
ALSA: hda - Disable power_save_node for IDT92HD71bxx

We've got a regression report that 4.1-rc causes noises on a Dell
laptop.  Similar like Realtek codec, this seems also triggered by the
recent power_save_node feature.  As this kind of issue is quite hard
to debug without actual hardware, disable the power_save_node flag for
this codec as a workaround.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98971
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: fix buffer-over-run when detecting packet discontinuity
Takashi Sakamoto [Wed, 27 May 2015 15:02:59 +0000 (00:02 +0900)]
ALSA: firewire-lib: fix buffer-over-run when detecting packet discontinuity

When detecting packet discontinuity, handle_in_packet() returns minus value
and this value is assigned to unsigned int variable, then the variable has
huge value. As a result, the variable causes buffer-over-run in
handle_out_packet(). This brings invalid page request and system hangup.

This commit fixes the bug to add a new argument into handle_in_packet()
and the number of handled data blocks is assignd to it. The function
return value is just used to check error.

I also considered to change the type of local variable to 'int' in
in_stream_callback(). This idea is based on type-conversion in C standard,
while it may cause future problems when adding more works. Thus, I dropped
this idea.

Fixes: 6fc6b9ce41c6('ALSA: firewire-lib: pass the number of data blocks in incoming packets to outgoing packets')
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix noise on AMD radeon 290x controller
Takashi Iwai [Wed, 27 May 2015 14:17:19 +0000 (16:17 +0200)]
ALSA: hda - Fix noise on AMD radeon 290x controller

A new AMD controller [1002:aac8] seems to need the quirk for other AMD
NS HDMI stuff, otherwise it gives noisy sounds.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=99021
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Set stream_pm ops automatically by generic parser
Takashi Iwai [Wed, 27 May 2015 06:37:19 +0000 (08:37 +0200)]
ALSA: hda - Set stream_pm ops automatically by generic parser

This allows user to test power_save_node feature via sysfs or patch
firmware even on the codecs that don't specify it.  It'll also save a
few lines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agosound: sound_firmware: Fix invalid use of vfs_read()
Takashi Iwai [Tue, 26 May 2015 10:57:56 +0000 (12:57 +0200)]
sound: sound_firmware: Fix invalid use of vfs_read()

It should use kernel_read() instead of vfs_read() to load a firmware
binary onto the kernel pages.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bcd2000: Make local data static
Takashi Iwai [Tue, 26 May 2015 10:57:09 +0000 (12:57 +0200)]
ALSA: bcd2000: Make local data static

Spotted by sparse:
  sound/usb/bcd2000/bcd2000.c:73:1: warning: symbol 'devices_used' was not declared. Should it be static?

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: lx6464es: Use NULL for pointers
Takashi Iwai [Tue, 26 May 2015 10:56:21 +0000 (12:56 +0200)]
ALSA: lx6464es: Use NULL for pointers

Spotted by sparse:
  sound/pci/lx6464es/lx6464es.c:415:47: warning: Using plain integer as NULL pointer
  sound/pci/lx6464es/lx6464es.c:417:48: warning: Using plain integer as NULL pointer

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: lx6464es: Fix duplicated SSID entries
Takashi Iwai [Tue, 26 May 2015 10:52:54 +0000 (12:52 +0200)]
ALSA: lx6464es: Fix duplicated SSID entries

PCI_DEVICE() macro itself defines SSID entries while we override them
after that.  Replace with a more appropriate macro, PCI_DEVICE_SUB()
to define all ID values properly.

Spotted by sparse:
  sound/pci/lx6464es/lx6464es.c:60:11: warning: Initializer entry defined twice
  sound/pci/lx6464es/lx6464es.c:61:12:   also defined here
  sound/pci/lx6464es/lx6464es.c:64:11: warning: Initializer entry defined twice
  sound/pci/lx6464es/lx6464es.c:65:12:   also defined here

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: dummy: make local data static
Takashi Iwai [Tue, 26 May 2015 10:51:35 +0000 (12:51 +0200)]
ALSA: dummy: make local data static

Add missing prefix to make some local data static.

Spotted by sparse:
  sound/drivers/dummy.c:159:20: warning: symbol 'model_emu10k1' was not declared. Should it be static?
  sound/drivers/dummy.c:165:20: warning: symbol 'model_rme9652' was not declared. Should it be static?
  ....

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/realtek - Add ALC256 alias name for Dell
Kailang Yang [Mon, 25 May 2015 09:16:49 +0000 (17:16 +0800)]
ALSA: hda/realtek - Add ALC256 alias name for Dell

Add ALC3246 for Dell platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: bebob: add Digidesign Mbox 2 Pro support
Takashi Sakamoto [Sun, 24 May 2015 11:51:45 +0000 (20:51 +0900)]
ALSA: bebob: add Digidesign Mbox 2 Pro support

This device is based on DM1000E, and BeBoB version 1 firmware is
installed.

$ cat /proc/asound/cards
 0 [Pro            ]: BeBoB - Mbox 2 Pro
                      DIGIDESIGN Mbox 2 Pro (id:1, rev:1),
      GUID 00a07e0100a90000 at fw1.0, S400

$ cat /proc/asound/Pro/firewire/firmware
Manufacturer: bridgeCo
Protocol Ver: 1
Build Ver: 0
GUID: 0x00A07E0100A90000
Model ID: 0x01
Model Rev: 1
Firmware Date: 20071031
Firmware Time: 034402
Firmware ID: 0xA9
Firmware Ver: 16777215
Base Addr: 0x20080000
Max Size: 1572864
Loader Date: 20051207
Loader Time: 205554

With this patch, ALSA BeBoB driver can start packet streaming to/from
this model, while as a default, internal multiplexer of this model is
not initialized and generates no sound even if the driver transfers
any packets with PCM samples. To hear any sounds from this model,
userspace applications should be developed to set parameters to the
internal multiplexer. You can see raw information in FFADO website:
http://subversion.ffado.org/wiki/AvcModels/DigiDesignMboxPro2

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoRevert "ALSA: hda - Add mute-LED mode control to Thinkpad"
Takashi Iwai [Sun, 24 May 2015 06:27:52 +0000 (08:27 +0200)]
Revert "ALSA: hda - Add mute-LED mode control to Thinkpad"

This reverts commit 7290006d8c0900c56d8c58428134f02c35109d17.

Through the regression report, it was revealed that the
tpacpi_led_set() call to thinkpad_acpi helper doesn't only toggle the
mute LED but actually mutes the sound.  This is contradiction to the
expectation, and rather confuses user.

According to Henrique, it's not trivial to judge which TP model
behaves "LED-only" and which model does whatever more intrusive, as
Lenovo's implementations vary model by model.  So, from the safety
reason, we should revert the patch for now.

Reported-by: Martin Steigerwald <martin@lichtvoll.de>
Cc: Pali Rohár <pali.rohar@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Add quirk for MS LifeCam HD-3000
Vittorio G (VittGam) [Fri, 22 May 2015 19:15:19 +0000 (21:15 +0200)]
ALSA: usb-audio: Add quirk for MS LifeCam HD-3000

Microsoft LifeCam HD-3000 (045e:0779) needs a similar quirk for
suppressing the unsupported sample rate inquiry.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98481
Cc: <stable@vger.kernel.org>
Signed-off-by: Vittorio Gambaletta <linuxbugs@vittgam.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: use protocol error when detecting wrong value in CIP header
Takashi Sakamoto [Fri, 22 May 2015 14:21:14 +0000 (23:21 +0900)]
ALSA: firewire-lib: use protocol error when detecting wrong value in CIP header

When detecting zero in 'dbs' field of CIP header, this packet streaming
should be aborted because of avoiding division-by-zero. This is an error
in an aspect of IEC 61883-1, thus protocol error.

This commit use EPROTO instead of EIO. Actually, the returned value is
not used for userspace and this commit has no effect.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: use dev_err() when detecting incoming streaming error
Takashi Sakamoto [Fri, 22 May 2015 14:21:13 +0000 (23:21 +0900)]
ALSA: firewire-lib: use dev_err() when detecting incoming streaming error

When detecting invalid value in 'dbs' field of CIP header or packet
discontinuity, current implementation reports the status by err_info().
In most cases this state is caused by model-specific issue due to
vendor's customization and should be reported to developers.

This commit use dev_err() instead of dev_info() for this purpose.
In the cases, packet streaming is aborted, thus no message floading
occurs.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: macro arrangement for code cleanup
Takashi Sakamoto [Fri, 22 May 2015 14:21:12 +0000 (23:21 +0900)]
ALSA: firewire-lib: macro arrangement for code cleanup

Some macros include my misunderstanding for IEC 61883-1 or -6.
Additionally, some fixed values appear on codes.

This commit replaces these with macros with proper names.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: rename local functions for code cleanup
Takashi Sakamoto [Fri, 22 May 2015 14:21:11 +0000 (23:21 +0900)]
ALSA: firewire-lib: rename local functions for code cleanup

The naming rule for local functions was inconsistent. This commit
rename them with a consistent manner.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: remove restriction for non-blocking mode
Takashi Sakamoto [Fri, 22 May 2015 14:00:54 +0000 (23:00 +0900)]
ALSA: firewire-lib: remove restriction for non-blocking mode

Former patches allow non-blocking streams to synchronize with timestamp.
This patch removes the restriction.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: set streaming error outside of packetization
Takashi Sakamoto [Fri, 22 May 2015 14:00:53 +0000 (23:00 +0900)]
ALSA: firewire-lib: set streaming error outside of packetization

In previous commit, error handling for incoming packet processing is
outside of packetization. This is nice for reading the codes.

This commit applies this idea for outgoing packet processing, too.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: pass the number of data blocks in incoming packets to outgoing...
Takashi Sakamoto [Fri, 22 May 2015 14:00:52 +0000 (23:00 +0900)]
ALSA: firewire-lib: pass the number of data blocks in incoming packets to outgoing packets

Current implementation reuses the value of syt field in incoming packet to
outgoing packet for full duplex timestamp synchronization, while the number
of data blocks in outgoing packets refers to hard-coded table and the
synchronization cannot be applied to non-blocking stream.

This commit passes the number of data blocks from incoming packet
processing to outgoing packet processing for the synchronization. For
normal mode, isochronous callback handler is changed to generate the values
of syt and data blocks.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: simplify function to calculate the number of data blocks
Takashi Sakamoto [Fri, 22 May 2015 14:00:51 +0000 (23:00 +0900)]
ALSA: firewire-lib: simplify function to calculate the number of data blocks

This function is called according to conditions between the value of
syt and streaming mode(blocking or non-blocking).

To simplify caller's work, this commit push these conditions to the
function.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: firewire-lib: add buffer-over-run protection at receiving more data blocks...
Takashi Sakamoto [Fri, 22 May 2015 14:00:50 +0000 (23:00 +0900)]
ALSA: firewire-lib: add buffer-over-run protection at receiving more data blocks than expected

In IEC 61883-6, the number of data blocks in a packet is limited up to
the value of SYT_INTERVAL. Current implementation is compliant to the
limitation, while it can cause buffer-over-run when the value of dbs
field in received packet is illegally large.

This commit adds a validator to detect such illegal packets to prevent
the buffer-over-run. Actually, the buffer is aligned to the size of memory
 page, thus this issue hardly causes system errors due to the room to page
alignment, as long as a few packets includes such jumbo payload; i.e.
a packet to several received packets.

Here, Behringer F-Control Audio 202 (based on OXFW 960) has a quirk to
postpone transferring isochronous packet till finish handling any
asynchronous packets. In this case, this model is lazy, transfers no
packets according to several cycle-start packets. After finishing, this
model pushes required data in next isochronous packet. As a result, the
packet include more data blocks than IEC 61883-6 defines.

To continue to support this model, this commit adds a new flag to extend
the length of calculated payload. This flag allows the size of payload
5 times as large as IEC 61883-6 defines. As a result, packets from this
model passed the validator successfully.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge branch 'topic/hdmi' into for-next
Takashi Iwai [Fri, 22 May 2015 14:04:45 +0000 (16:04 +0200)]
Merge branch 'topic/hdmi' into for-next

9 years agoALSA: pcm: add IEC958 channel status helper
Russell King [Sat, 9 May 2015 10:26:47 +0000 (11:26 +0100)]
ALSA: pcm: add IEC958 channel status helper

Add a helper to create the IEC958 channel status from an ALSA
snd_pcm_runtime structure, taking account of the sample rate and
sample size.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Reviwed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: add DRM ELD helper
Russell King [Sat, 9 May 2015 10:26:42 +0000 (11:26 +0100)]
ALSA: pcm: add DRM ELD helper

Add a helper for the EDID like data structure, which is typically passed
from a HDMI adapter to its associated audio driver.  This informs the
audio driver of the capabilities of the attached HDMI sink.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: jack: Remove MODULE_*() macros
Takashi Iwai [Thu, 21 May 2015 09:31:40 +0000 (11:31 +0200)]
ALSA: jack: Remove MODULE_*() macros

The jack interface is statically included in sound core.  Having
doubly module information is rather confusing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Disable widget power-saving for ALC292 & co
Takashi Iwai [Wed, 20 May 2015 04:56:23 +0000 (06:56 +0200)]
ALSA: hda - Disable widget power-saving for ALC292 & co

We've got reports that ALC3226 (a Dell variant of ALC292) gives click
noises at transition from D3 to D0 when the widget power-saving is
enabled.  Further debugging session showed that avoiding it isn't
trivial, unfortunately, since paths are basically activated
dynamically while the pins have been already enabled.

This patch disables the widget power-saving for such codecs.

Reported-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Reduce verbs by node power-saves
Takashi Iwai [Wed, 20 May 2015 04:49:37 +0000 (06:49 +0200)]
ALSA: hda - Reduce verbs by node power-saves

The widget (node) power-saves restore the widget states at each
transition from D3 to D0 on each node.  This was added in the commit
[d545a57c5f84:ALSA: hda - Sync node attributes at resume from widget
power saving].  However, the test was rater false-positive; this
wasn't needed for any codecs.

Since the resync may take significant number of additional verbs to be
executed, it's better to reduce it.  Let's disable it for now again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: sound/atmel/ac97c.c: remove unused variable
Arnd Bergmann [Tue, 19 May 2015 15:20:36 +0000 (17:20 +0200)]
ALSA: sound/atmel/ac97c.c: remove unused variable

The recently added DT support for the ac97 driver is causing
a gcc warning:

sound/atmel/ac97c.c: In function 'atmel_ac97c_probe_dt':
sound/atmel/ac97c.c:919:29: warning: unused variable 'match' [-Wunused-variable]
  const struct of_device_id *match;

The variable is clearly unused, so we can remove it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Alexander Stein <alexanders83@web.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Move hda_i915.c from sound/pci/hda to sound/hda
Mengdong Lin [Tue, 19 May 2015 14:29:30 +0000 (22:29 +0800)]
ALSA: hda - Move hda_i915.c from sound/pci/hda to sound/hda

The file is moved to hda core and renamed to hdac_i915.c, so can be used
by both legacy HDA driver and new Skylake audio driver.

- Add snd_hdac_ prefix to the public APIs.
- The i915 audio component is moved to core bus and dynamically allocated.
- A static pointer hdac_acomp is used to help bind/unbind callbacks to get
  this component, because the sound card's private_data is used by the azx
  chip pointer, which is a legacy structure. It could be removed if private
  _data changes to some core structure which can be extended to find the
  bus.
- snd_hdac_get_display_clk() is added to get the display core clock for
  HSW/BDW.
- haswell_set_bclk() is moved to hda_intel.c because it needs to write the
  controller registers EM4/EM5, and only legacy HD-A needs it for HSW/BDW.
- Move definition of HSW/BDW-specific registers EM4/EM5 to hda_register.h
  and rename them to HSW_EM4/HSW_EM5, because other HD-A controllers have
  different layout for the extended mode registers.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix NULL dereference from CA0132 DSP loader
Takashi Iwai [Tue, 19 May 2015 09:35:13 +0000 (11:35 +0200)]
ALSA: hda - Fix NULL dereference from CA0132 DSP loader

The CA0132 DSP loader leads to NULL deference since the recent
transition to HDA core code, as it unconditionally accesses
hdac_stream->substream->runtime.  For DSP loading, the substream
shouldn't be assigned.

This patch addresses the NULL dereference above in addition to assure
the substream is cleared while DSP loading.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98151
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: usb-audio: Add quirk for MS LifeCam Studio
Takashi Iwai [Tue, 19 May 2015 08:46:49 +0000 (10:46 +0200)]
ALSA: usb-audio: Add quirk for MS LifeCam Studio

Microsoft LifeCam Studio (045e:0772) needs a similar quirk for
suppressing the wrong sample rate inquiry.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98481
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Sync HD-Audio-Models.txt for Realtek codecs
Takashi Iwai [Tue, 19 May 2015 08:21:57 +0000 (10:21 +0200)]
ALSA: hda - Sync HD-Audio-Models.txt for Realtek codecs

Added missing model entries and updated the codec names.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Add headset-mode* model options for ALC269 & co
Takashi Iwai [Tue, 19 May 2015 08:20:13 +0000 (10:20 +0200)]
ALSA: hda - Add headset-mode* model options for ALC269 & co

Modern machines tend to have only one headset jack nowadays, and they
often need these quirks.  Let's allow them applicable via model
option for ease of debugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: pcm: Modify double acknowledged interrupts check condition
Koro Chen [Wed, 13 May 2015 14:39:03 +0000 (22:39 +0800)]
ALSA: pcm: Modify double acknowledged interrupts check condition

Currently in snd_pcm_update_hw_ptr0 during interrupt,
we consider there were double acknowledged interrupts when:
1. HW reported pointer is smaller than expected, and
2. Time from last update time (hdelta) is over half a buffer time.

However, when HW reported pointer is only a few bytes smaller than
expected, and when hdelta is just a little larger than half a buffer time
(e.g. ping-pong buffer), it wrongly treats this IRQ as double acknowledged.

The condition #2 uses jiffies, but jiffies is not high resolution
since it is integer. We should consider jiffies inaccuracy.

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/ca0132: support for Alienware 15 Creative Sound Core3D-EX
Gabriele Martino [Mon, 18 May 2015 19:15:13 +0000 (21:15 +0200)]
ALSA: hda/ca0132: support for Alienware 15 Creative Sound Core3D-EX

This patch adds quirks detection to the Creative CA0132 codec, and the
quirk for Alienware 15 (2015).
Some quirks may need different pin configuration, so the relevant
compile-time configuration has been removed.
The pin configuration and related initialization verbs are generated at
runtime instead, in ca0132_config() and ca0132_prepare_verbs().

Signed-off-by: Gabriele Martino <g.martino@gmx.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: ppc: keywest: drop using attach adapter
Wolfram Sang [Sat, 9 May 2015 17:42:22 +0000 (19:42 +0200)]
ALSA: ppc: keywest: drop using attach adapter

As we now have deferred probing, we can use a custom mechanism and
finally get rid of this legacy interface from the i2c core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Tested-by: Dan DeVoto <dand1972@yahoo.com>
Tested-by: Mark Elliott <txlitebeer@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agosound: oss: fix build warning
Sudip Mukherjee [Thu, 14 May 2015 11:12:59 +0000 (16:42 +0530)]
sound: oss: fix build warning

while building with allyesconfig it was giving a build warning about
unused variable. declare the variable only if the driver is built as a
module.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - add hda_intel_trace.h
Libin Yang [Tue, 12 May 2015 01:43:22 +0000 (09:43 +0800)]
ALSA: hda - add hda_intel_trace.h

This patch creates hda_intel_trace.h to add some pm trace functions
used in hda_intel.c

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - rename hda_intel_trace.h to hda_controller_trace.h
Libin Yang [Tue, 12 May 2015 01:43:21 +0000 (09:43 +0800)]
ALSA: hda - rename hda_intel_trace.h to hda_controller_trace.h

This patch does:

1. Rename the hda_intel_trace.h to hda_controller_trace.h as
this trace is used in hda_controller.c

2. Add some trace function for pcm flow.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - add hdac stream trace
Libin Yang [Tue, 12 May 2015 01:43:20 +0000 (09:43 +0800)]
ALSA: hda - add hdac stream trace

Add the trace of snd_hdac_stream_start and snd_hdac_stream_stop.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/hdmi - Add Tegra210 support
Thierry Reding [Tue, 5 May 2015 12:56:24 +0000 (14:56 +0200)]
ALSA: hda/hdmi - Add Tegra210 support

Tegra210 contains a similar codec as Tegra124 and can be supported using
the same patch function.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/hdmi - Add Tegra114 support
Thierry Reding [Tue, 5 May 2015 12:56:23 +0000 (14:56 +0200)]
ALSA: hda/hdmi - Add Tegra114 support

Tegra114 contains the same codec as Tegra124 and can be supported using
the same patch function.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/hdmi - Add Tegra30 support
Thierry Reding [Tue, 5 May 2015 12:56:22 +0000 (14:56 +0200)]
ALSA: hda/hdmi - Add Tegra30 support

Tegra30 contains the same codec as Tegra124 and can be supported using
the same patch function.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/tegra - Improve error reporting
Thierry Reding [Tue, 5 May 2015 12:56:21 +0000 (14:56 +0200)]
ALSA: hda/tegra - Improve error reporting

When probing, provide accurate error messages to help with debugging
failures.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/hdmi - Implement Tegra-specific patch
Thierry Reding [Tue, 5 May 2015 12:56:20 +0000 (14:56 +0200)]
ALSA: hda/hdmi - Implement Tegra-specific patch

The HDMI codec on NVIDIA Tegra SoCs has a feature that doesn't exist on
the MCP or GPU variants. The highest bit in the vendor-defined scratch
registers can be used to trigger an interrupt in the HDMI codec, which
is signalled to the HDMI driver. This can be used to pass information,
such as the HDA format, to the HDMI driver so that it can reconfigure
itself accordingly.

While at it, change the name of the codec to Tegra124 since there are no
other SoCs in the Tegra12x family. There isn't really a Tegra12x family.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/tegra - Set CORBRP self-clear flag
Thierry Reding [Tue, 5 May 2015 12:56:19 +0000 (14:56 +0200)]
ALSA: hda/tegra - Set CORBRP self-clear flag

This is set for the MCP variants of the NVIDIA HDA controller, which the
Tegra variant was derived from. This fixes the following warning at boot
time:

[    2.486610] tegra-hda 70030000.hda: CORB reset timeout#1, CORBRP = 0

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda/realtek - Support Dell headset mode for ALC298
Kailang Yang [Mon, 18 May 2015 07:31:20 +0000 (15:31 +0800)]
ALSA: hda/realtek - Support Dell headset mode for ALC298

Dell create new platform with ALC298 codec.
This patch will enable headset mode for ALC298/ALC3266 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: info: Drop kerneldoc comment from snd_info_create_entry()
Takashi Iwai [Mon, 18 May 2015 07:45:11 +0000 (09:45 +0200)]
ALSA: info: Drop kerneldoc comment from snd_info_create_entry()

It's no longer a part of API but merely a local function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: info: Move list addition to snd_info_create_entry()
Takashi Iwai [Mon, 18 May 2015 07:43:30 +0000 (09:43 +0200)]
ALSA: info: Move list addition to snd_info_create_entry()

Just a minor refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: info: Register proc entries recursively, too
Takashi Iwai [Mon, 18 May 2015 07:20:24 +0000 (09:20 +0200)]
ALSA: info: Register proc entries recursively, too

The commit [c560a6797e3b: ALSA: core: Remove child proc file elements
recursively] converted snd_card_proc_new() with the normal
snd_info_*() call and removed snd_device chain for such info
entries. However, it misses one point: the creation of the proc entry
was managed by snd_device chain in the former code, and now it's also
gone, which results in no proc files creation at all.  Mea culpa.

This patch makes snd_info_card_register() creating the all pending
child proc entries in a shot.  Also, since snd_card_register() might
be called multiple times, this function is also changed to be callable
multiple times.

Along with the changes above, now the linked list of snd_info_entry is
added at creation time instead of snd_info_register() for keeping eyes
of pending info entries.

Fixes: c560a6797e3b ('ALSA: core: Remove child proc file elements recursively')
Reported-by: "Lu, Han" <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: info: Fix leaks of child entries at snd_info_free_entry()
Takashi Iwai [Mon, 18 May 2015 06:59:12 +0000 (08:59 +0200)]
ALSA: info: Fix leaks of child entries at snd_info_free_entry()

snd_info_free_entry() releases the all children nodes as well, but due
to the wrong timing of releasing the link, the children nodes may be
disconnected but left unreleased.  This patch fixes it by moving the
link free at the right position.  Also it eases list_for_each_entry()
without _safe option in snd_info_disconnect() because it no longer
frees the children nodes there.

Fixes: c560a6797e3b ('ALSA: core: Remove child proc file elements recursively')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge tag 'asoc-fix-v4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Takashi Iwai [Mon, 18 May 2015 06:23:37 +0000 (08:23 +0200)]
Merge tag 'asoc-fix-v4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.1

A few more fixes for v4.1, some driver fixes plus one core fix which
fixes registration of DAI links when adding prefixes to CODECs to
deuplicate in multi-CODEC systems.

9 years agoALSA: hda/realtek - ALC292 dock fix for Thinkpad L450
Ansgar Hegerfeld [Thu, 14 May 2015 10:31:32 +0000 (12:31 +0200)]
ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450

The Lenovo ThinkPad L450 requires the ALC292_FIXUP_TPT440_DOCK fix in
order to get sound output on the docking stations audio port.

This patch was tested using a ThinkPad L450 (20DSS00B00) using kernel
4.0.3 and a ThinkPad Pro Dock.

Signed-off-by: Ansgar Hegerfeld <linux@hegerfeld.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Add Conexant codecs CX20721, CX20722, CX20723 and CX20724
David Henningsson [Wed, 13 May 2015 11:28:54 +0000 (13:28 +0200)]
ALSA: hda - Add Conexant codecs CX20721, CX20722, CX20723 and CX20724

This patch adds support for Conexant HD Audio codecs
CX20721, CX20722, CX20723 and CX20724.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1454656
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Fix headset mic and mic-in for a Dell desktop
David Henningsson [Tue, 12 May 2015 12:38:15 +0000 (14:38 +0200)]
ALSA: hda - Fix headset mic and mic-in for a Dell desktop

ALC662 does not need any special verbs to change the jack functionality,
and enables mic in through the headphone jack mode by changing the
direction of the headphone pin node.

BugLink: https://bugs.launchpad.net/bugs/1454235
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMerge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/mc13783', 'asoc/fix...
Mark Brown [Tue, 12 May 2015 19:31:33 +0000 (20:31 +0100)]
Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/mc13783', 'asoc/fix/uda1380', 'asoc/fix/wm8960' and 'asoc/fix/wm8994' into asoc-linus

9 years agoMerge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus
Mark Brown [Tue, 12 May 2015 19:31:32 +0000 (20:31 +0100)]
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus

9 years agoMerge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
Mark Brown [Tue, 12 May 2015 19:31:32 +0000 (20:31 +0100)]
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus

9 years agoASoC: wm8994: correct BCLK DIV 348 to 384
Zidan Wang [Tue, 12 May 2015 06:58:50 +0000 (14:58 +0800)]
ASoC: wm8994: correct BCLK DIV 348 to 384

According to the RM of wm8958, BCLK DIV 348 doesn't exist, correct it
to 384.

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoASoC: wm8960: fix "RINPUT3" audio route error
Zidan Wang [Tue, 12 May 2015 06:58:36 +0000 (14:58 +0800)]
ASoC: wm8960: fix "RINPUT3" audio route error

It should be "RINPUT3" instead of "LINPUT3" route to "Right Input
Mixer".

Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoASoC: dapm: Modify widget stream name according to prefix
Koro Chen [Mon, 11 May 2015 02:36:53 +0000 (10:36 +0800)]
ASoC: dapm: Modify widget stream name according to prefix

When there is prefix specified, currently we will add this prefix in
widget->name, but not in widget->sname.
it causes failure at snd_soc_dapm_link_dai_widgets:

if (!w->sname || !strstr(w->sname, dai_w->name))

because dai_w->name has prefix added, but w->sname does not.
We should also add prefix for stream name

Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
9 years agoALSA: hda/realtek - Support headset mode for ALC298
Kailang Yang [Tue, 12 May 2015 09:11:10 +0000 (17:11 +0800)]
ALSA: hda/realtek - Support headset mode for ALC298

Support headset mode for ALC298 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Remove unused call to "get_pin" in patch_hdmi.c
David Henningsson [Mon, 11 May 2015 08:23:57 +0000 (10:23 +0200)]
ALSA: hda - Remove unused call to "get_pin" in patch_hdmi.c

Janitorial patch (no functional change)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoALSA: hda - Add headset mic quirk for Dell Inspiron 5548
David Henningsson [Mon, 11 May 2015 12:04:14 +0000 (14:04 +0200)]
ALSA: hda - Add headset mic quirk for Dell Inspiron 5548

This enables the headset microphone on Dell Inspiron 5548,
or at least some variants of it.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1452175
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoLinux 4.1-rc3
Linus Torvalds [Sun, 10 May 2015 22:12:29 +0000 (15:12 -0700)]
Linux 4.1-rc3

9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sun, 10 May 2015 21:58:53 +0000 (14:58 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "I really need to get back to sending these on my Friday, instead of my
  Monday morning, but nothing too amazing in here: a few amdkfd fixes, a
  few radeon fixes, i915 fixes, one tegra fix and one core fix"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm: Zero out invalid vblank timestamp in drm_update_vblank_count.
  drm/tegra: Don't use vblank_disable_immediate on incapable driver.
  drm/radeon: stop trying to suspend UVD sessions
  drm/radeon: more strictly validate the UVD codec
  drm/radeon: make UVD handle checking more strict
  drm/radeon: make VCE handle check more strict
  drm/radeon: fix userptr lockup
  drm/radeon: fix userptr BO unpin bug v3
  drm/amdkfd: Initialize sdma vm when creating sdma queue
  drm/amdkfd: Don't report local memory size
  drm/amdkfd: allow unregister process with queues
  drm/i915: Drop PIPE-A quirk for 945GSE HP Mini
  drm/i915: Sink rate read should be saved in deca-kHz
  drm/i915/dp: there is no audio on port A
  drm/i915: Add missing MacBook Pro models with dual channel LVDS
  drm/i915: Assume dual channel LVDS if pixel clock necessitates it
  drm/radeon: don't setup audio on asics that don't support it
  drm/radeon: disable semaphores for UVD V1 (v2)

9 years agoMerge tag 'drm-intel-fixes-2015-05-08' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Sun, 10 May 2015 20:06:22 +0000 (06:06 +1000)]
Merge tag 'drm-intel-fixes-2015-05-08' of git://anongit.freedesktop.org/drm-intel into drm-fixes

misc i915 fixes.

* tag 'drm-intel-fixes-2015-05-08' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Drop PIPE-A quirk for 945GSE HP Mini
  drm/i915: Sink rate read should be saved in deca-kHz
  drm/i915/dp: there is no audio on port A
  drm/i915: Add missing MacBook Pro models with dual channel LVDS
  drm/i915: Assume dual channel LVDS if pixel clock necessitates it

9 years agodrm: Zero out invalid vblank timestamp in drm_update_vblank_count.
Mario Kleiner [Tue, 7 Apr 2015 04:31:09 +0000 (06:31 +0200)]
drm: Zero out invalid vblank timestamp in drm_update_vblank_count.

Since commit 844b03f27739135fe1fed2fef06da0ffc4c7a081 we make
sure that after vblank irq off, we return the last valid
(vblank count, vblank timestamp) pair to clients, e.g., during
modesets, which is good.

An overlooked side effect of that commit for kms drivers without
support for precise vblank timestamping is that at vblank irq
enable, when we update the vblank counter from the hw counter, we
can't update the corresponding vblank timestamp, so now we have a
totally mismatched timestamp for the new count to confuse clients.

Restore old client visible behaviour from before Linux 3.17, but
zero out the timestamp at vblank counter update (instead of disable
as in original implementation) if we can't generate a meaningful
timestamp immediately for the new vblank counter. This will fix
this regression, so callers know they need to retry again later
if they need a valid timestamp, but at the same time preserves
the improvements made in the commit mentioned above.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: <stable@vger.kernel.org> #v3.17+
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agoMerge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Sun, 10 May 2015 18:16:48 +0000 (11:16 -0700)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 "A set of ARM fixes:

   - fix an off-by-one error in the iommu DMA ops, which caused errors
     with a 4GiB size.

   - remove comments mentioning the non-existent CONFIG_CPU_ARM1020_CPU_IDLE
     macro.

   - remove useless CONFIG_CPU_ICACHE_STREAMING_DISABLE blocks, where
     this symbol never appeared in any Kconfig.

   - fix Feroceon code to cope with a previous change correctly (it
     incorrectly left an additional word in an assembly structure
     definition)

   - avoid a misleading IRQ affinity warning in the ARM PMU code for
     IRQs which are already affine to their CPUs.

   - fix the node name printed in the IRQ affinity warning"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8352/1: perf: Fix the pmu node name in warning message
  ARM: 8351/1: perf: don't warn about missing interrupt-affinity property for PPIs
  ARM: 8350/1: proc-feroceon: Fix feroceon_proc_info macro
  ARM: 8349/1: arch/arm/mm/proc-arm925.S: remove dead #ifdef block
  ARM: 8348/1: remove comments on CPU_ARM1020_CPU_IDLE
  ARM: 8347/1: dma-mapping: fix off-by-one check in arm_setup_iommu_dma_ops

9 years agoMerge tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene...
Linus Torvalds [Sun, 10 May 2015 18:13:19 +0000 (11:13 -0700)]
Merge tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung

Pull samsung fixes from Kukjin Kim:
 "Here is Samsung fixes for v4.1.  Since I've missed to send this via
  arm-soc tree before v4.1-rc3, so I'm sending this to you directly

   - fix commit ea08de16eb1b ("ARM: dts: Add DISP1 power domain for
     exynos5420") which causes 'unhandled fault: imprecise external
     abort' error when PD turned off.  ("make DP a consumer of DISP1
     power domain")

   - fix 's3c-rtc' probe failure on Odriod-X2/U2/U3 boards ("add
     'rtc_src' clock to rtc node for source clock of rtc")

   - fix typo for 'cpu-crit-0' trip point on exynos5420/5440

   - fix S2R failure on exynos5250-snow due to card power of Marvell
     WiFi driver (suspend/resume) ("add keep-power-in-susped to WiFi
     SDIO node")"

* tag 'samsung-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: dts: Add keep-power-in-suspend to WiFi SDIO node for exynos5250-snow
  ARM: dts: Fix typo in trip point temperature for exynos5420/5440
  ARM: dts: add 'rtc_src' clock to rtc node for exynos4412-odroid boards
  ARM: dts: Make DP a consumer of DISP1 power domain on Exynos5420

9 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sat, 9 May 2015 23:13:38 +0000 (16:13 -0700)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "A few patches have come up since the merge window.  The largest one is
  a rewrite of the PXA lubbock/mainstone IRQ handling.  This was already
  broken in 2011 by a change to the GPIO code and only noticed now.

  The other changes contained here are:

  MAINTAINERS file updates:

   - Ray Jui and Scott Branden are now co-maintainers for some of the
     mach-bcm chips, while Christian Daudt and Marc Carino have stepped
     down.

   - Andrew Victor is no longer maintaining at91.  Instead, Alexandre
     Belloni now becomes an official maintainer, after having done a
     bulk of the work for a while.

   - Baruch Siach, who added the mach-digicolor platform in 4.1 is now
     listed as maintainer

   - The git URL for mach-socfpga has changed

  Bug fixes:

   - Three bug fixes for new rockchip rk3288 code

   - A regression fix to make SD card support work on certain ux500
     boards

   - multiple smaller dts fixes for imx, omap, mvebu, and shmobile

   - a regression fiix for omap3 power consumption

   - a fix for regression in the ARM CCI bus driver

  Configuration changes:

   - more imx platforms are now enabled in multi_v7_defconfig"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (39 commits)
  MAINTAINERS: add Conexant Digicolor machines entry
  MAINTAINERS: socfpga: update the git repo for SoCFPGA
  ARM: multi_v7_defconfig: Select more FSL SoCs
  MAINTAINERS: replace an AT91 maintainer
  drivers: CCI: fix used_mask init in validate_group()
  bus: omap_l3_noc: Fix master id address decoding for OMAP5
  bus: omap_l3_noc: Fix offset for DRA7 CLK1_HOST_CLK1_2 instance
  ARM: dts: dra7: Fix efuse register size for ABB
  ARM: dts: am57xx-beagle-x15: Switch GPIO fan number
  ARM: dts: am57xx-beagle-x15: Switch UART mux pins
  ARM: dts: am437x-sk: reduce col-scan-delay-us
  ARM: dts: am437x-sk: fix for new newhaven display module revision
  ARM: dts: am57xx-beagle-x15: Fix RTC aliases
  ARM: dts: am57xx-beagle-x15: Fix IRQ type for mcp7941x
  ARM: dts: omap3: Add #iommu-cells to isp and iva iommu
  ARM: omap2plus_defconfig: Enable EXTCON_USB_GPIO
  ARM: dts: OMAP3-N900: Add microphone bias voltages
  ARM: OMAP2+: Fix omap off idle power consumption creeping up
  MAINTAINERS: Update brcmstb entry
  MAINTAINERS: Remove Christian Daudt for mach-bcm
  ...

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
Linus Torvalds [Sat, 9 May 2015 23:07:14 +0000 (16:07 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace

Pull user-namespace fix from Eric Biederman:
 "Eric Windish recently reported a really bug that allows mounting fresh
  copies of proc and sysfs when it really should not be allowed.  The
  code attempted to verify that proc and sysfs were fully visible but
  there is a test missing to ensure that the root of the filesystem is
  visible.  Doh!

  The following patch fixes that.

  This fixes a containment issue that the docker folks are seeing"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  mnt: Fix fs_fully_visible to verify the root directory is visible

9 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 9 May 2015 21:59:05 +0000 (14:59 -0700)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq updates from Thomas Gleixner:
 "Two patches from the irq departement:

   - a simple fix to make dummy_irq_chip usable for wakeup scenarios

   - removal of the gic arch_extn hackery.  Now that all users are
     converted we really want to get rid of the interface so people wont
     come up with new use cases"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: gic: Drop support for gic_arch_extn
  genirq: Set IRQCHIP_SKIP_SET_WAKE flag for dummy_irq_chip

9 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 9 May 2015 21:57:49 +0000 (14:57 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Thomas Gleixner:
 "A simple fix to actually shut down a detached device instead of
  keeping it active"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clockevents: Shutdown detached clockevent device

9 years agom32r: make flush_cpumask non-volatile.
Rusty Russell [Fri, 8 May 2015 18:09:52 +0000 (03:39 +0930)]
m32r: make flush_cpumask non-volatile.

We cast away the volatile, but really, why make it volatile at all?
We already do a mb() inside the cpumask_empty() loop.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agomnt: Fix fs_fully_visible to verify the root directory is visible
Eric W. Biederman [Fri, 8 May 2015 21:36:50 +0000 (16:36 -0500)]
mnt: Fix fs_fully_visible to verify the root directory is visible

This fixes a dumb bug in fs_fully_visible that allows proc or sys to
be mounted if there is a bind mount of part of /proc/ or /sys/ visible.

Cc: stable@vger.kernel.org
Reported-by: Eric Windisch <ewindisch@docker.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sat, 9 May 2015 04:39:12 +0000 (21:39 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
 "A couple of fixes for bugs caught while digging in fs/namei.c.  The
  first one is this cycle regression, the second is 3.11 and later"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  path_openat(): fix double fput()
  namei: d_is_negative() should be checked before ->d_seq validation