platform/kernel/linux-starfive.git
10 years agoALSA: cs5535audio: Also needed on MIPS
Jean Delvare [Tue, 11 Mar 2014 10:38:34 +0000 (11:38 +0100)]
ALSA: cs5535audio: Also needed on MIPS

The CS5536 companion chipset is not only used on 32-bit x86 systems as
I originally thought, it is also used on MIPS Loongson/Lemote 2
systems. So let the snd-cs5535audio driver be built on MIPS too.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - initialize audio InfoFrame to be all zero
Mengdong Lin [Tue, 11 Mar 2014 21:12:52 +0000 (17:12 -0400)]
ALSA: hda - initialize audio InfoFrame to be all zero

This patch initialized the local audio InfoFrame variable 'ai' to be all zero,
thus the data bytes will indicate "Refer to Stream Header" by default.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoRevert "ALSA: emu10k1: Fix warning: "CCR" redefined"
Geert Uytterhoeven [Mon, 10 Mar 2014 20:20:55 +0000 (21:20 +0100)]
Revert "ALSA: emu10k1: Fix warning: "CCR" redefined"

This reverts commit 83fc3bc09518d42e8f5073e2a65884701dfadf19.

sh-specific "CCR" and "CCR2" have been prefixed by "SH_" in commit
a5f6ea29f9a918403629f8369ae55fac6b09cb53 ('sh: prefix sh-specific "CCR" and
"CCR2" by "SH_"').

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: cs553*: Fix dependencies
Jean Delvare [Mon, 10 Mar 2014 20:12:26 +0000 (21:12 +0100)]
ALSA: cs553*: Fix dependencies

The CS5530, CS5535 and CS5536 chipsets are companions of the Geode
series of processors, which are 32-bit x86 processors. So the
snd-cs5530 and snd-cs5535audio drivers are only needed on this
architecture, except for build testing purpose.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: emu10k1: Fix possible NULL dereference
Takashi Iwai [Wed, 5 Mar 2014 11:13:10 +0000 (12:13 +0100)]
ALSA: emu10k1: Fix possible NULL dereference

The previous dev_err() conversion resulted in a code that may give
NULL dereference in snd_emu10k1_ptr_write().  Since it's a sanity
check, better to be replaced with a debug macro like other places in
this driver.

Fixes: 6f002b02166c ('ALSA: emu10k1: Use standard printk helpers')
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: echoaudio: use after free on error
Dan Carpenter [Wed, 5 Mar 2014 11:07:15 +0000 (14:07 +0300)]
ALSA: echoaudio: use after free on error

There are some places where we dereference "chip" in the error message
but we've already freed it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: lola: NULL deref on allocation error
Dan Carpenter [Wed, 5 Mar 2014 10:55:09 +0000 (13:55 +0300)]
ALSA: lola: NULL deref on allocation error

"chip" is NULL here.  We don't need a printk here because kmalloc() has
it built in.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda/realtek - Add headset quirk for Dell DT
Kailang Yang [Mon, 3 Mar 2014 07:27:22 +0000 (15:27 +0800)]
ALSA: hda/realtek - Add headset quirk for Dell DT

This quirk is needed for the headset microphone to work.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Mark reg op args as iomem
Dylan Reid [Mon, 3 Mar 2014 04:44:01 +0000 (20:44 -0800)]
ALSA: hda - Mark reg op args as iomem

The ops to read and write registers should take pointers labeled as
__iomem.  Thanks to the sparse bot for catching this.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Rename reg access ops in hda_controller_ops
Dylan Reid [Mon, 3 Mar 2014 04:44:00 +0000 (20:44 -0800)]
ALSA: hda - Rename reg access ops in hda_controller_ops

Using readl, writel, etc. resulted in some architectures, such as
s390, expanding the member names into zpci_writel.  Obviously not the
intended result.

Fixes s390 build breakage introduced by "4083081 - ALSA: hda - Allow
different ops to read/write registers"

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Make azx_attach_pcm_stream static
Dylan Reid [Mon, 3 Mar 2014 04:43:59 +0000 (20:43 -0800)]
ALSA: hda - Make azx_attach_pcm_stream static

It is only used in hda_controller.c now.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - remove PCI dependency in Kconfig
Dylan Reid [Fri, 28 Feb 2014 23:41:32 +0000 (15:41 -0800)]
ALSA: hda - remove PCI dependency in Kconfig

Remove the dependency on CONFIG_PCI for building hda codec drivers so
that platforms with HDA attach via means other than PCI can use them.
This was as suggested by tiwai.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: core - Define snd_pci_quirk without CONFIG_PCI
Dylan Reid [Fri, 28 Feb 2014 23:41:31 +0000 (15:41 -0800)]
ALSA: core - Define snd_pci_quirk without CONFIG_PCI

The hda codecs all use this struct and, with an HDA platform driver,
will be able to be built without PCI.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Move codec create to hda_controller
Dylan Reid [Fri, 28 Feb 2014 23:41:30 +0000 (15:41 -0800)]
ALSA: hda - Move codec create to hda_controller

Codec creation and stream initialization can be shared between
hda_intel and hda platform drivers.  Move it and the static functions
it depends on to hda_controller.c.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Move azx_interrupt to hda_controller
Dylan Reid [Fri, 28 Feb 2014 23:41:29 +0000 (15:41 -0800)]
ALSA: hda - Move azx_interrupt to hda_controller

This code will be reused by an hda_platform driver as it has no PCI
dependencies.  This allows update_rirb to be static as all users are
now in hda_controller.c.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add position_check op
Dylan Reid [Fri, 28 Feb 2014 23:41:28 +0000 (15:41 -0800)]
ALSA: hda - Add position_check op

This op will be used by hda_intel to do the position check.  Takashi
wisely suggested adding this before moving the interrupt handler to
common HDA code.  Having this callback prevents the need to move the
hda_intel specific delayed interrupt handling with the irq.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Move low level functions to hda_controller
Dylan Reid [Fri, 28 Feb 2014 23:41:27 +0000 (15:41 -0800)]
ALSA: hda - Move low level functions to hda_controller

Share more code from hda_intel.  This moves the link control and
initialization to hda_controller.  The code will also be used by an
hda platform driver.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - move alloc_cmd_io to hda_controller
Dylan Reid [Fri, 28 Feb 2014 23:41:26 +0000 (15:41 -0800)]
ALSA: hda - move alloc_cmd_io to hda_controller

Combining the call to alloc_cmd_io with the allocate pages function
removes an extra interface between hda_intel and hda_controller.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Relocate RIRB/CORB interface to hda_controller
Dylan Reid [Fri, 28 Feb 2014 23:41:25 +0000 (15:41 -0800)]
ALSA: hda - Relocate RIRB/CORB interface to hda_controller

This is done to allow an HDA platform driver to reuse the code.

A few of the interfaces added to hda_controller will disappear in
following commits as their users are also moved to hda_controller.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Move the dsp loader to hda_controller
Dylan Reid [Fri, 28 Feb 2014 23:41:24 +0000 (15:41 -0800)]
ALSA: hda - Move the dsp loader to hda_controller

Moving the DSP loading functionality to hda_controller.c means that
the dsp lock doesn't need to be shared in hda_intel and
hda_controller.  The forthcoming platform driver doesn't need the DSP
loading code, but sharing it doesn't hurt.

Tested on Chromebook Pixel's ca0132 that uses the DSP loader.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Pull pages allocation to hda_controller
Dylan Reid [Fri, 28 Feb 2014 23:41:23 +0000 (15:41 -0800)]
ALSA: hda - Pull pages allocation to hda_controller

Pull allocation from first_init to a new function in hda_controller.c.
Short term this will allow the dsp loader to be moved as well.  In
later commits it will allow the same allocation to be used by the
platform hda driver.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add hda_controller.c and move pcm ops from hda_intel
Dylan Reid [Fri, 28 Feb 2014 23:41:22 +0000 (15:41 -0800)]
ALSA: hda - Add hda_controller.c and move pcm ops from hda_intel

Pull the pcm_ops and the functions they use into a new hda_controller
file.  This is done to allow for other hda implementations besides PCI
to use the same ops.  The hda_controller file will house functionality
related to HDA but independent of the bus used to talk to the
controller.

This currently shares dsp locking across the two files.  This will be
remedied in a following commit.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add pcm_mmap_prepare op.
Dylan Reid [Fri, 28 Feb 2014 23:41:21 +0000 (15:41 -0800)]
ALSA: hda - Add pcm_mmap_prepare op.

Adding this op allows the X86 specific mmap operation to help in
hda_intel without needing a CONFIG_X86 in future non-PCI hda drivers.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Move snd page allocation to ops
Dylan Reid [Fri, 28 Feb 2014 23:41:20 +0000 (15:41 -0800)]
ALSA: hda - Move snd page allocation to ops

Break out the allocation of pages for DMA and PCM buffers to ops in
the chip structure.  This is done to allow for architecture specific
work-arounds to be added.  Currently mark_pages_wc is used by
hda_intel.  This avoids needing to move that x86-specific code to a
common area shared with hda platform drivers.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Pass max_slots and power_save to codec_create
Dylan Reid [Fri, 28 Feb 2014 23:41:19 +0000 (15:41 -0800)]
ALSA: hda - Pass max_slots and power_save to codec_create

Passing the max slots and power save arguments to codec_create will
allow for its reuse by an hda_platform driver. It makes the function
independent of the module params in hda_intel and ready to move to
hda_shared in a following commit.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add jackpoll_ms to struct azx
Dylan Reid [Fri, 28 Feb 2014 23:41:18 +0000 (15:41 -0800)]
ALSA: hda - Add jackpoll_ms to struct azx

Keeping a pointer to the jackpoll_ms array in the chip will allow
azx_codec_create to be shared between hda_intel and hda_platform
drivers.  Also modify get_jackpoll_ms to make the jackpoll_ms member
optional, this way a platform driver can leave it out if it's not
needed.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - remove unused clear of STATESTS
Dylan Reid [Fri, 28 Feb 2014 23:41:17 +0000 (15:41 -0800)]
ALSA: hda - remove unused clear of STATESTS

Although the code was updated last year the "#if 0" surrounding it
dates back to the original git commit.  The function will be moved to
a new file, no need to carry the dead code.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add function pointer for disabling MSI
Dylan Reid [Fri, 28 Feb 2014 23:41:16 +0000 (15:41 -0800)]
ALSA: hda - Add function pointer for disabling MSI

This is a PCI-only feature, but adding a callback for it in the chip
structure breaks the PCI dependency in the RIRB code allowing the
logic there to be re-used by the platform HDA driver.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Use device pointer from the card instead of pci
Dylan Reid [Fri, 28 Feb 2014 23:41:15 +0000 (15:41 -0800)]
ALSA: hda - Use device pointer from the card instead of pci

This removes calls to get the device via PCI from other parts of the
code that will be able to be re-used by the platform driver.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Keep pointer to bdl_pos_fix in chip struct
Dylan Reid [Fri, 28 Feb 2014 23:41:14 +0000 (15:41 -0800)]
ALSA: hda - Keep pointer to bdl_pos_fix in chip struct

This will allow for a platform hda driver to use it as well.  It
removes the dependency on the module param from hda_intel, which will
allow for azx_setup_periods to be shared.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Allow different ops to read/write registers
Dylan Reid [Fri, 28 Feb 2014 23:41:13 +0000 (15:41 -0800)]
ALSA: hda - Allow different ops to read/write registers

The forthcoming platform hda driver needs to override the way
registers are read and written.  In preparation for that, introduce a
reg_ops struct that can be implemented differently by the new driver.
Change the existing macros to use the new structure, and move them to
hda_priv.h where they will be accessible to both PCI and platform
drivers.

Start with register access, but later commits will add more ops that
differ between PCI and platform.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Move some definitions to new hda_priv.h
Dylan Reid [Fri, 28 Feb 2014 23:41:12 +0000 (15:41 -0800)]
ALSA: hda - Move some definitions to new hda_priv.h

Later commits adding support for hda platform drivers will want to use
the same defines and structures. Put them in a place reachable by both
hda_intel and the new platform driver.

This is a mostly a direct copy with a few whitespace and comment
changes to make checkpatch happy.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Fix CORB reset to follow specification
David Henningsson [Fri, 28 Feb 2014 06:56:58 +0000 (07:56 +0100)]
ALSA: hda - Fix CORB reset to follow specification

According to the HDA spec, we must write 1 to bit 15 on a CORBRP
reset, read back 1, then write 0, then read back 0. This must be
done while the DMA is not running.

We accidentaly ended up writing back the 0 by using a writel
instead of a writew to CORBWP.

This caused occasional controller failure on Bay Trail hardware.

[replaced error messages with dev_err() by tiwai]

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Fix registration of beep input device
Takashi Iwai [Fri, 28 Feb 2014 12:42:09 +0000 (13:42 +0100)]
ALSA: hda - Fix registration of beep input device

The beep input device is registered via input_register_device(), but
this is called in snd_hda_attach_beep_device() where the sound devices
aren't registered yet.  This leads to the binding to non-existing
object, thus results in failure.  And, even if the binding worked
(against the PCI object), it's still racy; the input device appears
before the sound objects.

For fixing this, register the input device properly at dev_register
ops of the codec object it's bound with.  Also, call
snd_hda_detach_beep_device() at dev_disconnection so that it's
detached at the right timing.  As a bonus, since it's called in the
codec's ops, we can get rid of the further call from the other codec
drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'topic/cvt-dev-prints' into for-next
Takashi Iwai [Fri, 28 Feb 2014 10:54:43 +0000 (11:54 +0100)]
Merge branch 'topic/cvt-dev-prints' into for-next

This merges the bunch of changes over pci and usb sound drivers to
convert to dev_err() and co.

10 years agoALSA: hda/sigmatel - Allow auto-switching for dock line-in of HP laptops
Takashi Iwai [Thu, 27 Feb 2014 15:24:53 +0000 (16:24 +0100)]
ALSA: hda/sigmatel - Allow auto-switching for dock line-in of HP laptops

Many HP laptops with STAC codecs have a docking station port and BIOS
sets the pins for the input on the dock as a line in.  Because the
generic parser doesn't handle a line in pin as auto-switchable, this
resulted in the manual capture source selection on these laptops.

However, from the usability POV, the automatic switching is easier.
This patch adds the line_in_auto_switch hint in the fixup function for
these laptops.  Even if no dock port is present, this should be
harmless as the generic parser allows the auto-switching only in a
limited situation (all three pins are located in different
positions).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: Move EXPORT_SYMBOL() in appropriate places
Takashi Iwai [Thu, 27 Feb 2014 15:00:17 +0000 (16:00 +0100)]
ALSA: Move EXPORT_SYMBOL() in appropriate places

Just a cleanup to follow the standard coding style.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Make codec object as a parent for input beep devices
Takashi Iwai [Thu, 27 Feb 2014 08:33:00 +0000 (09:33 +0100)]
ALSA: hda - Make codec object as a parent for input beep devices

Instead of the controller, the new codec object is assigned as a
parent for the hd-audio beep input devices, just like already done for
PCM and hwdep.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: 6fire: Use standard printk helpers
Takashi Iwai [Wed, 26 Feb 2014 14:51:04 +0000 (15:51 +0100)]
ALSA: 6fire: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: usb-audio: Use standard printk helpers
Takashi Iwai [Wed, 26 Feb 2014 12:02:17 +0000 (13:02 +0100)]
ALSA: usb-audio: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
As there are too deep indirections (e.g. ep->chip->dev->dev),
a few new local macros, usb_audio_err() & co, are introduced.

Also, the device numbers in some messages are dropped, as they are
shown in the prefix automatically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: ymfpci: Use standard printk helpers
Takashi Iwai [Wed, 26 Feb 2014 11:18:27 +0000 (12:18 +0100)]
ALSA: ymfpci: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: vx222: Use standard printk helpers
Takashi Iwai [Wed, 26 Feb 2014 11:13:57 +0000 (12:13 +0100)]
ALSA: vx222: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: trident: Use standard printk helpers
Takashi Iwai [Wed, 26 Feb 2014 11:11:29 +0000 (12:11 +0100)]
ALSA: trident: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: rme9652: Use standard printk helpers
Takashi Iwai [Wed, 26 Feb 2014 11:06:24 +0000 (12:06 +0100)]
ALSA: rme9652: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hdspm: Use standard printk helpers
Takashi Iwai [Wed, 26 Feb 2014 11:05:40 +0000 (12:05 +0100)]
ALSA: hdspm: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hdsp: Use standard printk helpers
Takashi Iwai [Wed, 26 Feb 2014 11:05:11 +0000 (12:05 +0100)]
ALSA: hdsp: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: pcxhr: Use standard printk helpers
Takashi Iwai [Wed, 26 Feb 2014 10:47:55 +0000 (11:47 +0100)]
ALSA: pcxhr: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: oxygen: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 17:00:26 +0000 (18:00 +0100)]
ALSA: oxygen: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: nm256: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 16:57:42 +0000 (17:57 +0100)]
ALSA: nm256: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: mixart: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 16:51:46 +0000 (17:51 +0100)]
ALSA: mixart: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: lx6464es: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 16:32:49 +0000 (17:32 +0100)]
ALSA: lx6464es: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: lola: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 16:23:57 +0000 (17:23 +0100)]
ALSA: lola: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: ice17xx: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 16:16:16 +0000 (17:16 +0100)]
ALSA: ice17xx: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: emu10k1: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 16:02:09 +0000 (17:02 +0100)]
ALSA: emu10k1: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: emu10k1x: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 16:01:34 +0000 (17:01 +0100)]
ALSA: emu10k1x: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: echoaudio: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 15:43:02 +0000 (16:43 +0100)]
ALSA: echoaudio: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: cs46xx: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 15:36:51 +0000 (16:36 +0100)]
ALSA: cs46xx: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: cs5535audio: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 15:10:25 +0000 (16:10 +0100)]
ALSA: cs5535audio: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: ca0106: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 15:04:05 +0000 (16:04 +0100)]
ALSA: ca0106: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
A couple of prints are difficult to convert with dev_err() so they are
converted to pr_err() at least.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: aw2: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 14:54:30 +0000 (15:54 +0100)]
ALSA: aw2: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
A couple of prints are difficult to convert with dev_err() so they are
converted to pr_err() at least.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: ali5451: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 14:48:50 +0000 (15:48 +0100)]
ALSA: ali5451: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
Some debug prints are replaced with dev_dbg(), too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: ac97: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 14:37:50 +0000 (15:37 +0100)]
ALSA: ac97: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: via82xx_modem: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 14:25:50 +0000 (15:25 +0100)]
ALSA: via82xx_modem: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: via82xx: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 14:21:56 +0000 (15:21 +0100)]
ALSA: via82xx: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: sonicvibes: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 14:16:04 +0000 (15:16 +0100)]
ALSA: sonicvibes: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
The debug prints are also reformatted to suit with dev_dbg().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: rme96: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 14:03:18 +0000 (15:03 +0100)]
ALSA: rme96: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: rme32: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:57:03 +0000 (14:57 +0100)]
ALSA: rme32: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: maestro3: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:43:41 +0000 (14:43 +0100)]
ALSA: maestro3: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: intel8x0m: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:40:45 +0000 (14:40 +0100)]
ALSA: intel8x0m: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: intel8x0: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:37:14 +0000 (14:37 +0100)]
ALSA: intel8x0: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fm801: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:31:35 +0000 (14:31 +0100)]
ALSA: fm801: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: es1968: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:29:55 +0000 (14:29 +0100)]
ALSA: es1968: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: es1938: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:21:18 +0000 (14:21 +0100)]
ALSA: es1938: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
Some debug prints are replaced with dev_dbg(), too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: ens137x: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:16:53 +0000 (14:16 +0100)]
ALSA: ens137x: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: cs5530: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:13:16 +0000 (14:13 +0100)]
ALSA: cs5530: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: cs4281: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:11:14 +0000 (14:11 +0100)]
ALSA: cs4281: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: cmipci: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 11:39:30 +0000 (12:39 +0100)]
ALSA: cmipci: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
Some commented debug prints are also enabled as dev_dbg().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: bt87x: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:08:22 +0000 (14:08 +0100)]
ALSA: bt87x: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: azt3328: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 13:04:46 +0000 (14:04 +0100)]
ALSA: azt3328: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
All debug print macros have been replaced with dev_dbg(), too.
Also, added the missing definition of snd_azf3328_ctrl_inw().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: azt3328: Remove function debug prints
Takashi Iwai [Tue, 25 Feb 2014 11:59:05 +0000 (12:59 +0100)]
ALSA: azt3328: Remove function debug prints

