Commit Graph

21 Commits

Author SHA1 Message Date
Takashi Iwai
6e10af7714 ALSA: spi: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14 08:14:08 +01:00
Paul Walmsley
f62438ac53 ALSA: at73c213: clk_round_rate() can return a zero upon error
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-12-10 21:19:47 +01:00
Takashi Iwai
f35e839a3c ALSA: Remove the rest of *_set_drvdata(NULL) calls
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-05-29 12:50:59 +02:00
Lars-Peter Clausen
01f9326ae4 ALSA: at73c213: Use dev_pm_ops
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>
2013-04-11 11:58:12 +02:00
Bill Pemberton
4423d24750 ALSA: at73c213: remove __dev* attributes
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-12-07 07:34:13 +01:00
Axel Lin
f443ac935a ALSA: Convert at73c213 to module_spi_driver
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>
2012-01-27 15:18:36 +01:00
Hans-Christian Egtvedt
0cfae7c937 ALSA: atmel - update author email for ABDAC, AC97C and AT73C213
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>
2011-06-28 16:56:07 +02:00
Peter Rosin
e2e9566230 ALSA: AT73C213: Rectify misleading comment.
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-11-11 02:03:29 +01:00
Wan ZongShun
ff8bd64eaf ALSA: sound/spi: patch for the unuseful variable removal
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>
2010-06-08 16:51:27 +02:00
Takashi Iwai
bd7dd77c2a ALSA: Convert to snd_card_create() in other sound/*
Convert from snd_card_new() to the new snd_card_create() function
in other sound subdirectories.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12 15:21:19 +01:00
Takashi Iwai
89fe511792 sound: Convert to menuconfig
Convert menu in sound Kconfig files to menuconfig and if.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-27 15:56:20 +02:00
Atsushi Nemoto
f5e09ef098 [ALSA] at73c213: Add constraints for periods value
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 12:00:26 +02:00
Atsushi Nemoto
9f2f0f7c4e [ALSA] at73c213: remove redundant private_free routine
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 12:00:23 +02:00
Atsushi Nemoto
4a295ca474 [ALSA] at73c213: monaural support
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 12:00:22 +02:00
Atsushi Nemoto
c67582b195 [ALSA] at73c213: fix error checking for clk API
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 12:00:22 +02:00
Hans-Christian Egtvedt
2eef1258e5 [ALSA] Add __devinit macro to at73c213 sound driver probe functions
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-04-24 12:00:11 +02:00
Takashi Iwai
9004acc70e [ALSA] Remove sound/driver.h
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 17:29:48 +01:00
Hans-Christian Egtvedt
f488d9fcc8 [ALSA] at73c213: replace spinlock in mixer functions with a mutex
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 17:29:39 +01:00
Takashi Iwai
4b6c26aff3 [ALSA] at73c213 - Use common callback
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>
2008-01-31 17:29:25 +01:00
Hans-Christian Egtvedt
eafe570847 [ALSA] ALSA sound driver for the AT73C213 DAC using Atmel SSC driver
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>
2007-10-16 15:57:50 +02:00
Hans-Christian Egtvedt
3b0a899ca0 [ALSA] Add SPI devices to ALSA Kconfig and Makefile
This patch adds SPI devices in the ALSA diretory, including the Kconfig and
Makefile.

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>
2007-10-16 15:57:47 +02:00