summaryrefslogtreecommitdiffstats
path: root/sound/aoa
AgeCommit message (Collapse)AuthorFilesLines
2009-05-12sound: remove driver_data direct access of struct deviceGreg Kroah-Hartman2-8/+8
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21ALSA: AOA: Convert onyx and tas codecs to new-style i2c driversJean Delvare2-47/+95
The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Johannes Berg <johannes@sipsolutions.net> Tested-by: Andreas Schwab <schwab@linux-m68k.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-24Merge branch 'topic/aoa' into for-linusTakashi Iwai4-23/+99
2009-01-15ALSA: snd-aoa: handle master-amp if presentJohannes Berg3-1/+25
Some machines have a master amp GPIO that needs to be toggled to get sound output, in addition to speaker/headphone/line-out amps. This makes snd-aoa handle it, if present in the device tree, thus making snd-aoa be able to output sound on PowerMac3,6, which was previously handled by snd-powermac which also doesn't use the master amp GPIO. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-15ALSA: snd-aoa: handle older machinesJohannes Berg2-22/+74
This patch changes snd-aoa to handle some older machines that are currently handled by snd-powermac. snd-aoa has a number of advantages though, notably it can autoload better and is generally a more modern driver. By hardcoding the accepted device-ids (last hunk of the patch) I'm trying to avoid regressions because this driver will otherwise load automatically and not let snd-powermac load. People who are unhappy with snd-powermac and have a device-id property in the device tree are encouraged to read this patch and make a patch to amend this as appropriate. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: Convert to snd_card_create() in other sound/*Takashi Iwai1-3/+4
Convert from snd_card_new() to the new snd_card_create() function in other sound subdirectories. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-25Merge branch 'topic/aoa' into to-pushTakashi Iwai22-24/+30
2008-11-03Merge branches 'topic/fix/misc' and 'topic/fix/hda' into for-linusTakashi Iwai1-1/+1
2008-11-03sound: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers1-1/+1
[stripped sound/isa/* changes, replaced with the next patch -- tiwai] Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-23Merge branches 'topic/asoc', 'topic/misc-fixes' and 'topic/hda' into for-linusTakashi Iwai1-3/+3
2008-10-23ALSA: aoa: clean up file namesJohannes Berg22-24/+30
This cleans up the apple onboard audio driver filenames. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-23ALSA: aoa i2sbus: don't overwrite module parameterJohannes Berg1-3/+3
We shouldn't modify a global variable here. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-15Merge commit 'origin'Benjamin Herrenschmidt1-4/+2
Manual fixup of conflicts on: arch/powerpc/include/asm/dcr-regs.h drivers/net/ibm_newemac/core.h
2008-08-25ALSA: aoa - Remove duplicate assignment of SNDRV_PCM_FMTBIT_S{16,24}_BE bitsRoel Kluin1-4/+2
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-20powerpc/drivers: Use linux/of_device.h instead of asm/of_device.hStephen Rothwell1-1/+1
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-27sound: Convert to menuconfigTakashi Iwai4-12/+5
Convert menu in sound Kconfig files to menuconfig and if. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai3-6/+0
This header file exists only for some hacks to adapt alsa-driver tree. It's useless for building in the kernel. Let's move a few lines in it to sound/core.h and remove it. With this patch, sound/driver.h isn't removed but has just a single compile warning to include it. This should be really killed in future. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] aoa - fix compile warningTakashi Iwai1-0/+1
Set a proper error code in the error path of i2sbus_attach_codec(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] add number of periods constraint to snd-aoaHeikki Lindholm1-0/+6
The aoa driver is not specifying constraints on number of periods, and, it seems, it might end with a non-integer number, which it cannot deal with. Fix by adding a proper constraint. Signed-off-by: Heikki Lindholm <holindho@cs.helsinki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] aoa - Check value range in ctl callbacksTakashi Iwai3-2/+33
Check the value ranges in ctl put callbacks properly in aoa drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16[ALSA] Clean up with common snd_ctl_boolean_*_info callbacksTakashi Iwai3-45/+5
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16[ALSA] Fix tas_suspend/resume build warningStephen Rothwell1-4/+5
sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-12Driver core: change add_uevent_var to use a structKay Sievers1-23/+10
This changes the uevent buffer functions to use a struct instead of a long list of parameters. It does no longer require the caller to do the proper buffer termination and size accounting, which is currently wrong in some places. It fixes a known bug where parts of the uevent environment are overwritten because of wrong index calculations. Many thanks to Mathieu Desnoyers for finding bugs and improving the error handling. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-20[ALSA] snd-aoa-codec-onyx: fix typoYoann Padioleau1-2/+2
Parse error in ifdef or bad use of macro. Signed-off-by: Yoann Padioleau <padator@wanadoo.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] snd-aoa-i2sbus: use MODULE_DEVICE_TABLE instead of plain MODULE_ALIASJohannes Berg1-3/+2
This patch changes snd-aoa-i2sbus to use MODULE_DEVICE_TABLE instead of a hardcoded MODULE_ALIAS. Thanks to Sylvain Munaut for pointing this out. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] sound: strlcpy is smart enoughJean Delvare2-4/+4
strlcpy already accounts for the trailing zero in its length computation, so there is no need to substract one to the buffer size. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] aoa: fix a sparse warningJohannes Berg2-2/+2
This fixes a warning sparse gives. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-07[POWERPC] Rename device_is_compatible to of_device_is_compatibleStephen Rothwell3-5/+5
for consistency with other Open Firmware interfaces (and Sparc). This is just a straight replacement. This leaves the compatibility define in place. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-30Merge branch 'linux-2.6' into for-2.6.22Paul Mackerras1-46/+31
2007-04-27uevent: use add_uevent_var() instead of open coding itEric Rannaud1-48/+32
Make use of add_uevent_var() instead of (often incorrectly) open coding it. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Eric Rannaud <eric.rannaud@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-13[POWERPC] Rename get_property to of_get_property: soundStephen Rothwell6-12/+13
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13[POWERPC] get_property returns constStephen Rothwell6-19/+18
This just tidies up some of the remains. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-09[ALSA] aoa i2sbus: Stop Apple i2s DMA gracefullyPaul Mackerras3-146/+210
This fixes the problem of getting extra bytes inserted at the beginning of a recording when using the Apple i2s interface and DBDMA controller. It turns out that we can't just abort the DMA; we have to let it stop at the end of a command, and then wait for the S7 bit to be set before turning off the DBDMA controller. Doing that for playback doesn't seem to be necessary, but doesn't hurt either. We use the technique used by the Darwin driver: make each transfer command branch to a stop command if the S0 status bit is set. Thus we can ask the DMA controller to stop at the end of the current command by setting S0. The interrupt routine now looks at and clears the status word of the DBDMA command ring. This is necessary so it can know when the DBDMA controller has seen that S0 is set, and so when it should look for the DBDMA controller being stopped and S7 being set. This also ended up simplifying the calculation in i2sbus_pcm_pointer. Tested on a 15 inch albook. [Addition by Johannes] I modified this patch and added the suspend/resume bits to it to get my powermac into a decent state when playing sound across suspend to disk that has a different bitrate from what the firmware programs the hardware to. I also added the SNDRV_PCM_INFO_JOINT_DUPLEX flag because it seemed the right thing to do and I was looking at the info stuff. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] aoa: remove suspend/resume printksJohannes Berg1-4/+0
This just removes two useless printks. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] sound: aoa of_node_put and kfree cleanupMariusz Kozlowski1-2/+2
This patch removes redundant argument checks for of_node_put() and kfree(). Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] snd-aoa: fix onyx resumeJohannes Berg1-1/+10
When the machine resumes the onyx codec might be in a weird state. Hence, simply fully reset it once (and keep the code to take it out of suspend in case the suspend of the codec chip survives a reset). Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] create driver symlink in snd-aoa /sys/bus/aoa-soundbus/devices/*/Olaf Hering1-0/+3
create sysfs driver symlink for snd-aoa in /sys/bus/aoa-soundbus/devices/*/ Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] create device symlink in snd-aoaOlaf Hering5-6/+7
create sysfs device symlinks for snd-aoa in /sys/class/sound/controlC0 This allows hald to recognize the device as sound device. Furthermore it allows the desktop user to actually access the sound device nodes. hald and related packages will modify the acl attributes. Fixes https://bugzilla.novell.com/show_bug.cgi?id=106294 Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] aoa: fix up i2sbus_attach_codecJohannes Berg1-46/+26
This patch changes i2sbus_attach_codec to implement a proper error handling strategy using labels to jump to the right part. Since it has an elaborate set-up sequence it also needs that tear-down, which I had hard-coded inbetween all the checks. This increases readability and should reduce .text size as well. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] aoa: set device pointer in pcmsJohannes Berg2-6/+3
This patch makes a few whitespace cleanups and makes i2sbus assign the new struct device pointer in struct snd_pcm so that the proper device symlink shows up in sysfs. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20[ALSA] sound: Don't include i2c-dev.hJean Delvare2-2/+0
Don't include <linux/i2c-dev.h> as it's not needed. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-12kconfig: Standardize "depends" -> "depends on" in Kconfig filesRobert P. J. Day1-1/+1
Standardize the miniscule percentage of occurrences of "depends" in Kconfig files to "depends on", and update kconfig-language.txt to reflect that. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-12-05Merge branch 'master' of ↵David Howells1-4/+9
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-28[ALSA] Enable stereo line input for TAS codecPaul Mackerras1-4/+9
Despite what the data sheet says in one place, to get stereo input from input A (line in), we have to clear the 'input B monaural' bit in the ACR. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-11-22WorkStruct: make allyesconfigDavid Howells3-19/+15
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells4-10/+7
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-04Remove all inclusions of <linux/config.h>Dave Jones1-1/+0
kbuild explicitly includes this at build time. Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-23[ALSA] aoa: add locking to tas codecJohannes Berg1-13/+83
Looks like I completely forgot to do this. This patch adds locking to the tas codec so two userspace programs can't hit the controls at the same time. Tested on my powerbook, but I obviously can't find any problems even without it since it doesn't do SMP. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] Select I2C and I2C_POWERMAC in aoa/codecs/KconfigTakashi Iwai1-0/+4
Added the missing selection of I2C and I2C_POWERMAC for Onyx and TAS codecs in aoa/codecs/Kconfig. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-22[PATCH] aoa is pmac-onlyAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>