1
0
Fork 0
Commit Graph

275256 Commits (c1d70dd9c44d7554b97f38b5ce8001d3cbe10f61)

Author SHA1 Message Date
Eliot Blennerhassett c1d70dd9c4 ALSA: asihpi - Use valid channel count in format enumeration.
Since introduction of mono and low latency modes, fixed channel count of 2
is not always valid.  Use reported max_channels instead.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:10 +01:00
Eliot Blennerhassett 8637bc94f6 ALSA: asihpi - Correct headers in cached control responses.
Previously, only payload and size were correct, sufficient for reading,
but other fields produced spurious debug output.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:10 +01:00
Eliot Blennerhassett f50efa2d9b ALSA: asihpi - Add HPI version to module description.
It is useful to know the HPI version without having to load the module,
in order to determine the matching firmware version.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:09 +01:00
Eliot Blennerhassett 4e225e2649 ALSA: asihpi - Distinguish four different emif init errors.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:08 +01:00
Eliot Blennerhassett 812550e9ef ALSA: asihpi - New defs and comments.
Add new error codes, and adapter properties.
Clean up some comments.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:07 +01:00
Eliot Blennerhassett 862e14185b ALSA: asihpi - Add autofade query.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:07 +01:00
Eliot Blennerhassett 50d5f773ec ALSA: asihpi - Simplify dsp code close.
dsp_code struct is not created if firmware is invalid, so check
and zero of firmware pointer is not necessary

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:06 +01:00
Eliot Blennerhassett 7036b92d30 ALSA: asihpi - Remove redundant struct members.
Structs hpi_adapter and snd_card_asihpi had members that
duplicate those in underlying hpi_adapter_obj or whose info
can be retrieved using hpi_adapter_get_info().

Print less info in probe function, it can be retrieved from /proc.

Avoid name redundancy: hpi_adapter_obj.adapter_type renamed to .type

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:05 +01:00
Eliot Blennerhassett 3dad06ac89 ALSA: asihpi - Increase debug response buffer size.
Enables retrieving more debug info in fewer transactions.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:05 +01:00
Eliot Blennerhassett 72868339e4 ALSA: asihpi - Add new function codes.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:04 +01:00
Eliot Blennerhassett d8aefaef1b ALSA: asihpi - Remove unused structs and defs
Structs related to network flash update are not required in kernel.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:03 +01:00
Eliot Blennerhassett 502f271ae3 ALSA: asihpi - Update node types.
Add "Internal" node type.
Remove GPI and GPO node types.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:02 +01:00
Eliot Blennerhassett 09c728aced ALSA: asihpi - Only set sync if card supports hardware stream grouping.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:02 +01:00
Eliot Blennerhassett 0be55c453f ALSA: asihpi - Relax drained check for more reliable playback startup.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:01 +01:00
Eliot Blennerhassett 8e0874ea72 ALSA: asihpi - Correct stray capital letters in identifier.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:00 +01:00
Eliot Blennerhassett cbd757daf5 ALSA: asihpi - Use snd_pcm_debug_name to get substream name.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:59 +01:00
Eliot Blennerhassett d4b06d23ab ALSA: asihpi - Volumes and meters may have 1 or 2 channels.
The channel count can be queried to determine which.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:58 +01:00
Eliot Blennerhassett c382a5da5c ALSA: asihpi - Low latency mode stream has fixed channel count.
Unlike other streams which support 1..max channels,

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:58 +01:00
Eliot Blennerhassett 40818b6242 ALSA: asihpi - Update copyright to 2011
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:57 +01:00
Eliot Blennerhassett f6baaec2af ALSA: asihpi - Split hpi version info into separate header file.
and update HPI version to 4.10

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:56 +01:00
Eliot Blennerhassett 47a74a5d1e ALSA: asihpi - fix pcm dma pointer tracking
Elapsed counter should only count data committed to snd_pcm_period_elapsed,
rather than all data available

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:12:52 +01:00
Takashi Iwai cde944803d ALSA: Add missing module parameters for als300 and cs5530 drivers
These drviers defined only variables but didn't declare as module
parameters.  Also fix the enable variable to bool type.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-19 10:34:44 +01:00
Rusty Russell a67ff6a540 ALSA: module_param: make bool parameters really bool
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-19 10:34:41 +01:00
Sergiusz Urbaniak 1bba160a07 ALSA: snd-usb: added VOX ToneLab ST midi handling
Signed-off-by: Sergiusz Urbaniak <sergiusz.urbaniak@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-12 12:49:02 +01:00
Thomas Meyer 6d2d431369 ALSA: asihp: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-06 13:27:32 +01:00
Thomas Meyer 1d5d37f408 ALSA: ctxf: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-06 13:27:22 +01:00
David Dillow 705978516f ALSA: sis7019 - convert to dev_*() logging
Signed-off-by: David Dillow <dave@thedillows.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-02 10:44:01 +01:00
Takashi Iwai b1ac29620b Merge branch 'fix/misc' into topic/misc 2011-12-02 10:43:52 +01:00
David Dillow fc084e0b93 ALSA: sis7019 - give slow codecs more time to reset
There are some AC97 codec and board combinations that have been observed
to take a very long time to respond after the cold reset has completed.
In one case, more than 350 ms was required. To allow users to have sound
on those platforms, we'll wait up to 500ms for the codec to become
ready.

