summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-06-07ASoC: core - Optimise and refactor pcm_new() to pass only rtdLiam Girdwood27-61/+96
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI. Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains card, pcm and DAI along with other members too that are useful too. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07Merge branch 'for-3.0' into for-3.1Mark Brown1-2/+2
2011-06-07ASoC: Blackfin: bf5xx-ad1836: Fix codec device nameLars-Peter Clausen1-2/+2
Fix the codec_name field of the dai_link to match the actual device name of the codec. Otherwise the card won't be instantiated. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-06-07ASoC: AD1836: Fix build errorLars-Peter Clausen1-1/+1
Commit f97d0c6d5f94 ("ASoC: AD1836: Add input gain control for ADC2") contained a typo in the register name, causing a build error. This patch fixes it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07ASoC: wm8940: remove unnecessary if statementsGreg Dietsche1-7/+0
removing unnecessary if(ret) checks This updated patch corrects a minor spelling problem in the commit message and resolves two other (similar) issues found in wm8940.c by Jonathan Cameron. Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06Merge branch 'for-3.0' into for-3.1Mark Brown2-7/+13
2011-06-06ASoC: AD1836: Fix setting the PCM formatLars-Peter Clausen2-7/+13
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-06-06ASoC: AD1836: Add input gain control for ADC2Lars-Peter Clausen1-0/+11
The AD1836 has a PGA for its second ADC. This patch adds a control for adjusting the the gain of the PGA. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06ASoC: AD1836: Remove unused fields from private structLars-Peter Clausen1-5/+0
The control_type field is never used, so it can be removed. The control_data field is used to initialize the codec's control_data field, but since this is also done by the snd-soc-cache core, the redundant assignment can be removed and the field can be dropped. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06ASoC: AD1836: Add AD1835/AD1837/AD1838/AD1839 supportLars-Peter Clausen1-54/+129
The AD183X codec devices are mostly register compatible and can easily be supported by the same driver. The main difference between those devices is the number of DACs and ADCs. This patch adjusts the driver to allocate the controls, DAPM widgets and routes for the DACs and ADCs dynamically based on the chip type. The AD1836 is a bit special in that it supports different modes for its second ADC, so it needs some special handling. Right now the driver hardcodes the mode to the differential PGA mode. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06ASoC: AD1836: Use snd_soc_update_bits for read-modify-writeLars-Peter Clausen1-12/+6
Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06ASoC: AD1836: Add ADC/DAC controls helper macrosLars-Peter Clausen2-39/+34
The different ADC and DAC controls follow the same scheme, so add some helper macros for declaring them. This should make the code a bit more readable and also decreases the code size a bit. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-06ASoC: Manage Speyside system clocking only in bias managementMark Brown1-10/+40
Now that the CODEC driver supports it defer configuration of the system clock until bias management which is a much more idiomatic place to do system power control and makes things a lot more happy when we're using both interfaces. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Only provide a default bias level update for CODEC contextsMark Brown1-4/+7
This allows the card driver to use the bias level variable more easily in multi component systems. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Add context parameter to card DAPM callbacksMark Brown5-3/+11
The card callback will get called for each DAPM context in the card so it can be useful for it to know which device is currently undergoing a transition. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Simplify logic in snd_soc_dapm_set_bias_level()Mark Brown1-10/+12
No functional changes but much less indentation. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Remove trace for DAPM bias level loggingMark Brown1-18/+0
It's redundant now thanks to the use of the generic trace infrastructure. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Indentation fix for null loop operationMark Brown1-1/+1
More with the legibility. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Don't bring the CODEC up to full power for supplies and biasesMark Brown1-2/+21
If the only widgets active within a CODEC are supplies and micbiases we are not passing audio, we are probably just doing microphone detection. This will not generally require either fully accurate reference voltages or much power so If this turns out to be unsuitable for some systems we can provide a facility to override this decision. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Specify target bias state directly as a bias stateMark Brown3-32/+38
Rather than a simple flag to say if we want the DAPM context to be at full power specify the target bias state. This should have no current effect but is a bit more direct and so makes it easier to change our decisions about the which bias state to go into in future. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Allow WM8915 BCLK calculation outside hw_params()Mark Brown1-29/+53
Allow more dynamic management of the device clocking by allowing BCLK to be calculated when we set SYSCLK. This means that if the system is idle when hw_params() runs then we don't try to use the SYSCLK used in that case to set up the BCLK dividers, we can instead wait until a later point such as bias level configuration. This makes it easier to manage low power modes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06Merge branch 'for-3.0' into for-3.1Mark Brown1-0/+3
2011-06-06ASoC: Check for NULL register bank in snd_soc_get_cache_val()Mark Brown1-0/+3
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Enforce the mask in snd_soc_update_bits()Mark Brown1-1/+1
Avoids issues if someone does a read followed by restore and doesn't mask out only the bits being updated. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Error out when FLL lock interrupt is not delivered on WM8915Mark Brown1-2/+14
When the FLL locks on the WM8915 an interrupt is generated. For safety error out if we don't get that interrupt when the IRQ output of the WM8915 is hooked up. Since we *really* expect an interrupt but the threaded IRQ handler may take a bit longer than expected to get scheduled also dramatically increase the delay in this case. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Suppress noop SYSCLK updates in WM8915Mark Brown1-0/+6
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06Merge branch 'for-3.0' into for-3.1Mark Brown1-1/+2
2011-06-06ASoC: Add missing break in WM8915 FLL source selectionMark Brown1-0/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06ASoC: Only update SYSCLK_ENA when pausing WM8915 SYSCLKMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06Merge branch 'for-3.0' into for-3.1Mark Brown7576-378954/+451486
2011-06-06Merge branch 'for-3.0' of ↵Mark Brown3-7/+11
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into for-3.0
2011-06-03ASoC: atmel_ssc: Don't try to free ssc if request failedJoachim Eastwood1-2/+3
We should only call ssc_free() when ssc_request() succeeds or bad things will happen. Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-02ASoC: Use a lower detection rate when monitoring headphones on WM8915Mark Brown1-6/+14
We only need to increase the detection rate to maximum if we're monitoring for button presses as the response times needed for user interaction there are much lower. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-01ASoC: Update speyside audio driver for hardware revision 2Mark Brown1-4/+4
Revision 2 of the Speyside platform supplies a 32kHz clock on MCLK2 rather than MCLK1. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-01ASoC: Remove internally generated WM8915 suppliesMark Brown1-7/+1
DCVDD and MICVDD are intended to be (and almost always are) generated by on-board LDOs which are transparently controlled by the driver so we shouldn't really be requesting them from the regulator API. If the driver is updated to support external supply of these then we will need to change the way we handle this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-01ASoC: add missing clk_put to nuc900-ac97Julia Lawall1-1/+1
This goto is after the call to clk_get, so it should go to the label that includes a call to clk_put. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression e1,e2; statement S; @@ e1 = clk_get@p1(...); ... when != e1 = e2 when != clk_put(e1) when any if (...) { ... when != clk_put(e1) when != if (...) { ... clk_put(e1) ... } * return@p3 ...; } else S // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-01ASoC: Support edge triggered IRQs for WM8915Mark Brown1-2/+22
Really this should be something the IRQ core can cope with for us but since it doesn't currently do so (at least for threaded interrupts like this) do so in the driver. This allows us to run with interrupt controllers that only support edge triggered interrupts. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-01ASoC: Staticize ak4641_daiMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-30Merge branch 'for-2.6.40' into for-2.6.41Mark Brown45-252/+1304
2011-05-29Linux 3.0-rc1v3.0-rc1Linus Torvalds1-5/+5
.. except there are various scripts that really know that there are three numbers, so it calls itself "3.0.0-rc1". Hopefully by the time the final 3.0 is out, we'll have that extra zero all figured out. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-29Merge branch 'for-linus' of ↵Linus Torvalds6-263/+220
git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6: eCryptfs: Remove ecryptfs_header_cache_2 eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose() eCryptfs: Return useful code from contains_ecryptfs_marker eCryptfs: Fix new inode race condition eCryptfs: Cleanup inode initialization code eCryptfs: Consolidate inode functions into inode.c
2011-05-29Merge branch 'pnfs-submit' of git://git.open-osd.org/linux-open-osdLinus Torvalds32-279/+3907
* 'pnfs-submit' of git://git.open-osd.org/linux-open-osd: (32 commits) pnfs-obj: pg_test check for max_io_size NFSv4.1: define nfs_generic_pg_test NFSv4.1: use pnfs_generic_pg_test directly by layout driver NFSv4.1: change pg_test return type to bool NFSv4.1: unify pnfs_pageio_init functions pnfs-obj: objlayout_encode_layoutcommit implementation pnfs: encode_layoutcommit pnfs-obj: report errors and .encode_layoutreturn Implementation. pnfs: encode_layoutreturn pnfs: layoutret_on_setattr pnfs: layoutreturn pnfs-obj: osd raid engine read/write implementation pnfs: support for non-rpc layout drivers pnfs-obj: define per-inode private structure pnfs: alloc and free layout_hdr layoutdriver methods pnfs-obj: objio_osd device information retrieval and caching pnfs-obj: decode layout, alloc/free lseg pnfs-obj: pnfs_osd XDR client implementation pnfs-obj: pnfs_osd XDR definitions pnfs-obj: objlayoutdriver module skeleton ...
2011-05-29arm gpio drivers: make them 'depends on ARM'Linus Torvalds1-0/+4
We had a few drivers move from arch/arm into drivers/gpio, but they don't actually compile without the ARM platform headers etc. As a result they were messing up allyesconfig on x86. Make them depend on ARM. Reported-by: Ingo Molnar <mingo@elte.hu> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-29eCryptfs: Remove ecryptfs_header_cache_2Tyler Hicks3-13/+6
Now that ecryptfs_lookup_interpose() is no longer using ecryptfs_header_cache_2 to read in metadata, the kmem_cache can be removed and the ecryptfs_header_cache_1 kmem_cache can be renamed to ecryptfs_header_cache. Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
2011-05-29eCryptfs: Cleanup and optimize ecryptfs_lookup_interpose()Tyler Hicks3-105/+88
ecryptfs_lookup_interpose() has turned into spaghetti code over the years. This is an effort to clean it up. - Shorten overly descriptive variable names such as ecryptfs_dentry - Simplify gotos and error paths - Create helper function for reading plaintext i_size from metadata It also includes an optimization when reading i_size from the metadata. A complete page-sized kmem_cache_alloc() was being done to read in 16 bytes of metadata. The buffer for that is now statically declared. Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
2011-05-29eCryptfs: Return useful code from contains_ecryptfs_markerTyler Hicks1-16/+10
Instead of having the calling functions translate the true/false return code to either 0 or -EINVAL, have contains_ecryptfs_marker() return 0 or -EINVAL so that the calling functions can just reuse the return code. Also, rename the function to ecryptfs_validate_marker() to avoid callers mistakenly thinking that it returns true/false codes. Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
2011-05-29eCryptfs: Fix new inode race conditionTyler Hicks5-28/+30
Only unlock and d_add() new inodes after the plaintext inode size has been read from the lower filesystem. This fixes a race condition that was sometimes seen during a multi-job kernel build in an eCryptfs mount. https://bugzilla.kernel.org/show_bug.cgi?id=36002 Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> Reported-by: David <david@unsolicited.net> Tested-by: David <david@unsolicited.net>
2011-05-29Merge branch 'for_linus' of ↵Linus Torvalds35-1192/+1393
git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (43 commits) acer-wmi: support integer return type from WMI methods msi-laptop: fix section mismatch in reference from the function load_scm_model_init acer-wmi: support to set communication device state by new wmid method acer-wmi: allow 64-bits return buffer from WMI methods acer-wmi: check the existence of internal 3G device when set capability platform/x86:delete two unused variables support wlan hotkey on Acer Travelmate 5735Z platform-x86: intel_mid_thermal: Fix memory leak platform/x86: Fix Makefile for intel_mid_powerbtn platform/x86: Simplify intel_mid_powerbtn acer-wmi: Delete out-of-date documentation acerhdf: Clean up includes acerhdf: Drop pointless dependency on THERMAL_HWMON acer-wmi: Update MAINTAINERS wmi: Orphan ACPI-WMI driver tc1100-wmi: Orphan driver acer-wmi: does not allow negative number set to initial device state platform/oaktrail: ACPI EC Extra driver for Oaktrail thinkpad_acpi: Convert printks to pr_<level> thinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warning ...
2011-05-29mm: Fix boot crash in mm_alloc()Linus Torvalds4-36/+23
Thomas Gleixner reports that we now have a boot crash triggered by CONFIG_CPUMASK_OFFSTACK=y: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<c11ae035>] find_next_bit+0x55/0xb0 Call Trace: [<c11addda>] cpumask_any_but+0x2a/0x70 [<c102396b>] flush_tlb_mm+0x2b/0x80 [<c1022705>] pud_populate+0x35/0x50 [<c10227ba>] pgd_alloc+0x9a/0xf0 [<c103a3fc>] mm_init+0xec/0x120 [<c103a7a3>] mm_alloc+0x53/0xd0 which was introduced by commit de03c72cfce5 ("mm: convert mm->cpu_vm_cpumask into cpumask_var_t"), and is due to wrong ordering of mm_init() vs mm_init_cpumask Thomas wrote a patch to just fix the ordering of initialization, but I hate the new double allocation in the fork path, so I ended up instead doing some more radical surgery to clean it all up. Reported-by: Thomas Gleixner <tglx@linutronix.de> Reported-by: Ingo Molnar <mingo@elte.hu> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-29Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6Linus Torvalds3-16/+25
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] mm: fix mmu_gather rework [S390] mm: fix storage key handling