Commit graph

129 commits

Author SHA1 Message Date
Takashi Iwai c38f62b08d 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.
 -----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.
2012-04-07 12:28:00 +02:00
Linus Torvalds 48a46752a9 sound fixes for 3.4-rc1
A collection of small fixes for 3.4-rc1, including
 - mic-recording regression fix for Realtek codec
 - clean-up of dmaengine parameter mess
 - WM8894 calibration tweak
 - minor fixes for asihpi and some bool module parms
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPdX6XAAoJEGwxgFQ9KSmkFMcP+wTpqgoQgfcb6IMCY9KVGstd
 Uy2LgocxKSwcIv7a+OTN4WTfCJBjf045jY+coKHRhO0ybMqLIyqqeLzyCShksKdB
 PQ8+T+deIgezkhWuNdr+e+h+v39lRHQOPLiDDzEbToKryGxmx2YVbGh9b/4/oJfK
 U7oXYbMZu1RBm4btUR5jfyfC8dKMPwB0/gRG6662hw/WqkNalQyXnPvJPhl+Ky+J
 fbC2sggPlSwz6IzUdX023B7zuzUexiY3CVqZrFFskMiAEwB4xDIJ+aroQYhRSO+f
 C93EB4f3gQ0zr65n07QFIHICUogLDKdbx9GLUdfrFwoWMeKamd0YZBZNTIUEzrtc
 OkrLU5IDKxB+smjGul0SvJV/EkwYYCIx4dASoCUBORHAtAmEYrbUnHR/ga5c+i0X
 YIB5mvurSCYNZesmSzLeET6F7zS1VHbaK9qopHDrivK/ZMe90Y06D/gWuhNySHOm
 lwo4vepDG5rlDQBxVhHQGI7J1JXHBC8KI/drSROBJKb3XLIt76Qf0nmyTfRyLAqa
 xF3axkB53uiAyK9YXY2hWcOPH2klNCat9y45fQ9Z4o2wU0t74lO2VuQJzsePGWKc
 MP6cGAQ75G86jPPbsOY650AS4Lu4t4ZRDal/5q/Y+c5gLqM6ZoHI7RMmpSVa8uUS
 LTrgwwBT/V87snKMwAKW
 =cW/4
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of small fixes for 3.4-rc1, including
   - mic-recording regression fix for Realtek codec
   - clean-up of dmaengine parameter mess
   - WM8894 calibration tweak
   - minor fixes for asihpi and some bool module parms"

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: fix isa/opti9xx module param type
  sound: fix oss/msnd_pinnacle module param type
  ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
  ASoC: dmaengine_pcm: use dmaengine cyclic wrapper
  ASoC: Add extra parameter to device_prep_dma_cyclic
  ALSA: hda/realtek - Fix ADC assignment with a shared HP/Mic pin
  ASoC: wm8994: Update WM8994 DCS calibration