As a board may have multiple codecs, with some faster than others to
reset, we add a module parameter to inform the driver which codecs
should be present.

Reported-by: KotCzarny <tjosko@yahoo.com>
Signed-off-by: David Dillow <dave@thedillows.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-02 10:43:06 +01:00
Takashi Iwai cf54d47c13 Merge branch 'fix/asoc' into for-linus 2011-12-01 16:32:18 +01:00
Charles Chin 88d686027b ALSA: hda - Fix S3/S4 problem on machines with VREF-pin mute-LED
The verb command in stac92xx_post_suspend caused the audio to stop
working after resuming from S3 mode on HP laptops with the VREF-pin
mute-LED control.  Removing relevant post_suspend registering.

Although removing D3 on AFG is no optimal solution, the impact should
be small in comparison with the broken S3/S4.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-01 11:27:43 +01:00
Marc Vertes 4f8b6c7dc8 ALSA: hda_intel - revert a quirk that affect VIA chipsets
This quirk sould be reverted. It has the following probems:

1) The quirk was intended to "ASUS MV2-MX SE" motherboards only, but the
ID used matches a much broader range, potentially all boards containing a
VIA chipset model in the family of vendor VIA 0x1106 and audio device ID
0x3288, which encompasses VIA-VT82xx, VIA-VT1xx and VIA-VT20xx chipsets.

2) VIA chipsets rely on azx_via_get_position() to handle correctly dma
transfers during capture. Using POS_FIX_LPIB instead of POS_FIX_VIACOMBO
leads to partially corrupted input buffers during capture. The effects
of this bug are not immediately visible, it took strong DSP expertise,
some expensive signal generator and a spectrum analyzer to identify it
and verify correct behaviour using original default.

3) It's almost certain that the quirk did not fix the real problem,
if there was one. Refer to original submission:
http://mailman.alsa-project.org/pipermail/alsa-devel/2010-February/025109.html

Signed-of-by: Marc Vertes <mvertes@sigfox.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-29 13:04:03 +01:00
Takashi Iwai 542c9a0a2f ALSA: hda - Avoid touching mute-VREF pin for IDT codecs
Some HP laptops use a pin VREF for controlling the mute LED, and such a
pin shouldn't be powered off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-29 13:01:30 +01:00
Lars-Peter Clausen bda63586bc firmware: Sigma: Fix endianess issues
Currently the SigmaDSP firmware loader only works correctly on little-endian
systems. Fix this by using the proper endianess conversion functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-29 11:59:50 +00:00
Lars-Peter Clausen c56935bdc0 firmware: Sigma: Skip header during CRC generation
The firmware header is not part of the CRC, so skip it. Otherwise the firmware
will be rejected due to non-matching CRCs.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-29 11:59:44 +00:00
Lars-Peter Clausen 4f718a29fe firmware: Sigma: Prevent out of bounds memory access
The SigmaDSP firmware loader currently does not perform enough boundary size
checks when processing the firmware. As a result it is possible that a
malformed firmware can cause an out of bounds memory access.

This patch adds checks which ensure that both the action header and the payload
are completely inside the firmware data boundaries before processing them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-29 11:53:53 +00:00
John F Leach ae7cc709f2 ALSA: usb-audio - Support for Roland GAIA SH-01 Synthesizer
Added table quirks entry for Roland GAIA SH-01 Synthesizer based upon
Roland SH-201 table entry as template.  USB MIDI and audio was tested
with Muse and Audacity.