We have a better infrastructure in general, so let's reduce the
home-baked debug macros.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: atiixp-modem: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 11:56:40 +0000 (12:56 +0100)]
ALSA: atiixp-modem: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: atiixp: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 11:54:24 +0000 (12:54 +0100)]
ALSA: atiixp: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: als4000: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 11:51:05 +0000 (12:51 +0100)]
ALSA: als4000: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: als300: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 11:48:27 +0000 (12:48 +0100)]
ALSA: als300: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
Also, correct the printk level appropriately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: als300: Remove function debug prints
Takashi Iwai [Tue, 25 Feb 2014 11:46:10 +0000 (12:46 +0100)]
ALSA: als300: Remove function debug prints

We have a better infrastructure in general, so let's reduce the
home-baked debug macros.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: ad1889: Use standard printk helpers
Takashi Iwai [Tue, 25 Feb 2014 11:43:13 +0000 (12:43 +0100)]
ALSA: ad1889: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: rme96: Convert to the new pm_ops
Takashi Iwai [Tue, 25 Feb 2014 14:01:15 +0000 (15:01 +0100)]
ALSA: rme96: Convert to the new pm_ops

This driver slipped from the last rewrite.  Just convert to the new
standard pm ops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Replace with standard printk
Takashi Iwai [Tue, 25 Feb 2014 11:21:03 +0000 (12:21 +0100)]
ALSA: hda - Replace with standard printk

