Gitweb: http://git.kernel.org/linus/199f7978730a4bbd88038fd84212b30759579f1a
Commit: 199f7978730a4bbd88038fd84212b30759579f1a
Parent: c59765042f53a79a7a65585042ff463b69cb248c
Author: Krzysztof Helt <krzysztof.h1@wp.pl>
AuthorDate: Fri Jan 9 23:10:52 2009 +0100
Committer: Takashi Iwai <tiwai@suse.de>
CommitDate: Sun Jan 11 13:09:05 2009 +0100
ALSA: wss-lib: move AD1845 frequency setting into wss-lib
This is required to allow the sscape driver
to autodetect installed codec.
Also, do not create a timer if detected codec
has no hardware timer (e.g. AD1848).
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Rene Herman
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/isa/sscape.c | 113 +++-------------------------------------------
sound/isa/wss/wss_lib.c | 40 +++++++++++++++++
2 files changed, 48 insertions(+), 105 deletions(-)
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 48a16d8..bc44916 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -129,9 +129,6 @@ enum GA_REG {
#define DMA_8BIT 0x80
-#define AD1845_FREQ_SEL_MSB 0x16
-#define AD1845_FREQ_SEL_LSB 0x17
-
enum card_type {
SSCAPE,
SSCAPE_PNP,
@@ -955,82 +952,6 @@ static int __devinit create_mpu401(struct snd_card *card, int devnum, unsigned l
/*
- * Override for the CS4231 playback format function.
- * The AD1845 has much simpler format and rate selection.
- */
-static void ad1845_playback_format(struct snd_wss *chip,
- struct snd_pcm_hw_params *params,
- unsigned char format)
-{
- unsigned long flags;
- unsigned rate = params_rate(params);
-
- /*
- * The AD1845 can't handle sample frequencies
- * outside of 4 kHZ to 50 kHZ
- */
- if (rate > 50000)
- rate = 50000;
- else if (rate < 4000)
- rate = 4000;
-
- spin_lock_irqsave(&chip->reg_lock, flags);
-
- /*
- * Program the AD1845 correctly for the playback stream.
- * Note that we do NOT need to ...