Commit graph

321385 commits

Author SHA1 Message Date
Mengdong Lin b8dfc46241 ALSA: hda - add runtime PM support
Runtime PM can bring more power saving:
- When the controller is suspended, its parent device will also have a chance
  to suspend.
- PCI subsystem can choose the lowest power state the controller can signal
  wake up from. This state can be D3cold on platforms with ACPI PM support.
And runtime PM can provide a gerneral sysfs interface for a system policy
manager.

Runtime PM support is based on current HDA power saving implementation. The user
can enable runtime PM on platfroms that provide acceptable latency on transition
from D3 to D0.

Details:
- When both power saving and runtime PM are enabled:
  -- If a codec supports 'stop-clock' in D3, it will request suspending the
     controller after it enters D3 and request resuming the controller before
     back to D0. Thus the controller will be suspended only when all codecs are
     suspended and support stop-clock in D3.
  -- User IO operations and HW wakeup signal can resume the controller back to
     D0.
- If runtime PM is disabled, power saving just works as before.
- If power saving is disabled, the controller won't be suspended because the
  power usage counter can never be 0.

More about 'stop-clock' feature:
If a codec can support targeted pass-through operations in D3 state when there
is no BCLK present on the link, it will set CLKSTOP flag in the supported power
states and report PS-ClkStopOk when entering D3 state. Please refer to HDA spec
section 7.3.3.10 Power state and 7.3.4.12 Supported Power State.

[Fixed CONFIG_PM_RUNTIME dependency in hda_intel.c by tiwai]

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-23 14:21:32 +02:00
Takashi Iwai 8a5354140a ALSA: hda - Call snd_hda_jack_report_sync() generically in hda_codec.c
Instead of calling the jack sync in the init callback of each codec,
call it generically at initialization and resume.  By calling it at
the last of resume sequence, a possible race between the jack sync and
the unsol event enablement in the current code will be closed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-22 16:48:17 +02:00
Ondrej Zary f993348746 ALSA: introduce snd-cmi8328: C-Media CMI8328 driver
Introduce snd-cmi8328 driver for C-Media CMI8328-based sound cards, such as
AudioExcel AV500.

It supports PCM playback and capture (full-duplex) through wss_lib, gameport,
OPL3 and MPU401. The AV500 card has onboard Dream wavetable synth connected
to the MPU401 port and Aux 1 input internally which works too.
The CDROM interface is not supported (as the drivers for these CDROMs were
removed from the kernel some time ago).

A separate driver is needed because CMI8328 is completely different chip to
CMI8329/CMI8330. It's configured by magic registers (there's no PnP). Sound is
provided by a real WSS codec (CS4231A) and the SB part is just a SB Pro
emulation (for DOS games, useless for Linux).

When SB is enabled, the CMI8328 chip disables access to the WSS codec,
emulates SoundBlaster on one side and outputs sound data to the codec - so SB
and WSS can't work together with this card. The WSS codec can do full duplex
by itself so there's no need for crazy things like snd-cmi8330 does
(combining SB and WSS parts into one driver).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-21 07:30:46 +02:00
Takashi Iwai ddf83485d7 Merge branch 'for-linus' into for-next
Conflicts:
	sound/pci/hda/hda_codec.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 22:14:26 +02:00
Takashi Iwai 535b6c51fe ALSA: hda - Fix leftover codec->power_transition
When the codec turn-on operation is canceled by the immediate
power-on, the driver left the power_transition flag as is.
This caused the persistent avoidance of power-save behavior.