Use dev_err() and co for messages from HD-audio controller and codec
drivers.  The codec drivers are mostly bound with codec objects, so
some helper macros, codec_err(), codec_info(), etc, are provided.
They merely wrap the corresponding dev_xxx().

There are a few places still calling snd_printk() and its variants
as they are called without the codec or device context.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Enable sysfs attributes without CONFIG_SND_HDA_RECONFIG
Takashi Iwai [Tue, 25 Feb 2014 10:54:06 +0000 (11:54 +0100)]
ALSA: hda - Enable sysfs attributes without CONFIG_SND_HDA_RECONFIG

Some sysfs attributes like init_pin_configs or vendor_name are really
basic and should be available no matter whether the codec driver is
re-configurable or not.  Put them out of #ifdef
CONFIG_SND_HDA_RECONFIG and allow the read-only accesses.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add sysfs to codec object, too
Takashi Iwai [Tue, 25 Feb 2014 09:38:13 +0000 (10:38 +0100)]
ALSA: hda - Add sysfs to codec object, too

We have currently sysfs attributes for each hwdep, but basically these
should belong to the codec itself, per se.  Let's add them to the
codec object while keeping them for hwdep as is for compatibility.

While we are at it, split the sysfs-related stuff into a separate
source file, hda_sysfs.c, and keep only the stuff necessary for hwdep
in hda_hwdep.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Create own device struct for each codec
Takashi Iwai [Tue, 25 Feb 2014 06:53:47 +0000 (07:53 +0100)]
ALSA: hda - Create own device struct for each codec

