Commit graph

14306 commits

Author SHA1 Message Date
Mark Brown 36e8fe9901 ASoC: wm_adsp: Add speaker Tx as a firmware option
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26 11:39:42 +08:00
Mark Brown 338c5188f6 ASoC: wm_adsp: Correct handling of some coefficeint blocks
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24 00:42:27 +08:00
Mark Brown 20da6d5ac0 ASoC: wm_adsp: Provide explicit trace of coefficient writes
Helpful for debugging.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21 17:46:35 +09:00
Mark Brown 69485d3e6d Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adsp 2013-01-21 17:46:16 +09:00
Mark Brown f2a93e2a4c ASoC: wm_adsp: Use GFP_DMA for algorithm readback
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:17:30 +09:00
Mark Brown 7881fd0fb3 ASoC: wm_adsp: Use GFP_DMA for things that may be DMAed
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:14:34 +09:00
Mark Brown 25c62f7e70 ASoC: wm_adsp: Make region identification errors more informative
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-20 22:13:24 +09:00
Chris Rattray 94e205bfb7 ASoC: wm_adsp: Set ADSP1 clock rate to match sys clock
Sets the ADSP1 clock rate to match the system clock
rate. To support this the codec driver provides
details of register containing the system clock
control bits.

Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 17:46:28 +09:00
Mark Brown c712326d6c ASoC: wm_adsp: Implement support for coefficeint file format 1
Implement support for a new revision of the coefficeint file format for
ADSP cores.

Since coefficient file format 0 has not been widely deployed and is very
unlikely to ever be used with this driver code support for it has been
removed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18 15:02:17 +09:00
Mark Brown 5e7a7a221f ASoC: wm_adsp: Add initialisation function for ADSP1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-16 10:21:57 +09:00
Takashi Iwai 6f54c36132 ALSA: hda/hdmi - Work around "alsactl restore" errors
When "alsactl restore" is performed on HDMI codecs, it tries to
restore the channel map value since the channel map controls are
writable.  But hdmi_chmap_ctl_put() returns -EBADFD when no PCM stream
is assigned yet, and this results in an error message from alsactl.
Although the error is harmless, it's certainly ugly and can be
regarded as a regression.