Cc: <stable@vger.kernel.org> [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 21:25:22 +02:00
Takashi Iwai f0b433e9f3 ASoC: Additional updates for 3.6
A batch more bugfixes, all driver-specific and fairly small and
 unremarkable in a global context.  The biggest batch are for the newly
 added Arizona drivers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQLsRjAAoJEFJkBDiqVpZ4HI0QALREeI4Hq7xGxOEPsY9QV+Eh
 0zs+Q2KnlGKlm87cm3PfsIpI+atf8WGVAO5/nTk7TPewvPbkvJp8p6zgzaMwvq1r
 5TqTdwTOwg0UuoiFakmET6x7mHmYvks0U1uAm5VwPzdNbahvHLArCsRgufXtNsEz
 4M9FmLL/+e9r/n3EKXMoNYab4krvmyVft5QCUxFkHgfcbfv95KIn9So54T5H/jG9
 fzhmKjMMGUja7Q7nLtpr6OHkJLZd1iPTu8xdjsQB7htNW7P8KPaseVt0oAUXNkXS
 K0WhTjqtQbDtm9KfrifY0vpdWNLbTi1R+vnm6FwQiDN0fZ1Tm18992veNZfaOAUE
 QWlGzt5Av2sCGwNXA55SF0cLo1lbxD1kwGN9o45zztGw0wW5qjkH9VF92XkpqISh
 zdE+bQoQk7I9UBtwql/YtY17QLn3KUBoDlHDaOQqrmQYXW69J8RnnjUMskoO/2Tu
 LTMPWLPnudVXIcfW+C/j1GSBN0l0q3FHGBYVfoCWwXShwjIr3Fzg8hhtHwL056/J
 YhEykqucR4iDJaOpjSxKiiKWjFfMQBkzipuTL6p/vqQJ3fPTp9LjQTABUnzsGqYQ
 mIx9W3BqZ1q/LiZYPYEExiIChdlE3g6+aFZfukk0sQQ0/dpipC/0qXRWMb8Kks6W
 18HFsHL5jX5s5e8qG5ac
 =X06H
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Additional updates for 3.6

A batch more bugfixes, all driver-specific and fairly small and
unremarkable in a global context.  The biggest batch are for the newly
added Arizona drivers.
2012-08-20 21:26:04 +02:00
Takashi Iwai 099d53c308 ALSA: hda - Add missing ifdef CONFIG_SND_HDA_POWER_SAVE to tracepoints
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 18:04:40 +02:00
Andi Kleen 8dea9d382a ALSA: lto, sound: Fix export symbols for !CONFIG_MODULES
The new LTO EXPORT_SYMBOL references symbols even without CONFIG_MODULES.
Since these functions are macros in this case this doesn't work.
Add a ifdef to fix the build.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 11:53:10 +02:00
Takashi Iwai 65fcd41d37 ALSA: hda - Check the power state when power_save option is changed
... by calling the newly introduced snd_hda_power_sync().

I had to reimplement a wheel for adding the trigger at changing the
parameter -- the parameter set ops is overwritten to pass the integer
parameter, then trigger the power-state sync.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 11:46:06 +02:00
Takashi Iwai c376e2c72b ALSA: hda - Implement snd_hda_power_sync() helper function
Added a new helper function snd_hda_power_sync() to trigger the
power-saving manually.  It's an inline function call to
snd_hda_power_save() helper function.

Together with this addition, snd_hda_power_up*() and
snd_hda_power_down() functions are inlined to a call of the same
snd_hda_power_save() helper function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 11:46:05 +02:00
Takashi Iwai fa2f5bf096 Merge branch 'topic/ca0132-fix' into for-linus
This is a series of fixes for CA0132, especially the missing SPDIF I/O
and the mixer build errors.
2012-08-20 11:38:31 +02:00
David Henningsson c41999a239 ALSA: hda - don't create dysfunctional mixer controls for ca0132
It's possible that these amps are settable somehow, e g through
secret codec verbs, but for now, don't create the controls (as
they won't be working anyway, and cause errors in amixer).

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1038651
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 11:33:23 +02:00
Takashi Iwai b244d33560 ALSA: hda - Add tracepoints at snd_hda_power_up/down entrances.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 11:24:29 +02:00
Ondrej Zary 6f0fa66051 ALSA: snd-ad1816a: Implement suspend/resume
Implement suspend/resume support for AD1816 chips.
Tested with Terratec SoundSystem Base-1.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 11:12:56 +02:00
Ondrej Zary c86b6b452a ALSA: snd-ad1816a: remove useless struct snd_card_ad1816a
struct snd_card_ad1816a is only set but the values are never used then.
Removing it allows struct snd_card's private_data to be used for
struct snd_ad1816a, simplifying the code.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 11:10:39 +02:00
Julia Lawall c86b93628e ALSA: sound/ppc/snd_ps3.c: fix error return code
Initialize ret before returning on failure, as done elsewhere in the
function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 11:01:14 +02:00
Julia Lawall b17cbdd85f ALSA: sound/pci/rme9652/hdspm.c: fix error return code
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 11:00:51 +02:00
Julia Lawall ae970eb45d ALSA: sound/pci/sis7019.c: fix error return code
Initialize rc before returning on failure, as done elsewhere in the
function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 10:57:51 +02:00
Julia Lawall 4d8ce1c996 ALSA: sound/pci/ctxfi/ctatc.c: fix error return code
Initialize err before returning on failure, as done elsewhere in the
function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 10:57:30 +02:00
Julia Lawall 0c23e46eb4 ALSA: sound/atmel/ac97c.c: fix error return code
In the first case, the second test of whether retval is negative is
redundant.  It is dropped and the previous and subsequent tests are
combined.

In the second case, add an initialization of retval on failure of ioremap.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 10:56:01 +02:00
Julia Lawall aaf265c22e ALSA: sound/atmel/abdac.c: fix error return code
Initialize retval before returning from a failed call to ioremap.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 10:53:13 +02:00
Randy Dunlap 8513915acc ALSA: fix pcm.h kernel-doc warning and notation
Fix kernel-doc warning in <sound/pcm.h> and add function name to make
the kernel-doc notation complete.

Warning(include/sound/pcm.h:1081): No description found for parameter 'substream'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 10:26:47 +02:00
Dan Carpenter 94f3ec6b22 sound: oss/sb_audio: prevent divide by zero bug
Speed comes from get_user() in audio_ioctl().  We use it to set the "s"
variable before clamping it to valid values so it could lead to a divide
by zero bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-20 10:24:21 +02:00
Mark Brown 28c42c2830 ASoC: wm9712: Fix inverted capture volume
The capture volume increases with the register value so it shouldn't be
flagged as inverted.

Reported-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-17 22:43:18 +01:00
Mark Brown ccf795847a ASoC: wm9712: Fix microphone source selection
Currently the microphone input source is not selectable as while there is
a DAPM widget it's not connected to anything so it won't be properly
instantiated. Add something more correct for the input structure to get
things going, even though it's not hooked into the rest of the routing
map and so won't actually achieve anything except allowing the relevant
register bits to be written.

Reported-by: Christop Fritz <chf.fritz@googlemail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-08-17 22:42:14 +01:00
Mark Brown 939d5044b1 ASoC: wm5102: Remove DRC2
It will be removed from future device revisions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-17 22:38:27 +01:00
David Henningsson 5e68fb3cab ALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxx
Instead of blindly initializing a volume knob widget, first check
that there actually is a volume knob widget.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-16 14:14:56 +02:00
Takashi Iwai e9ba389c5f ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream
A PCM capture stream on usb-audio causes a scheduling-while-atomic
BUG, as reported in the bugzilla entry below.  It's because
snd_usb_endpoint_start() is called at first at trigger START for a
capture stream, and this function contains the left-over EP
deactivation codes.  The problem doesn't happen for a playback stream
because the function is called at PCM prepare time, which can sleep.

This patch fixes the BUG by moving the EP deactivation code into the
PCM prepare callback.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46011
Cc: <stable@vger.kernel.org> [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-16 08:04:07 +02:00
Takashi Iwai 1c86845268 ALSA: hda - Add 3stack-automute model to AD1882 codec
Added a simple support of automute for the front HP jack to AD1882
stack model.  Such an addition is basically an exception -- we really
want to avoid the static quirk codes, but AD1882 parser isn't still
ready for moving to the BIOS auto-parser yet.  So, as a quick fix, I
merged it for now.

In near future, we really need the big clean up of patch_analog.c to
move on to the auto-parser...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-15 11:50:05 +02:00
Takashi Iwai c7561cd804 ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP
Otherwise we may get compile warnings due to unused functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-14 18:12:04 +02:00
Takashi Iwai 7ccbde57ce ALSA: hda - Fix possible compile warnings regarding CONFIG_PM
Replace with a proper ifdef check of CONFIG_PM_SLEEP in hda_intel.c.
But other places in HD-audio driver are still marked with CONFIG_PM,
since these can be called for power-saving even without
CONFIG_PM_SLEEP.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-14 18:11:51 +02:00
Takashi Iwai 3bdcff70b6 ALSA: lx6464es: Add a missing error check
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44541

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-14 17:42:11 +02:00
David Henningsson 265d931a9e ALSA: hda - Fix 'Beep Playback Switch' with no underlying mute switch
Some Conexant devices (e g CX20590) have no mute capability on
their Beep widgets.
This patch makes sure we don't try setting mutes on those widgets.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-14 10:22:31 +02:00
Mark Brown 12022a7853 ASoC: jack: Always notify full jack status
Don't just notify for the bits we've updated, notify the full state of the
jack otherwise users might get confused by misleading reports.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-13 20:47:58 +01:00
Mark Brown 17c3f7e8f3 ASoC: wm5110: Add missing input PGA routes
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-13 13:27:30 +01:00
Mark Brown 14ebd8a8c1 ASoC: wm5102: Add missing input PGA routes
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-13 13:27:29 +01:00
Wang Xingchao 088c820b73 ALSA: hda - fix Copyright debug message
As spec said, 1 indicates no copyright is asserted.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-13 10:02:01 +02:00
Wang Xingchao 6152597971 ALSA: hda - show ICT/KAE control bits
Enable two debug options for S/PDIF Converter Control.
KAE: Keep Alive Enable; ICT: IEC Coding Type.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-13 10:01:29 +02:00
Sachin Kamat 61f5d61ef9 ASoC: Samsung: Fix build error
Fixes the following build error:
In file included from arch/arm/mach-exynos/include/mach/dma.h:24:0,
		from arch/arm/plat-samsung/include/plat/dma-ops.h:17,
		from arch/arm/plat-samsung/include/plat/dma.h:128,
		from sound/soc/samsung/pcm.c:23:
arch/arm/plat-samsung/include/plat/dma-pl330.h:106:8:
			error: redefinition of ‘struct s3c2410_dma_client’
arch/arm/plat-samsung/include/plat/dma.h:40:8: note: originally defined here
make[3]: *** [sound/soc/samsung/pcm.o] Error 1

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-10 18:07:20 +01:00
Mengdong Lin e037cb4a54 ALSA : hda - bug fix on checking the supported power states of a codec
The return value of snd_hda_param_read() is -1 for an error, otherwise
it's the supported power states of a codec.

The supported power states is a 32-bit value. Bit 31 will be set to 1
if the codec supports EPSS, thus making "sup" negative. And the bit
28:5 is reserved as "0".
So a negative value other than -1 shall be further checked.

Please refer to High-Definition spec 7.3.4.12 "Supported Power
States", thanks!

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-10 14:11:58 +02:00
David Henningsson 14bc9c6dc6 ALSA: hda - Fix panned "Beep Playback Switch"
When "Beep Playback Switch" had a different value on left and right
channels (such as muting left but not right, or vice versa), this
could result in the right channel being ignored.

This patch enables beep to be sounding from right channel only, and
also give correct result back to userspace (e g amixer).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-10 14:10:20 +02:00
Dan Carpenter de64c0ee7d ALSA: cs46xx - signedness bug in snd_cs46xx_codec_read()
This function returns its own error codes instead of normal negative
error codes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-10 12:11:21 +02:00
Mark Brown 9c30959884 MAINTAINERS: Add entries for Wolfson Arizona class devices
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-10 11:09:36 +01:00
Mark Brown fb099cb712 ASoC: core: Upgrade the severity of probe deferral errors to dev_err()
In the past when ASoC had a custom probe deferral mechanism people
complained about the logspam it generated and didn't want to know about
the fact that we were doing probe deferral so all the error messages for
it were at dev_dbg(), making diagnostics hard. Now that we have probe
deferral as an accepted thing and it's generating log messages anyway
there's no need to worry about this so upgrade the severity of all the
probe deferral sources to dev_err() so that they are displayed by default.

Also add one for missing aux_devs since there wasn't one.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-09 19:34:04 +01:00
James Ralston 144dad99ef ALSA: hda_intel: Add Device IDs for Intel Lynx Point-LP PCH
This patch adds the Intel HD Audio Device IDs for the Intel Lynx Point-LP PCH

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-09 18:42:42 +02:00
Takashi Iwai 7b03d1d9c0 Merge branch 'topic/hda-probe-defer' into for-next
Fix a build error when CONFIG_SND_HDA_PATCH_LOADER isn't set.
2012-08-09 17:41:44 +02:00
Takashi Iwai 97c6a3d17b ALSA: hda - Fix forgotten ifdef CONFIG_SND_HDA_PATCH_LOADER
The firmware callback must be protected by that ifdef.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-09 17:41:01 +02:00
Takashi Iwai 5f1890897c Merge branch 'topic/hda-probe-defer' into for-next
This branch fixes the stall during probing the HD-audio driver when
the specified "patch" firmware doesn't exist.  It's basically a long-
standing issue, but mostly harmless until the recent rework of
firmware loader base code.
2012-08-09 16:30:13 +02:00
Takashi Iwai 5cb543dba9 ALSA: hda - Deferred probing with request_firmware_nowait()
For processing the firmware handling properly for built-in kernels,
implement an asynchronous firmware loading with
request_firmware_nowait().  This means that the codec probing is
deferred when the patch option is specified.

Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-09 16:28:51 +02:00
Takashi Iwai 4918cdab49 ALSA: hda - Load firmware in hda_intel.c
This is a preliminary work for the deferred probing for
request_firmware() errors at init.

This patch moves the call of request_firmware() to hda_intel.c, and
call it in the earlier stage of probing rather than
azx_probe_continue().

Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-09 16:28:19 +02:00