2012-03-30 10:59:52 -07:00
Eliot Blennerhassett 92fd918c24 ALSA: asihpi - fix return value of hpios_locked_mem_alloc()
Make this function consistent with others in this module by
returning 1 for error, instead of -ENOMEM
(reverts function signature change from a938fb1e)

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-30 16:24:48 +02:00
David Howells 9ffc93f203 Remove all #inclusions of asm/system.h
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`

Signed-off-by: David Howells <dhowells@redhat.com>
2012-03-28 18:30:03 +01:00
Dan Carpenter a938fb1ef6 ALSA: asihpi - fix return type of hpios_locked_mem_alloc()
This function returns zero or -ENOMEM, but because it's type is u16, the
-ENOMEM gets changed to 65524.  None of the callers care, but lets fix
it anyway as a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-28 18:49:49 +02:00
Takashi Iwai 74eeb141d3 ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
Dan Carpenter reported that setting 0 to uinfo->value.enumerated.items
in snd_asihpi_cmode_info() may lead to Oops.  This function should
return an error immediately in such a case instead.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-09 18:27:54 +01:00
Eliot Blennerhassett 68d5339322 ALSA: asihpi - Fix format validity check.
Sharing and not reinitialising static pcm_hardware struct resulted in
stream format validity flags being incorrectly shared between cards.
Fix and clarify by declaring locally and initialising in the open functions.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-22 08:13:11 +01:00
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
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
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
Paul Gortmaker da155d5b40 sound: Add module.h to the previously silent sound users
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up.  So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:21 -04:00
Thomas Meyer 67ada8367c ALSA: asihpi - use kzalloc()
Use kzalloc rather than kmalloc followed by memset with 0

 This considers some simple cases that are common and easy to validate
 Note in particular that there are no ...s in the rule, so all of the
 matched code has to be contiguous

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-07 17:32:52 +02:00
Eliot Blennerhassett 08f984c7f7 ALSA: asihpi - Clarify adapter index validity check
Avoids assigning possibly invalid address to pa, even if it
is never dereferenced.
Correct error response to reflect request object/function ids.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-02 09:26:31 +02:00
Jesper Juhl dc889f1864 ALSA: asihpi - Don't leak firmware if mem alloc fails
We leak the memory allocated to 'firmware' when we fail to
release_firmware() after a kmalloc() failure in hpi_dsp_code_open().
This patch should take care of the leak.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-01 10:57:06 +02:00
Dan Carpenter ae6ff61e43 ALSA: asihpi - off by one in asihpi_hpi_ioctl()
"adapter" is used as an array index in the adapters[] array so
the off by one would make us read past the end.

1c073b6797 "ALSA: asihpi - Remove spurious adapter index check"
reverted Dan Rosenberg's check that would have prevented the
overflow here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-27 16:06:16 +02:00
Eliot Blennerhassett 767cd365b2 ALSA: asihpi - bug fix pa use before init.
Fixes bug introduced by 1c073b67.
Also declare pa local to block in which it is used.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-27 10:08:26 +02:00
Eliot Blennerhassett acb03d440b ALSA: Make snd_pcm_debug_name usable outside pcm_lib
Formatting a PCM name is useful for module debug too.
Add snd_prefix when making function public.

[minor coding-style fixes by tiwai]

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-24 13:34:32 +02:00
Takashi Iwai 7d339ae997 Merge branch 'topic/misc' into for-linus 2011-07-22 08:43:24 +02:00
Takashi Iwai 000477a0fe ALSA: asihpi - Replace with snd_ctl_boolean_mono_info()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:57:44 +02:00
Eliot Blennerhassett 509a714744 ALSA: asihpi - HPI version 4.08
HPI Version is used to check for firmware compatibility.
This version  will accept 4.08.xx released firmware,
and will also accept 4.09.xx beta firmware

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:55:02 +02:00
Eliot Blennerhassett fe0aa88eec ALSA: asihpi - Add volume mute controls
Mute functionality was recently added to the DSP firmware

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:54:20 +02:00
Eliot Blennerhassett c830613574 ALSA: asihpi - Control name updates
Add names corresponding to new HPI node types.
Shorten some names so that constructed names don't overflow the
maximum name length.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:53:45 +02:00
Eliot Blennerhassett 3d0591eee4 ALSA: asihpi - Use size_t for sizeof result
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:53:07 +02:00
Eliot Blennerhassett 5ddc5bef5c ALSA: asihpi - Explicitly include mutex.h
Because mutex is used in adapter struct defined here.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:52:31 +02:00
Eliot Blennerhassett b7f12482ca ALSA: asihpi - Add new node and message defines
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:52:15 +02:00
Eliot Blennerhassett 33162d2dfa ALSA: asihpi - Make local function static
Fixes a sparse warning.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:52:02 +02:00
Eliot Blennerhassett 938c565a82 ALSA: asihpi - Fix minor typos and spelling
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:51:41 +02:00
Eliot Blennerhassett 4bf8cff05a ALSA: asihpi - Remove unused structures, macros and functions
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:50:57 +02:00
Eliot Blennerhassett 1c073b6797 ALSA: asihpi - Remove spurious adapter index check
Subsystem requests don't have or need a valid adapter index.
The adapter index is already checked further on, before it is used to index
the adapters array. (Reverts 4a122c10f)

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:50:44 +02:00
Eliot Blennerhassett 0a17e99307 ALSA: asihpi - Revise snd_pcm_debug_name, get rid of DEBUG_NAME macro
Work towards moving the function into alsa common header.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22 07:50:03 +02:00