Signed-off-by: John F Leach <jfleach@jfleach.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-29 08:23:15 +01:00
Mark Brown fc8e6e8668 ASoC: Supply dcs_codes for newer WM1811 revisions
Based on initial data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 23:18:38 +00:00
Mark Brown fc07ecd851 ASoC: Error out if we can't generate a LRCLK at all for WM8994
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 22:10:05 +00:00
Axel Lin a09452eeb7 ALSA: convert sound/* to use module_platform_driver()
This patch converts the drivers in sound/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-27 18:43:48 +01:00
Takashi Iwai f339240dd8 Merge branch 'fix/hda' into for-linus 2011-11-27 17:59:07 +01:00
Takashi Iwai 187d333edc ALSA: hda - Fix jack-detection control of VT1708
VT1708 has no support for unsolicited events per jack-plug, the driver
implements the workq for polling the jack-detection.  The mixer element
"Jack Detect" was supposed to control this behavior on/off, but this
doesn't work properly as is now.  The workq is always started and the
HP automute is always enabled.

This patch fixes the jack-detect control behavior by triggering / stopping
the work appropriately at the state change.  Also the work checks the
internal state to continue scheduling or not.

Cc: <stable@kernel.org> [v3.1]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-27 17:56:17 +01:00
Dan Carpenter 92bb43e6aa ALSA: hda - cut and paste typo in cs420x_models[]
The CS420X_IMAC27 was copied from the line before but CS420X_APPLE
was clearly intented.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-27 17:56:07 +01:00
Mark Brown 5b895eec11 ASoC: Correct name of Speyside Main Speaker widget
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27 16:03:51 +00:00
Axel Lin 51451b8d60 ALSA: Convert mips directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-24 13:03:02 +01:00
Takashi Iwai 77088cc973 Merge branch 'fix/asoc' into for-linus 2011-11-23 17:07:16 +01:00
Eric Miao 5ff1ddf22b ASoC: skip resume of soc-audio devices without codecs
There are cases where there is no working codec on the soc-audio devices,
and snd_soc_suspend() will skip such device when suspending. Yet its
counterpart snd_soc_resume() does not check this, causing complaints
about spinlock lockup:

[  176.726087] BUG: spinlock lockup on CPU#0, kworker/0:2/1067, d8ab82a8
[  176.732539] [<80014a14>] (unwind_backtrace+0x0/0xec) from [<805b3fc8>] (dump_stack+0x20/0x24)
[  176.741082] [<805b3fc8>] (dump_stack+0x20/0x24) from [<80322208>] (do_raw_spin_lock+0x118/0x158)
[  176.749882] [<80322208>] (do_raw_spin_lock+0x118/0x158) from [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68)
[  176.759723] [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68) from [<8002a020>] (__wake_up+0x2c/0x5c)
[  176.768781] [<8002a020>] (__wake_up+0x2c/0x5c) from [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0)
[  176.777666] [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0) from [<8004ee20>] (process_one_work+0x2e8/0x50c)
[  176.787334] [<8004ee20>] (process_one_work+0x2e8/0x50c) from [<8004fd08>] (worker_thread+0x1c8/0x2e0)
[  176.796566] [<8004fd08>] (worker_thread+0x1c8/0x2e0) from [<80053ec8>] (kthread+0xa4/0xb0)
[  176.804843] [<80053ec8>] (kthread+0xa4/0xb0) from [<8000ea70>] (kernel_thread_exit+0x0/0x8)

Signed-off-by: Eric Miao <eric.miao@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 14:56:36 +00:00
Axel Lin b284362b6b ASoC: cs42l51: Fix off-by-one for reg_cache_size
Just checking the code in cs42l51_fill_cache():
The cache pointer points to codec->reg_cache + 1.
I think it is because CS42L51_FIRSTREG is 0x01,
so codec->reg_cache[0] is not used here.

Then we read CS42L51_NUMREGS bytes to cache.
So we need reg_cache_size to be CS42L51_NUMREGS + 1.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 11:34:21 +00:00
Paul Bolle 4ca8af579c ASoC: drop support for PlayPaq with WM8510
SoC Audio support for PlayPaq with WM8510 got added in commit 9aaca9683b
("[ALSA] Revised AT32 ASoC Patch"). That support depends on
BOARD_PLAYPAQ. That Kconfig symbol didn't exist when that support got
added in v2.6.27. It still doesn't. It has never been possible to even
build this driver. Drop it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:28:38 +00:00
Takashi Iwai 61071594f6 ALSA: hda/realtek - Minor cleanup
Use an inline function for the common pattern for assigning a capsrc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-23 07:52:15 +01:00