As a workaround, this patch changes the return code in such a case to
be zero for making others happy.  (A slight excuse is: when the chmap
is changed through the proper alsa-lib API, the PCM status is checked
there anyway, so we don't have to be too strict in the kernel side.)

Cc: <stable@vger.kernel.org> [v3.7+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15 14:55:16 +01:00
Eldad Zack 39e95156b9 ALSA: usb-audio: selector map for M-Audio FT C400
Add names of the clock sources for the M-Audio Fast Track
C400.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:06:11 +01:00
Eldad Zack 83e3acd494 ALSA: usb-audio: M-Audio FT C400 skip packet quirk
Attain constant real-world latency by skipping 16 data packets.
The number of packets to be skipped was found by trial and error.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:06:03 +01:00
Eldad Zack 2aad272b3f ALSA: usb-audio: correct M-Audio C400 clock source quirk
Taking another look at the C400 descriptors, I see now that there is
a clock selector (0x80) for this device.
Right now, the clock source points to the internal clock (0x81), which
is also valid. When the external clock source (0x82) is selected in the
mixer, and the rates mismatch (if it's free-running it is fixed to
48KHz), xruns will occur.

Set the clock ID to the clock selector unit (0x81), which then
allows the validation code to function correctly.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:05:57 +01:00
David Henningsson b98ae2729d ALSA: usb - fix race in creation of M-Audio Fast track pro driver
A patch in the 3.2 kernel caused regression with hotplugging the
M-Audio Fast track pro, or sound after suspend. I don't have the
device so I haven't done a full analysis, but it seems userspace
(both udev and pulseaudio) got confused when a card was created,
immediately destroyed, and then created again.

However, at least one person in the bug report (martin djfun)
reports that this patch resolves the issue for him. It also leaves
a message in the log:
"snd-usb-audio: probe of 1-1.1:1.1 failed with error -5" which is
a bit misleading. It is better than non-working audio, but maybe
there's a more elegant solution?

BugLink: https://bugs.launchpad.net/bugs/1095315
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-14 10:03:03 +01:00
Mark Brown 1023dbd90c ASoC: wm_adsp: Add basic firmware selection support
There are many firmwares available for ADSP devices. Add basic support
for selecting between them, including a couple of feature sets in the
set of available firmware to start off with.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12 18:36:07 +00:00
Takashi Iwai 31be5425d7 ALSA: usb-audio: Fix NULL dereference by access to non-existing substream
The commit [0d9741c0: ALSA: usb-audio: sync ep init fix for
audioformat mismatch] introduced the correction of parameters to be
set for sync EP.  But since the new code assumes that the sync EP is
always paired with the data EP of another direction, it triggers Oops
when a device only with a single direction is used.

This patch adds a proper check of sync EP type and the presence of the
paired substream for avoiding the crash.

Reported-and-tested-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-11 11:12:17 +01:00
Takashi Iwai c18ab0bac4 ASoC: Fixes for v3.8
Nothing terribly exciting here except for the DOUBLE_RANGE fix which
 just hadn't worked before, nobody noticed due to lack of use.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ7rMBAAoJELSic+t+oim9kIsP/3tsJ+GZQu8WJHRGsnCMquC3
 fFpf7uJ9Lc4O9UJ2xmwn3igN6iNFPushVqXY62J+51Mey27o+tmvHs7+7AUQiXmE
 Pbr3OR9OntmA8CmI9G3QUxBaxsdJ6ZtijPRIfWquvTx58zF4EFJXn2HymOEhW2fB
 488OGauLIa5cG7B1WysxjxJ3ZA4sumzzvHmrPSOszYZfl3OCF1HK3PbmUiCtDSdu
 XxPOogzQJRpVVRquMtuyiPJf+ZxKNRUPxm/YWQ66q0e3fSNsFIDXF3UPSMe4lwGt
 OCH7FlgifZ5yjzToeUlsRNzNbopaZ70I9q65iy7xZLRwVvfRLpX45SkK1UXEzFDI
 6QSwlv5ANxGdlQIsoFOj0m/+3AjIaKmhXcxutuiydCfTido1PSy7N0aE3WZNVD1m
 mRPtz5tbLb+iFkCiu3tSA+eTJ1MS8WUWDz9QyfD2TVHEpdNJEfXTO3hddlPUDAmU
 n81bCsCoaJ5KzIZ1lkC5I1YXbMPlQ2DY46V5GX+hxscWueKtjILUwZDKUgz/ZlEb
 O3CCA7UWRNRAEBtCXbcZDE1mTd1+5ePNrL7mbFOwUOXhVtD3aRByY7zd5sv2/rzh
 7XqsPdMsTaxRN/TAXXYOpR3Hoqy31Q2gZC/0oC+P2MGW6/oGLJtvSLsfJHGMvkGP
 /9pkWIp/uRnFJ40cEYEe
 =dgII
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v3.8

Nothing terribly exciting here except for the DOUBLE_RANGE fix which
just hadn't worked before, nobody noticed due to lack of use.
2013-01-10 17:41:54 +01:00
Mark Brown 49a170bcf2 Merge remote-tracking branch 'asoc/fix/wm5100' into tmp 2013-01-10 12:22:30 +00:00
Mark Brown 921c038d87 Merge remote-tracking branch 'asoc/fix/wm2200' into tmp 2013-01-10 12:22:29 +00:00
Mark Brown 28f2675db8 Merge remote-tracking branch 'asoc/fix/wm2000' into tmp 2013-01-10 12:22:26 +00:00
Mark Brown 92a9d1524e Merge remote-tracking branch 'asoc/fix/wm-adsp' into tmp 2013-01-10 12:22:25 +00:00
Mark Brown a883eae513 Merge remote-tracking branch 'asoc/fix/sta529' into tmp 2013-01-10 12:22:22 +00:00
Mark Brown fd2eab87a2 Merge remote-tracking branch 'asoc/fix/sgtl5000' into tmp 2013-01-10 12:22:17 +00:00
Mark Brown 87fee06c5b Merge remote-tracking branch 'asoc/fix/pxa' into tmp 2013-01-10 12:22:16 +00:00
Mark Brown c31b71de6f Merge remote-tracking branch 'asoc/fix/lm49453' into tmp 2013-01-10 12:22:15 +00:00
Mark Brown fa17cb4a02 Merge remote-tracking branch 'asoc/fix/cs42l52' into tmp 2013-01-10 12:22:14 +00:00
Mark Brown 587691ea39 Merge remote-tracking branch 'asoc/fix/cs4271' into tmp 2013-01-10 12:22:11 +00:00
Mark Brown a18a31a161 Merge remote-tracking branch 'asoc/fix/core' into tmp 2013-01-10 12:21:50 +00:00
Mark Brown ae1abb0c3b Merge remote-tracking branch 'asoc/fix/arizona' into tmp 2013-01-10 12:21:42 +00:00
Kailang Yang 065380f088 ALSA: hda - Add support of new codec ALC284
Added the support for a new codec ALC284, which is compatible with
ALC269.  Also add more codec variants to handle the SSID check
properly.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-10 10:27:46 +01:00
Sachin Kamat e8e7da23c9 ALSA: usb-audio: Make ebox44_table static
Fixes the following sparse warning:
sound/usb/mixer_quirks.c:1209:23: warning:
symbol 'ebox44_table' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-10 10:22:25 +01:00
Andre Schramm 56bde0f328 ALSA: hdspm - Fix wordclock status on AES32
Use correct bitmask for AES32 cards to determine wordclock lock state,
add missing bitmask for sync check and make output of the corresponding
control and /proc coherent.

Signed-off-by: Andre Schramm <andre.schramm@iosono-sound.com>
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-09 16:59:24 +01:00
David Henningsson 7ed4165e2d Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs"
This reverts commit 697c373e34.

The original patch was meant to remove clicking, but in fact caused even
more clicking instead.

Thanks to c4pp4 for doing most of the work with this bug.

BugLink: https://bugs.launchpad.net/bugs/886975
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-09 11:03:38 +01:00
Takashi Iwai d7dab4dbbb ALSA: hda - Disable runtime D3 for Intel CPT & co
We've got a few bug reports that the runtime D3 results in the dead
HD-audio controller.  It seems that the problem is in a deeper level
than the sound driver itself, so as a temporal solution, disable the
feature for these controllers again.

Reported-and-tested-by: Vincent Blut <vincent.debian@free.fr>
Reported-and-tested-by: Maurizio Avogadro <mavoga@gmail.com>
Cc: <stable@vger.kernel.org> [v3.7]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-09 11:00:08 +01:00
Mark Brown 471f488583 ASoC: wm_adsp: Implement support for algorithm-specific coefficient blocks
WMDR coefficient files can specify coefficients in terms of algorithm
specific data regions. Record the start addresses of these regions while
parsing the algorithms and then use them to handle coefficients with
these formats.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 20:47:34 +00:00
Mark Brown d62f4bc665 ASoC: wm_asdp: Validate sanity of algorithm count
If we run into I/O problems the algorithm count may be crazy, validate it
before we proceed and dump the read data for diagnostic purposes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 20:47:32 +00:00
Mark Brown 45b9ee72d0 ASoC: wm_adsp: Factor out calculation of memory base addresses
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 20:47:30 +00:00
Mark Brown db40517c75 ASoC: wm_adsp: Add support for parsing algorithms
ADSP devices report information on the algorithms loaded on them.  Parse
this data and use it to allow coefficients to be configured for specific
algorithms.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08 20:47:29 +00:00
Mike Dunn 3b4bc7bccc ALSA: pxa27x: fix ac97 warm reset
This patch fixes some code that implements a work-around to a hardware bug in
the ac97 controller on the pxa27x.  A bug in the controller's warm reset
functionality requires that the mfp used by the controller as the AC97_nRESET
line be temporarily reconfigured as a generic output gpio (AF0) and manually
held high for the duration of the warm reset cycle.  This is what was done in
the original code, but it was broken long ago by commit fb1bf8cd
    ([ARM] pxa: introduce processor specific pxa27x_assert_ac97reset())
which changed the mfp to a GPIO input instead of a high output.

The fix requires the ac97 controller to obtain the gpio via gpio_request_one(),
with arguments that configure the gpio as an output initially driven high.

Tested on a palm treo 680 machine.  Reportedly, this broken code only prevents a
warm reset on hardware that lacks a pull-up on the line, which appears to be the
case for me.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-08 11:27:35 +00:00
Mike Dunn 41b645c862 ALSA: pxa27x: fix ac97 cold reset
Cold reset on the pxa27x currently fails and

     pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)

appears in the kernel log.  Through trial-and-error (the pxa270 developer's
manual is mostly incoherent on the topic of ac97 reset), I got cold reset to
complete by setting the WARM_RST bit in the GCR register (and later noticed that
pxa3xx does this for cold reset as well).  Also, a timeout loop is needed to
wait for the reset to complete.

Tested on a palm treo 680 machine.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-08 11:27:27 +00:00
Mark Brown a76fefab5c ASoC: wm_adsp: Ensure that block writes are from DMA aligned addresses
Otherwise we won't run correctly on systems that require this for larger
data transfers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-07 19:13:35 +00:00
David Henningsson 6d3cd5d444 ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
The mute LED is in this case connected to the Mic1 VREF.

The machine also exposes the following string in BIOS:
"HP_Mute_LED_0_A", so if more machines are coming, it probably
makes sense to try to do something more generic, like for the
IDT codec.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1096789
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-07 17:29:55 +01:00
Nickolai Zeldovich 61ed1dca16 ALSA: au88x0: fix incorrect left shift
vortex_wt_setdsout performs bit-negation on the bit position (wt&0x1f)
rather than on the resulting bitmask.  This code is never actually
invoked (vortex_wt_setdsout is always called with en=1), so this does
not currently cause any problem, and this patch is simply cleanup.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-07 09:33:56 +01:00
Mark Brown 267f8fa2e1 ASoC: wm2000: Fix sense of speech clarity enable
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 21:19:42 +00:00
Mark Brown 5f960294e2 ASoC: wm5100: Remove DSP B and left justified formats
These are not supported

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 21:06:08 +00:00
Mark Brown d71753e22b ASoC: arizona: Remove DSP B and left justified AIF modes
These are not supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 11:33:22 +00:00
Mark Brown 0cc411b934 ASoC: wm2200: Remove DSP B and left justified AIF modes
These are not supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-01-04 11:31:57 +00:00
Asim Kadav dc30a43690 sound: oss/pas2: Fix possible access out of array
Added a fix for hardware dependence bug where a sound card failure
should not result in reading beyond array memory index.

Signed-off-by: Asim Kadav <kadav@cs.wisc.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-04 10:38:27 +01:00
Damien Zammit b7b435e81b ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirk
This patch is based on 3.8-rc1. It fixes two things:
1) A kernel panic caused by incorrect allocation of a u8 variable
   "bootresponse".
2) A noisy dmesg (urb status -32) caused by broken pipe to an
   invalid midi endpoint.

It is also a little cleaner because there is no need for a new
QUIRK_MIDI type as suggested by kernel developers, since the device
follows exactly the MIDIMAN protocol.

Signed-off-by: Damien Zammit <damien@zamaudio.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-04 09:53:17 +01:00