Skip to content

Commit

Permalink
ALSA: wss_lib: use wss pcm code instead of ad1848 one
Browse files Browse the repository at this point in the history
Use the wss pcm code and kill the ad1848 pcm code.

The AD1848 chip is much slower than CS4231 chips
so the waiting loop was increased 100x (10x is not
enough).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reviewed-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Krzysztof Helt authored and Jaroslav Kysela committed Aug 6, 2008
1 parent 5664daa commit ead893c
Show file tree
Hide file tree
Showing 10 changed files with 129 additions and 581 deletions.
8 changes: 0 additions & 8 deletions include/sound/ad1848.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@
#define AD1848_CALIB_IN_PROGRESS 0x20 /* auto calibrate in progress */
#define AD1848_DMA_REQUEST 0x10 /* DMA request in progress */

/* IBM Thinkpad specific stuff */
#define AD1848_THINKPAD_CTL_PORT1 0x15e8
#define AD1848_THINKPAD_CTL_PORT2 0x15e9
#define AD1848_THINKPAD_CS4248_ENABLE_BIT 0x02

/* exported functions */

void snd_ad1848_out(struct snd_wss *chip, unsigned char reg,
Expand All @@ -113,7 +108,4 @@ int snd_ad1848_create(struct snd_card *card,
unsigned short hardware,
struct snd_wss **chip);

int snd_ad1848_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm);
const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction);

#endif /* __SOUND_AD1848_H */
7 changes: 7 additions & 0 deletions include/sound/wss.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
#define WSS_HWSHARE_DMA1 (1<<1)
#define WSS_HWSHARE_DMA2 (1<<2)

/* IBM Thinkpad specific stuff */
#define AD1848_THINKPAD_CTL_PORT1 0x15e8
#define AD1848_THINKPAD_CTL_PORT2 0x15e9
#define AD1848_THINKPAD_CS4248_ENABLE_BIT 0x02

struct snd_wss {
unsigned long port; /* base i/o port */
struct resource *res_port;
Expand Down Expand Up @@ -153,6 +158,8 @@ int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm);
int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer);
int snd_wss_mixer(struct snd_wss *chip);

const struct snd_pcm_ops *snd_wss_get_pcm_ops(int direction);

int snd_cs4236_create(struct snd_card *card,
unsigned long port,
unsigned long cport,
Expand Down
5 changes: 3 additions & 2 deletions sound/isa/Kconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# ALSA ISA drivers

config SND_AD1848_LIB
config SND_WSS_LIB
tristate
select SND_PCM

config SND_WSS_LIB
config SND_AD1848_LIB
tristate
select SND_PCM
select SND_WSS_LIB

config SND_SB_COMMON
tristate
Expand Down
2 changes: 1 addition & 1 deletion sound/isa/ad1848/ad1848.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static int __devinit snd_ad1848_probe(struct device *dev, unsigned int n)

card->private_data = chip;

error = snd_ad1848_pcm(chip, 0, &pcm);
error = snd_wss_pcm(chip, 0, &pcm);
if (error < 0)
goto out;

Expand Down
Loading

0 comments on commit ead893c

Please sign in to comment.