summaryrefslogtreecommitdiff
path: root/sound/spi/at73c213.c
AgeCommit message (Collapse)Author
2020-01-05ALSA: spi: More constificationTakashi Iwai
Apply const prefix to the static table for registers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-68-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: spi: Constify snd_kcontrol_new itemsTakashi Iwai
Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-41-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-03ALSA: spi: Constify snd_device_ops definitionsTakashi Iwai
Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-19-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: spi: Drop superfluous ioctl PCM opsTakashi Iwai
PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-21-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-11ALSA: spi: Use managed buffer allocationTakashi Iwai
Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-64-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-06ALSA: spi: Drop superfluous PCM preallocation error checksTakashi Iwai
snd_pcm_lib_preallocate_pages() and co always succeed, so the error check is simply redundant. Drop it. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-19ALSA: spi: constify snd_pcm_ops structuresArvind Yadav
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-01-20ALSA: at73c213: manage SSC clockMans Rullgard
Since commit 49af54ff0fc7 ("misc: atmel-ssc: prepare clock only when request") the SSC driver expects clients to manage the SSC clock. This updates the at73c213 driver to enable the SSC clock whenever it is needed. Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14ALSA: spi: Convert to snd_card_new() with a device pointerTakashi Iwai
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-10ALSA: at73c213: clk_round_rate() can return a zero upon errorPaul Walmsley
Treat both negative and zero return values from clk_round_rate() as errors. This is needed since subsequent patches will convert clk_round_rate()'s return value to be an unsigned type, rather than a signed type, since some clock sources can generate rates higher than (2^31)-1 Hz. Eventually, when calling clk_round_rate(), only a return value of zero will be considered a error. All other values will be considered valid rates. The comparison against values less than 0 is kept to preserve the correct behavior in the meantime. Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-29ALSA: Remove the rest of *_set_drvdata(NULL) callsTakashi Iwai
A few calls are still left in parport drivers after this commit, which I'm not quite sure yet. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-11ALSA: at73c213: Use dev_pm_opsLars-Peter Clausen
Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-07ALSA: at73c213: 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-01-27ALSA: Convert at73c213 to module_spi_driverAxel Lin
This patch converts at73c213 to use the module_spi_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-28ALSA: atmel - update author email for ABDAC, AC97C and AT73C213Hans-Christian Egtvedt
This patch updates the email address of the sound drivers supported by me to an email account I will use on a more regular basis in the future. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-11ALSA: AT73C213: Rectify misleading comment.Peter Rosin
The Atmel SSC can divide by even numbers, not only powers of two. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08ALSA: sound/spi: patch for the unuseful variable removalWan ZongShun
The '*bitclk' of structure 'snd_at73c213' seems no use, so I make a patch to remove the unnecessary variable. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: Convert to snd_card_create() in other sound/*Takashi Iwai
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-04-24[ALSA] at73c213: Add constraints for periods valueAtsushi Nemoto
The interrupt handler always provide runtime->period_size data, so it works correctly only if buffer_size was a multiple of period_size. This patch fixes periodic click noise. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] at73c213: remove redundant private_free routineAtsushi Nemoto
snd_pcm_lib_preallocate_free_for_all() is called from snd_pcm_free() just after calling the private_free routine. So there should be no need to call it in driver's private_free routine. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] at73c213: monaural supportAtsushi Nemoto
Add support for monaural playback to at73c213 driver. The sound will be apear on L-channel. Tested on AT91SAM9260-EK. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] at73c213: fix error checking for clk APIAtsushi Nemoto
The clk_round_rate() and clk_set_rate() will return int, so not store thier return value to unsigned long variable. This bug hides real error on these API. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] Add __devinit macro to at73c213 sound driver probe functionsHans-Christian Egtvedt
This patch adds __devinit to the functions used when probing. Will also reduce the memory footprint a bit if CONFIG_HOTPLUG is not enabled. Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai
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] at73c213: replace spinlock in mixer functions with a mutexHans-Christian Egtvedt
This patch fixes the locking bug in the at73c213 SPI sound driver. This bug was triggered because spinlocks were wrapped around the spi_sync call which might sleep. The fix was to add a mutex to the sound driver and replace the spinlocks in the mixer functions with mutex lock/unlock. Tested on STK1000/STK1002. Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] at73c213 - Use common callbackTakashi Iwai
Use snd_ctl_boolean_mono_info callback to simplify. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16[ALSA] ALSA sound driver for the AT73C213 DAC using Atmel SSC driverHans-Christian Egtvedt
This patch adds support for the AT73C213 DAC using the misc Atmel SSC driver in I2S mode. The driver also requires a SPI to setup the registers and control volume. It has been tested with an AT32AP7000 on the ATSTK1000 development board. The driver should also work with any Atmel device with an SSC module supported by the Atmel SSC driver (atmel-ssc). The atmel-ssc driver is just submitted to the Linux kernel. Please see mail thread http://lkml.org/lkml/2007/7/16/32 Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>