This is a fix for the problem in commit 785f857d1c, the pop noise
issue on some machines with ALC269. The problem was the uninitialized
state after the resume due to the delayed resume of the codec chips.
In that commit, we tried to fix by forcibly putting the codec to D3 at
suspend. But, this still also leaves the uninitialized state after
resume, and it _might_ be still problematic with some BIOS. Since the
commit turned out to regress another issues, we reverted it in the
end.
Now, in this fix, try to fix by turning on the codec immediately at
the resume path. We need to take care of the power-saving in this
case. When the device is woken up at the power-saved state, it should
go power-saving again after the resume.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This reverts commit 785f857d1c.
The commit causes a problem with the wrong D3 state after suspend
because the call of hda_set_power_state() involves with the power-up
sequence, which changes the power_count, and this confuses the resume
sequence that checks the power_count as well.
Originally, this go-to-D3 sequence should be a simple task without the
power-up sequence. But, it'd need some proper sanity checks in the
case of power-saved state, so it's not too easy to write now in the
3.4-rc cycle.
In short, the safest option now is to revert this affecting commit.
Of course, we need to clean up and robustify the power-saving code
better for 3.5 kernel.
Reported-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The call for alc_auto_parse_customize_define() must be done after the
fixup pre-probe initialization. Otherwise SKU_IGNORE fixup won't work
properly (e.g. HP RP5800 with ALC662 codec).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
snd_hdsp uses its own ioctls to acquire config- and status information.
Expose the corresponding ioctl handler via ioctl_compat, so that 32bit applications can use it on 64bit kernels.
Signed-off-by: Andre Schramm <andre.schramm@iosono-sound.com>
Reviewed-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acer Aspire 5739G requires the same fix-up for 4930G to support the
surround / bass speakers.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43180
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This assertion seems to imply that chip->dsp_code_to_load is a pointer.
It's actually an integer handle on the actual firmware, and 0 has no
special meaning.
The assertion prevents initialisation of a Darla20 card, but would also
affect other models. It seems it was introduced in commit dd7b254d.
ALSA sound/pci/echoaudio/echoaudio.c:2061 Echoaudio driver starting...
ALSA sound/pci/echoaudio/echoaudio.c:1969 chip=ebe4e000
ALSA sound/pci/echoaudio/echoaudio.c:2007 pci=ed568000 irq=19 subdev=0010 Init hardware...
ALSA sound/pci/echoaudio/darla20_dsp.c:36 init_hw() - Darla20
------------[ cut here ]------------
WARNING: at sound/pci/echoaudio/echoaudio_dsp.c:478 init_hw+0x1d1/0x86c [snd_darla20]()
Hardware name: Dell DM051
BUG? (!chip->dsp_code_to_load || !chip->comm_page)
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Nothing terribly exciting here, a bunch of small and simple fixes
scattered around the place.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJPoPrTAAoJEBus8iNuMP3dm44P/j4jOIwAG21DxG2k/HCuAIEg
RbctqGmEgx5qsUezFdWaHcFZGICJIp5C3er3oluJN9Lg/DDOn7+sgU/zR1U7dzdB
Nnn3ufG9N9Uq+g2g8YZBWJNLFJdv3Ph7WbctM3HpIdoAIFIycjHKLmU+ZHUY4EZp
Dbcey2mQQKyB+fnn4XyBHaR1SLHn+gmFHTJojAarkSyTpk03ijfBBiJzJ+AFxipz
v8SlVmsJJOJXTudNJoigcNBtKajO3lig871v1owboUyFcetPToituE0tz5E0xDnG
+ZSCc4QcrkAniQtE0kD7bl/z9MowLVWXkUPu0Is44EEcHMs8cFzm9DFTGQMeMm8H
7sfU8jhitC9p1D3OxPT3yJKtvEJXxvYBapU/KHBmvGQwnyHFa18NGr3GpF778nfN
4wTpfflp404SEsStHAyg403wiWbcB5BoMggfjEPEy1BxG5e6l+hLWTxrmaZCKs/v
pnM0qFzWqwPrIdqJz/U17srHfGNtkFSONKOoU0zertIFEY86FmoUwl62NVdv324L
N05Z5Ow9gPAovDfm0T3PLyWk+72cHQwWjC05j82bH+O2fVP6UEl5T34slwwFwl4E
saiJvcEfG2XXnGyDwpapToiFAmRCQ+rF8a3W1X9Fc79lEohOI6O+asNOStBgbF55
x20E4+dVfbUi5H3E43mK
=Z1L5
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for 3.4
Nothing terribly exciting here, a bunch of small and simple fixes
scattered around the place.
Signed-off-by: Oleg Matcovschi <oleg.matcovschi@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
As s3c2412-i2s is using the s3c_i2sv2 it should call the more specialised
s3c_i2sv2_register_dai instead of simply calling snd_soc_register_dai.
Without this call the snd_soc_dai_ops structure isn't initialised correctly.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The core allocates the live copies, we shouldn't try to duplicate it and
were buggy trying to do so as we were using uninitialised data for the
control data.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* commit f9dfbf9 "ASoC: tlv320aic23: convert to soc-cache" leads to
a bug preventing resumeof the codec as regmap expects a 9 bits data
register but 0xFFFF is passed in tlv320aic23_set_bias_level and this
values gets cached preventing any write to the TLV320AIC23_PWR
register as the final value produced by regmap is (register << 9) | value
* this patch solves the problem by only working on the 9 bits the
register contains.
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Commit 980b0bc69 ("ASoC: blackfin: Use dai_fmt") converted the blackfin ASoC
machine drivers to use the dai_links dai_fmt field to setup their DAI format.
For the bf5xx-ssm2602 the commit removed the manual call to snd_soc_dai_set_fmt,
but missed to set the dai_links dai_fmt field.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
While we need to clean up unused single ended line outputs we don't want
to do this if the outputs are in differential mode.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Slightly larger than normal - the DAPM fix is a "this should always have
worked" type of thing which is very clear and should have no impact on
systems that don't need it. The WM8994 fix is driver specific but
pretty important for that driver.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJPlURUAAoJEBus8iNuMP3dVL4P/1ynNUPmdBhiDeVT6BrJxeyL
dKGBaqYxv8Sfzu8O+TIaqCyls+qp3++vQO26YgeuZNBnE+OtRaJbbpatIBe7Gmyr
7glYowUih+B/lfLbwlPCKCAs2ahk6oUbY3bFVqgOgzX9Zt4M73MEs7oVTPD2TvtQ
ZkudzzopzvEquh1NT/+wLmdJwSgOGfa2fLyt/+OaD6LCxDaZ3RPsO/wFoEqnSjKp
rdqHeOKAg/vFDSfFMwhnqZ5hGUUTqg8HlZ3urYvGrkKsyNUgPkIeNQKy4e0FxeSP
Lqj/EbKvH0gKWNdQkG6AWQpdN5bpqtWZb0h5BIsZhWqmjy7dEOopjnh/Hrmj+nFQ
ac8SGqq2/2HhbE/irN3y4Z3wOJJq9BEiFdUqIntOq95eT3S1Ib00osLR0SMHLwqe
Sk8UfVAspt9tdzqbzy67enAEjDsNo3OalV7qXIjYzL+csCDs7yPEM+JFxKx45ubW
tz3Wr3zjSlShYIeIYxGF8VuiH0QBhcXFMME/hv/QLAmfT6KvB6JlKlyWvHqJhQYE
mKQLz7AvARBfoaPhwn2+wcXO157FTC22Xt6pKo9TLwCotHNP2YO6lLVPE10GF7rf
aecCJe3QAGAWf3TwAiqcv8vOaR6TaO2f3hSAAPkqEWh6uBVC6wib5fJZzuzOafr2
Grt/dZcdfaiN4Rdpok7F
=oz/g
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: updates for 3.4
Slightly larger than normal - the DAPM fix is a "this should always have
worked" type of thing which is very clear and should have no impact on
systems that don't need it. The WM8994 fix is driver specific but
pretty important for that driver.
This ensures a clean startup of the channels, without this change some
use cases could result in issues in a small proportion of cases.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Some old codecs like ALC880 seem to give a bogus pin capability value 0
occasionally. This breaks the new sanity check in snd_hda_set_pin_ctl().
Skip the sanity checks in such a case.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a new helper function to guess the default VREF pin control bits
for mic in. This can be used to set the pin control value safely
matching with the actual pin capabilities.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For setting the pin-control values more safely to match with the
actual pin capability bits, a copule of new helper functions,
snd_hda_set_pin_ctl() and snd_hda_set_pin_ctl_cache(), are
introduced. These are simple replacement of the codec verb write with
AC_VERB_SET_PIN_WIDGET but do more sanity checks and filter out
superfluous pin-control bits if they don't fit with the corresponding
pin capabilities.
Some codecs are screwed up or ignore the command when such a wrong bit
is set. These helpers will avoid such secret errors.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
According to the reporter, external mic starts to work if the
laptop-dmic model is used. According to BIOS pin config, all
pins are consistent with the alc269vb_laptop_dmic fixup, except
for the external mic, which is not present.
Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/950490
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge fixes for Thinkpad docking-station regressions for 3.3 kernels
back to 3.4. These were committed in that branch to make the stable
merging easier.
Conflicts:
sound/pci/hda/patch_conexant.c
ThinkPad 410,420,510,520 and X201 with cx50585 & co chips have the
docking-station ports, but BIOS doesn't initialize for these pins.
Thus, like the former X200, we need to set up the pins manually in the
driver.
The odd part is that the same PCI SSID is used for X200 and T400, thus
we need to prepare individual fixup tables for cx5051 and others.
Bugzilla entries:
https://bugzilla.redhat.com/show_bug.cgi?id=808559https://bugzilla.redhat.com/show_bug.cgi?id=806217https://bugzilla.redhat.com/show_bug.cgi?id=810697
Reported-by: Josh Boyer <jwboyer@redhat.com>
Reported-by: Jens Taprogge <jens.taprogge@taprogge.org>
Tested-by: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some output pins on Conexant chips have no HP control bit, but the
auto-parser initializes these pins unconditionally with PIN_HP.
Check the pin-capability and avoid the HP bit if not supported.
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Current alsa_sound_last_init() was called as __initcall().
So, on current ALSA, only devices that had been properly
registered at this point were shown.
So, it will show "No soundcards found" if driver requests
probe deferment. it's often misleading.
This patch delays the timing of alsa_sound_last_init()
as workaround.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
While refactoring the mute-LED handling for HP laptops, I messed up
the polarity check in a wrong way. The red (or the mute-LED if any)
should appear in the muted state, corresponding to GPIO on.
Reported-by: Mikko Vinni <mmvinni@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Through the transition to the auto-parser, the support for
Quanta/Gericom KN1 got broken. There are two problems behind it:
- This machine doesn't like the default COEF setup for ALC260 we take
now as default
- BIOS doesn't set the pins correctly at all; especially the machine
uses only the pin 0x0f for both headphone and speaker
This patch adds the fixup as a workaround for these issues.
Reported-and-tested-by: Uros Vampl <mobile.leecher@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Leading up to the ->device_prep_slave_sg change in
185ecb5f4f 'dmaengine: add context
parameter to prep_slave_sg and prep_dma_cyclic' a generic wrapper was
added in place to guard against the API change, though the fsi driver
wasn't updated in the process (presumably its dmaengine support hadn't
been merged yet at the time). This trivially switches over to the new
wrapper and gets it building again.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix kernel-doc warning in sound/core/vmaster.c:
Warning(sound/core/vmaster.c:429): No description found for parameter 'private_data'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Currently we increment the number of RTD's per card during the DAI link
bind. This can cause an incorrect RTD count when we cannot find a component
and defer the probe (and hence perform the DAI link bind for the card again).
Fix the count so that it is cleared before every card registration
and bind attempt.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If cs42l73_get_mclkx_coeff() returns < 0 (which it can) in
sound/soc/codecs/cs42l73.c::cs42l73_set_mclk(), then we'll be using
the (negative) return value as array index on the very next line of
code - that's bad.
Catch the negative return value and propagate it to the caller (which
checks for it) and things are a bit more sane :-)
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In sound/pci/hda/patch_realtek.c::alc_auto_fill_dac_nids(), in the
'for (;;)' loop, if the 'badness' value returned from
fill_and_eval_dacs() is negative, then we'll return from the function
without freeing the memory we allocated for 'best_cfg', thus leaking.
Fix the leak by kfree()'ing the memory when badness is negative.
While I was there I also noticed some trailing whitespace in the
function that I removed (along with all other trailing whitespace in
the file) - it didn't seem worth-while to do that as two patches, so I
hope it's OK that I just did it all as one patch.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Line widgets had not been included in either the power up or power down
sequences so if a widget had an event associated with it that event would
never be run. Fix this minimally by adding them to the sequences, we
should probably be doing away with the specific widget types as they all
have the same priority anyway.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
A user reported that setting model=imac24 used to allow sound to work on their
Mac Pro 5,1 machine. Commit 5671087ffa "Move ALC885 macpro and imac24 models
to auto-parser" removed this model option. All Mac machines are now explicitly
handled with a quirk and the auto-parser. This adds a quirk for the device
found on the Mac Pro 5,1 machines.
This (partially) fixes https://bugzilla.redhat.com/show_bug.cgi?id=808559
[sorted the new entry in the ID number order by tiwai]
Reported-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It's compatible with 8930G.
Using the same fixup gives the proper 5.1 sound back.
Reported-and-tested-by: Dany Martineau <dany.luc.martineau@gmail.com>
Cc: <stable@kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add GPIO1 setup explicitly for Acer Aspire 493x & co.
This could be set by alc_auto_init_amp(), but it's safer to set it
more explicitly in the fixup table.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since there are still many Acer models that might not be covered by
the current fixup table, let's add back a few typical model names so
that user can test the fixup without recompiling.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Make sure we don't dereference the "quirk" pointer when it is null.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Also remove two warnings when CONFIG_SND_DEBUG is not set:
sound/pci/hda/patch_hdmi.c: In function ‘hdmi_intrinsic_event’:
sound/pci/hda/patch_hdmi.c:761:6: warning: unused variable ‘eldv’ [-Wunused-variable]
sound/pci/hda/patch_hdmi.c:760:6: warning: unused variable ‘pd’ [-Wunused-variable]
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
At the point of this error-handling code, both regions and the dma have
been allocated, so free it as done in previous and subsequent
error-handling code.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
At the point of this error-handling code, HAVE_DSPCODEH may be undefined,
so free INITCODE and PERMCODE as done elsewhere. A jump and label are
introduced to avoid code duplication.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A bunch of driver-specific fixes and one generic fix for the new support
for platform DAPM contexts - we were picking the wrong default for the
idle_bias_off setting which was meaning we weren't actually achieving
any useful runtime PM on platform devices.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPftQoAAoJEBus8iNuMP3du4IQAIxcJs4Q6wckpnu8bcFr4+Gr
UstCaoS7R3BROe1rtZJr6WPzkVGkriYJdRvH66q/PDJ9f97CFMR4b0IwKnHXUbbL
CVR8dod1I4+0PGF7D08UfHln5uUYO17HaKB5aYPzzcBegA4DZwUtSvnvaBVpg7kK
JQM5S6G6nb68mroyfSF6XsmCM3ehwgykiqlo1TH9WQQ0Z6KbNatV86mi2W8jxvwB
xh7EafL1v9MmpDkqEVEseaI6Mr7N/DiaNHzozqW7Na2nVgddRTXzh2dXA8gsr4VW
vsAoIrACc0zCgmwyYgRN0Dg8k2hqcbERbd/prmgHCYDUQc6n6mUf/AwE+ZZMo0FK
iCOMMZbESxxWqPNnSz9+H5pgoDLITB8kTOjp1TwGu9xYc0wEkHo+DiG5ZG3pZsCv
OKfF/FiBL30OlsefT+kKFzn+3Ve9ryJ4NZ7SYg6zWGqLmBidWle3c2yZqAldSavx
kHjw4I1YAO552fGK7v5Dij/ClUps5dYdiczxqzdIgH0GE0sTfsYQrtfl8nXy5+mf
cKAljqwM9ONAZ7CbAO6To6MPy9qhCmVLGPFGT7BdXJDyK2YGLGGWQiRITdnULSZd
AhG8EitOgtgOprMFLEgkcKb6cnHE4/Ry1V8jhYg0+1D+YIuTWhsYeO+mci+zto/r
0ZnX6E5R/aA8Z56+7xgU
=EiwZ
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: fixes for 3.4
A bunch of driver-specific fixes and one generic fix for the new support
for platform DAPM contexts - we were picking the wrong default for the
idle_bias_off setting which was meaning we weren't actually achieving
any useful runtime PM on platform devices.
name pins consistently (MIC1/LINE1/HP-OUT/CD) on all controls
affecting those pins.
remove duplicate SET_AMP_GAIN_MUTE to 0x17/index 0 and 0x17/index 1
really select MIC1, not Mixer out for recording
"Mixer out" for recording is not a "pin", adjust comment
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>