As the HD-audio is treated individually in each codec driver, it's
more convenient to assign an own struct device to each codec object.
Then we'll be able to use dev_err() more easily for each codec, for
example.

For achieving it, this patch just creates an object "hdaudioCxDy".
It belongs to sound class instead of creating a new bus, just for
simplicity, at this stage.  No pm ops is implemented in the device
struct level but currently it's merely a container.  The PCM and hwdep
devices are now children of this codec device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Manage each codec instance individually
Takashi Iwai [Wed, 19 Feb 2014 10:41:09 +0000 (11:41 +0100)]
ALSA: hda - Manage each codec instance individually

Now each snd_hda_codec instance is managed via the device chain, the
registration and release are done by its callback instead of calling
from bus.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: Clean up snd_device_*() codes
Takashi Iwai [Tue, 4 Feb 2014 10:36:11 +0000 (11:36 +0100)]
ALSA: Clean up snd_device_*() codes

A few code cleanups and optimizations.  In addition, drop
snd_device_disconnect() that isn't used at all, and drop the return
values from snd_device_free*().

Another slight difference by this change is that now the device state
will become always SNDRV_DEV_REGISTERED no matter whether dev_register
ops is present or not.  It's for better consistency.  There should be
no impact for the current tree, as the state isn't checked.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: Use priority list for managing device list
Takashi Iwai [Wed, 29 Jan 2014 14:53:35 +0000 (15:53 +0100)]
ALSA: Use priority list for managing device list

