summaryrefslogtreecommitdiffstats
path: root/sound/drivers/aloop.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: aloop: Drop unnecessary ifdef CONFIG_PROC_FSTakashi Iwai2015-05-291-8/+0
| | | | | | | Since the compiler can optimize away the unused code, we can reduce the messy ifdef. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: aloop: Use setup_timer() and mod_timer()Takashi Iwai2015-01-191-2/+1
| | | | | | No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: drivers: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* ALSA: drivers: Convert to snd_card_new() with a device pointerTakashi Iwai2014-02-121-2/+2
| | | | | | Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: aloop: Remove redundant platform_set_drvdata()Sachin Kamat2013-05-231-1/+0
| | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcm_format_to_bits strong-typed conversionEldad Zack2013-04-291-1/+1
| | | | | | | | | | | Add a function to handle conversion from snd_pcm_format_t to bitwise with proper typing. Change such conversions to use this function and silence sparse warnings. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: aloop: Fix Oops while PM resumeTakashi Iwai2013-02-041-1/+4
| | | | | | | | | | snd-aloop driver has no proper PM implementation, thus the PM resume may trigger Oops due to leftover timer instance. This patch adds the missing suspend/resume implementation. Reported-and-tested-by: El boulangero <elboulangero@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: drivers: remove __dev* attributesBill Pemberton2012-12-071-8/+8
| | | | | | | | | | | 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>
* ALSA: aloop - Close races at restarting the streamTakashi Iwai2012-10-211-17/+19
| | | | | | | | | | There are small races opened in the check of running bit and the timer lock. Instead of adding yet more flag, just protect the whole racy codes with the existing cable->lock. As a bonus, we can get rid of timer_lock now. Reported-and-tested-by: Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: aloop - add locking to timer accessOmair Mohammed Abdullah2012-10-061-0/+6
| | | | | | | | | | | | | | | | When the loopback timer handler is running, calling del_timer() (for STOP trigger) will not wait for the handler to complete before deactivating the timer. The timer gets rescheduled in the handler as usual. Then a subsequent START trigger will try to start the timer using add_timer() with a timer pending leading to a kernel panic. Serialize the calls to add_timer() and del_timer() using a spin lock to avoid this. Signed-off-by: Omair Mohammed Abdullah <omair.m.abdullah@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PMTakashi Iwai2012-08-091-1/+1
| | | | | | | | | | | When CONFIG_PM is set but CONFIG_PM_SLEEP is unset, SIMPLE_DEV_PM_OPS() ignores the given functions, and this leads to compile warnings. For avoiding this, simply check CONFIG_PM_SLEEP instead of CONFIG_PM. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: convert PM ops of platform_driver to new pm opsTakashi Iwai2012-07-031-9/+10
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Add missing .owner=THIS_MODULE to platform_driver definitionsTakashi Iwai2012-07-021-1/+2
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-aloop - improve the sample copy accurracyJaroslav Kysela2012-05-151-27/+35
| | | | | | | | | Maintain both streams (playback, capture) synchronized. Previous code didn't take in account the small byte count drifts caused by the irq position rounding. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: module_param: make bool parameters really boolRusty Russell2011-12-191-1/+1
| | | | | | | | | | | | 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>
* sound: fix drivers needing module.h not moduleparam.hPaul Gortmaker2011-10-311-1/+1
| | | | | | | | | The implicit presence of module.h lured several users into incorrectly thinking that they only needed/used modparam.h but once we clean up the module.h presence, these will show up as build failures, so fix 'em now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* ALSA: aloop - Use vmalloc bufferTakashi Iwai2011-09-241-6/+7
| | | | | | | | snd-aloop driver is virtual and has no need for allocating contiguous pages. It'll be more system-friendly to use vmalloc buffers. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: aloop - Fix possible IRQ lock inversionTakashi Iwai2011-03-181-10/+9
| | | | | | | | | | loopback_pos_update() can be called in the timer callback, thus the lock held should be irq-safe. Otherwise you'll get AB/BA deadlock together with substream->self_group.lock. Reported-and-tested-by: Knut Petersen <Knut_Petersen@t-online.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: snd-aloop - add pause supportJaroslav Kysela2010-10-201-5/+22
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: snd-aloop - fix locking issues (running flag updates)Jaroslav Kysela2010-10-201-13/+19
| | | | | | | On SMP machines, the cable->running update must be atomic, otherwise stream is not started correctly sometimes. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: snd-aloop: add cable#0 and cable#1 files to proc card treeJaroslav Kysela2010-10-181-0/+84
| | | | | | Show some useful runtime information using procfs. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: snd-aloop - fix issue in the timer start functionJaroslav Kysela2010-10-141-1/+7
| | | | | | | | | | In some circumstances (the rate shift value was changed), the irq_pos value may be higher than the fraction value in the timer start function. Check for it. Also, to avoid value overflow, decrease maximum period size. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: snd-aloop: Fix hw_params restrictions and checkingJaroslav Kysela2010-10-111-18/+106
| | | | | | | | This patch fixes the hw_params restrictions when first (or playback) stream sets the final hardware parameters. Also, fix the hw_params checking in the trigger callback. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: snd-aloop - fix "PCM Slave Active" element read valueJaroslav Kysela2010-10-021-1/+1
| | | | | | Simple coding fix. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: snd-aloop - fix capture buffer silenceJaroslav Kysela2010-09-301-2/+4
| | | | | | | In a special case, some old samples are left in the capture ring buffer. Fix it. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: snd-aloop - fix the "PCM Playback Channels" kcontrolJaroslav Kysela2010-09-151-1/+1
| | | | | | Obvious copy-and-paste error. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: introduce the snd-aloop module for the PCM loopbackJaroslav Kysela2010-08-091-0/+1055
The snd-aloop module allows redirecting of the PCM playback in the kernel back to the user space using the standard ALSA PCM capture API. The module also allows time synchronization with another timing source and notifications of playback stream parameter changes. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
OpenPOWER on IntegriCloud