summaryrefslogtreecommitdiff
path: root/sound/pci/au88x0/au88x0_core.c
AgeCommit message (Collapse)Author
2018-10-12ALSA: au88xx: Add fall-through annotationsTakashi Iwai
As a preparatory patch for the upcoming -Wimplicit-fallthrough compiler checks, add the "fall through" annotation in au88xx driver. Although the usages in both both functions vortex_adbdma_setbuffers() and vortex_wtdma_setbuffers() look a bit suspicious, we keep the behavior as before, just to be safer. If it were broken, we should have already received bug reports. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-07-27ALSA: au88x0: Fix sparse warning wrt PCM format typeTakashi Iwai
The PCM format type is with __bitwise, and it can't be converted from integer implicitly. Instead of an ugly cast, declare the function argument of vortex_alsafmt_aspfmt() with the proper snd_pcm_format_t type. This fixes the sparse warning like: sound/pci/au88x0/au88x0_core.c:2778:14: warning: restricted snd_pcm_format_t degrades to integer Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-10-17ALSA: au88x0: remove redundant assignment of variable iColin Ian King
The assignment to variable i is redundant as it is never read because it is updated a little later on. Remove this assignment. Cleans up clang warning: Value stored to 'i' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-03-24ALSA: au88x0: avoid theoretical uninitialized accessArnd Bergmann
The latest gcc-7.0.1 snapshot points out that we if nr_ch is zero, we never initialize some variables: sound/pci/au88x0/au88x0_core.c: In function 'vortex_adb_allocroute': sound/pci/au88x0/au88x0_core.c:2304:68: error: 'mix[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] sound/pci/au88x0/au88x0_core.c:2305:58: error: 'src[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] I assume this can never happen in practice, but adding a check here doesn't hurt either and avoids the warning. The code has been unchanged since the start of git history. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-16ALSA: au88x0: Add missing \n to end of dev_err messageColin Ian King
Trival fix, the dev_err message is missing a \n so add it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-29ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift()Takashi Iwai
vortex_wtdma_bufshift() function does calculate the page index wrongly, first masking then shift, which always results in zero. The proper computation is to first shift, then mask. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-12ALSA: au88x0: Fix zero clear of stream->resourcesTakashi Iwai
There are a few calls of memset() to stream->resources, but they all are called in a wrong size, sizeof(unsigned char) * VORTEX_RESOURCE_LAST, while this field is a u32 array. This may leave the memories not zero-cleared. Fix it by replacing them with a simpler sizeof(stream->resources) instead. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-15ALSA: au88x0: pr_* replaced with dev_*Sudip Mukherjee
pr_* macros replaced with dev_* as they are more preffered over pr_*. each file which had pr_* was reviewed manually and replaced with dev_*. here we have actually used the reference of the vortex which was added to some functions in the previous patch of this series. The prefix of the CARD_NAME and prefix of "vortex:" was also removed as the dev_* will print the device name. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-15ALSA: au88x0: added reference of vortex_tSudip Mukherjee
added a pointer of the vortex in the following functions : vortex_alsafmt_aspfmt vortex_Vort3D_InitializeSource a3dsrc_ZeroStateA3D so that we can have a reference of the vortex in the function. this reference of the vortex will actually be used in a later patch to convert the pr_* macro to dev_*. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-09sound: pci: au88x0: printk replacementSudip Mukherjee
as pr_* macros are more preffered over printk, so printk replaced with corresponding pr_* macros. this patch will generate warning from checkpatch as it only did printk replacement and didnot fixed other style issues. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: pci: remove __dev* attributesBill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-25ALSA: au88x0: Give comment for vortex_wtdma_bufshift() issueTakashi Iwai
The check of the return value from vortex_wtdma_bufshft() in vortex_interrupt() is useless as it executes no code. Actually the return value is intentionally ignored because the delta calculation for wavetable doesn't work always correctly. For avoiding the confusion, a comment is added and the superfluous if () is removed. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-16ALSA: au88x0 - Avoid possible Oops at unbindingTakashi Iwai
The irq handler must check whether the MPU401 instance is still alive. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-24ALSA: Au88x0 - Implement subdevice volume controlsRaymond Yau
- add "PCM Playback Volume" controls for 16 playback subdevices This allow application to change the volume of each subdevice by using hardware mixer of au88x0 and default is zero gain/attenunation. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08ALSA: Au88x0 - Fix channels swapping of 4 channels playbackRaymond Yau
Fix channels swapping of 4 channels playback by using vortex_adbdma_stopfifo instead of vortex_adbdma_pausefifo for SNDRV_PCM_TRIGGER_STOP event Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08ALSA: Au88x0 - Fix IRQ fifo error and channels swap of 4 channels playbackRaymond Yau
Fix IRQ fifo error when playing stereo by set stereo flag of fifo control. This also fix the swap of front and rear channels on au8830. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-18Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (47 commits) doc: CONFIG_UNEVICTABLE_LRU doesn't exist anymore Update cpuset info & webiste for cgroups dcdbas: force SMI to happen when expected arch/arm/Kconfig: remove one to many l's in the word. asm-generic/user.h: Fix spelling in comment drm: fix printk typo 'sracth' Remove one to many n's in a word Documentation/filesystems/romfs.txt: fixing link to genromfs drivers:scsi Change printk typo initate -> initiate serial, pch uart: Remove duplicate inclusion of linux/pci.h header fs/eventpoll.c: fix spelling mm: Fix out-of-date comments which refers non-existent functions drm: Fix printk typo 'failled' coh901318.c: Change initate to initiate. mbox-db5500.c Change initate to initiate. edac: correct i82975x error-info reported edac: correct i82975x mci initialisation edac: correct commented info fs: update comments to point correct document target: remove duplicate include of target/target_core_device.h from drivers/target/target_core_hba.c ... Trivial conflict in fs/eventpoll.c (spelling vs addition)
2011-02-14ALSA: au88x0 - Modify pointer callback to give accurate playback positionRaymond Yau
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-19Kill off warning: ‘inline’ is not at beginning of declarationJesper Juhl
Fix a bunch of warning: ‘inline’ is not at beginning of declaration messages when building a 'make allyesconfig' kernel with -Wextra. These warnings are trivial to kill, yet rather annoying when building with -Wextra. The more we can cut down on pointless crap like this the better (IMHO). A previous patch to do this for a 'allnoconfig' build has already been merged. This just takes the cleanup a little further. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-05-29ALSA: au88x0: fix wrong period_elapsed() callJaroslav Kysela
The period_elapsed() call should be called when position moves. The idea was taken from ALSA bug#4455. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-29ALSA: au88x0: fix .pointer callbackJaroslav Kysela
Appearently, the used mask in the .pointer callback is invalid. It should be in period_bytes range. The period_bytes is pow(2), so simple bitwise operation is used. Idea was taken from ALSA bug#4455. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-17ALSA: au88x0 - Fix &&|| typoTakashi Iwai
Fixed a typo of || and &&. As it's in a disabled code section, there is no behavior change, though. Reported-by: Jörg-Volker Peetz <jvpeetz@web.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: Fix missing KERN_* prefix to printk in sound/pciTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-25ALSA: Clean up SG-buffer helper functions and macrosTakashi Iwai
Clean up SG-buffer helper functions and macros. Helpers take substream as arguments now. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-13ALSA: au88x0: clipping ceiling loop wrong in commentroel kluin
As is the clipping ceiling loop appears wrong anyways 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-01-31[ALSA] sound/: Spelling fixesJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells
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-07-12[ALSA] Fix section mismatch errors in ALSA PCI driversTakashi Iwai
Fixed 'section mismatch' errors in ALSA PCI drivers: - removed invalid __devinitdata from pci id tables - fix/remove __devinit of functions called in suspend/resume Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-04-12[ALSA] au88x0 - clean up __devinit/__devexitDale Sedivec
Modules: au88x0 driver Removed all use of __devinit/__devexit and init.h from headers. Any attributes given in the prototype but not in the function definition have been moved to the definition. An exception is vortex_eq_free: I removed the __devexit attribute because vortex_eq_free is called from vortex_core_shutdown, and vortex_core_shutdown may be called from __devinit snd_vortex_create. Compile tested with allyesconfig and allmodconfig. Signed-off-by: Dale Sedivec <dale@codefu.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22[ALSA] au88x0 - 64bit arch fixesTakashi Iwai
Modules: au88x0 driver Fix the driver codes to run on 64bit architectures. The patch taken from ALSA BTS bug#1047. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: PCI AU88x0Takashi Iwai
Modules: au88x0 driver Remove xxx_t typedefs from the PCI AU88x0 drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] Add missing KERN_* suffix to printkTakashi Iwai
Add missing KERN_* suffix to printk. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] au88x0: codec access procs for multiple AC97 codecsSasha Khapyorsky
Modules: au88x0 driver This patch extends au88x0 AC97 codec access procedures to handle multiple codecs properly. Signed-off-by: Sasha Khapyorsky <sashak@smlink.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!