Basically, the device type specifies the priority of the device to be
registered / freed, too.  However, the priority value isn't well
utilized but only it's checked as a group.  This results in
inconsistent register and free order (where each of them should be in
reversed direction).

This patch simplifies the device list management code by simply
inserting a list entry at creation time in an incremental order for
the priority value.  Since we can just follow the link for register,
disconnect and free calls, we don't have to specify the group; so the
whole enum definitions are also simplified as well.

The visible change to outside is that the priorities of some object
types are revisited.  For example, now the SNDRV_DEV_LOWLEVEL object
is registered before others (control, PCM, etc) and, in return,
released after others.  Similarly, SNDRV_DEV_CODEC is in a lower
priority than SNDRV_DEV_BUS for ensuring the dependency.

Also, the unused SNDRV_DEV_TOPLEVEL, SNDRV_DEV_LOWLEVEL_PRE and
SNDRV_DEV_LOWLEVEL_NORMAL are removed as a cleanup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hwdep: Allow to assign the given parent
Takashi Iwai [Tue, 25 Feb 2014 07:05:21 +0000 (08:05 +0100)]
ALSA: hwdep: Allow to assign the given parent

Just like PCM, allow hwdep to be assigned to a different parent device
than the card.  It'll be used for the HD-audio codec device in the
later patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hwdep: Take private_data as drvdata for sysfs
Takashi Iwai [Tue, 25 Feb 2014 09:00:58 +0000 (10:00 +0100)]
ALSA: hwdep: Take private_data as drvdata for sysfs

For referring to a different object from sysfs ops, take hwdep
private_data as stored via dev_set_drvdata() at creating the device
object.  In that way, the same sysfs ops can be used by different
device types.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: Create sysfs attribute files via groups
Takashi Iwai [Tue, 25 Feb 2014 07:30:50 +0000 (08:30 +0100)]
ALSA: Create sysfs attribute files via groups

Instead of calling each time device_create_file(), create the groups
of sysfs attribute files at once in a normal way.  Add a new helper
function, snd_get_device(), to return the associated device object,
so that we can handle the sysfs addition locally.

Since the sysfs file addition is done differently now,
snd_add_device_sysfs_file() helper function is removed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'for-linus' into HEAD
Takashi Iwai [Tue, 25 Feb 2014 11:12:17 +0000 (12:12 +0100)]
Merge branch 'for-linus' into HEAD

10 years agoALSA: hda - Avoid codec D3 for keeping mute LED up on Lenovo Yxx0
Takashi Iwai [Mon, 13 Jan 2014 15:18:25 +0000 (16:18 +0100)]
ALSA: hda - Avoid codec D3 for keeping mute LED up on Lenovo Yxx0

The GPIO line used for the mute LED control on Lenovo Yxx0 laptops is
cleared unexpectedly when the codec goes to D3, typically by
power-saving.  For avoiding it, add a power filter in the fixup.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16373
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add a fixup for HP Folio 13 mute LED
Takashi Iwai [Mon, 24 Feb 2014 14:23:10 +0000 (15:23 +0100)]
ALSA: hda - Add a fixup for HP Folio 13 mute LED

HP Folio 13 may have a broken BIOS that doesn't set up the mute LED
GPIO properly, and the driver guesses it wrongly, too.  Add a new
fixup entry for setting the GPIO pin statically for this laptop.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70991
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>