aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2005-01-03 16:16:30 +0100
committerJaroslav Kysela <perex@suse.cz>2005-01-03 16:16:30 +0100
commit469fb049ff5b775153d600811928d0a44215edb5 (patch)
tree28ec0362cdef4394793f260ee5bd8065365ea908 /sound
parent03c956350a8e6929da9fe4c2c8e59dc6c822881e (diff)
downloadhistory-469fb049ff5b775153d600811928d0a44215edb5.tar.gz
[ALSA] Add CODEC and BUS device types
OPL3,OPL4,I2C lib core,L3 drivers,AK4117 receiver,ALSA Core EMU8000 driver,AC97 Codec Core,AK4531 codec Added SNDRV_DEV_CODEC and SNDRV_DEV_BUS types to tell from the lowlevel components. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/drivers/opl3/opl3_lib.c2
-rw-r--r--sound/drivers/opl4/opl4_lib.c13
-rw-r--r--sound/i2c/i2c.c2
-rw-r--r--sound/i2c/l3/uda1341.c4
-rw-r--r--sound/i2c/other/ak4117.c2
-rw-r--r--sound/isa/sb/emu8000.c2
-rw-r--r--sound/pci/ac97/ac97_codec.c4
-rw-r--r--sound/pci/ac97/ak4531_codec.c2
8 files changed, 15 insertions, 16 deletions
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c
index 924804af7ba477..c313e5205cb873 100644
--- a/sound/drivers/opl3/opl3_lib.c
+++ b/sound/drivers/opl3/opl3_lib.c
@@ -364,7 +364,7 @@ int snd_opl3_new(snd_card_t *card,
spin_lock_init(&opl3->timer_lock);
init_MUTEX(&opl3->access_mutex);
- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, opl3, &ops)) < 0) {
+ if ((err = snd_device_new(card, SNDRV_DEV_CODEC, opl3, &ops)) < 0) {
snd_opl3_free(opl3);
return err;
}
diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c
index 5ede4281c1934b..8261464dade8e2 100644
--- a/sound/drivers/opl4/opl4_lib.c
+++ b/sound/drivers/opl4/opl4_lib.c
@@ -229,22 +229,21 @@ int snd_opl4_create(snd_card_t *card,
return err;
}
- err = snd_opl3_create(card, fm_port, fm_port + 2, opl4->hardware, 1, &opl3);
+ err = snd_device_new(card, SNDRV_DEV_CODEC, opl4, &ops);
if (err < 0) {
snd_opl4_free(opl4);
return err;
}
- /* opl3 initialization disabled opl4, so reenable */
- snd_opl4_enable_opl4(opl4);
-
- err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, opl4, &ops);
+ err = snd_opl3_create(card, fm_port, fm_port + 2, opl4->hardware, 1, &opl3);
if (err < 0) {
- snd_device_free(card, opl3);
- snd_opl4_free(opl4);
+ snd_device_free(card, opl4);
return err;
}
+ /* opl3 initialization disabled opl4, so reenable */
+ snd_opl4_enable_opl4(opl4);
+
snd_opl4_create_mixer(opl4);
#ifdef CONFIG_PROC_FS
snd_opl4_create_proc(opl4);
diff --git a/sound/i2c/i2c.c b/sound/i2c/i2c.c
index e31f491056592c..e8fa7e1a68e8da 100644
--- a/sound/i2c/i2c.c
+++ b/sound/i2c/i2c.c
@@ -94,7 +94,7 @@ int snd_i2c_bus_create(snd_card_t *card, const char *name, snd_i2c_bus_t *master
bus->master = master;
}
strlcpy(bus->name, name, sizeof(bus->name));
- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, bus, &ops)) < 0) {
+ if ((err = snd_device_new(card, SNDRV_DEV_BUS, bus, &ops)) < 0) {
snd_i2c_bus_free(bus);
return err;
}
diff --git a/sound/i2c/l3/uda1341.c b/sound/i2c/l3/uda1341.c
index 98aa0dc37271c5..e13122f3fc5094 100644
--- a/sound/i2c/l3/uda1341.c
+++ b/sound/i2c/l3/uda1341.c
@@ -17,7 +17,7 @@
* 2002-05-12 Tomas Kasparek another code cleanup
*/
-/* $Id: uda1341.c,v 1.14 2004/11/29 14:09:45 tiwai Exp $ */
+/* $Id: uda1341.c,v 1.15 2005/01/03 12:05:20 tiwai Exp $ */
#include <sound/driver.h>
#include <linux/module.h>
@@ -679,7 +679,7 @@ int __init snd_chip_uda1341_mixer_new(snd_card_t *card, struct l3_client **clnt)
return err;
}
- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, uda1341, &ops)) < 0) {
+ if ((err = snd_device_new(card, SNDRV_DEV_CODEC, uda1341, &ops)) < 0) {
l3_detach_client(uda1341);
kfree(uda1341);
return err;
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
index 7a70055b4a7e23..0419c4336a5572 100644
--- a/sound/i2c/other/ak4117.c
+++ b/sound/i2c/other/ak4117.c
@@ -103,7 +103,7 @@ int snd_ak4117_create(snd_card_t *card, ak4117_read_t *read, ak4117_write_t *wri
chip->rcs1 = reg_read(chip, AK4117_REG_RCS1);
chip->rcs2 = reg_read(chip, AK4117_REG_RCS2);
- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0)
+ if ((err = snd_device_new(card, SNDRV_DEV_CODEC, chip, &ops)) < 0)
goto __fail;
if (r_ak4117)
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c
index bc29b25b67913f..9a668dac4b2f45 100644
--- a/sound/isa/sb/emu8000.c
+++ b/sound/isa/sb/emu8000.c
@@ -1133,7 +1133,7 @@ snd_emu8000_new(snd_card_t *card, int index, long port, int seq_ports, snd_seq_d
return err;
}
- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, hw, &ops)) < 0) {
+ if ((err = snd_device_new(card, SNDRV_DEV_CODEC, hw, &ops)) < 0) {
snd_emu8000_free(hw);
return err;
}
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 773e159aa6db57..b0aa9ce794c5c4 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -1844,7 +1844,7 @@ int snd_ac97_bus(snd_card_t *card, int num, ac97_bus_ops_t *ops,
bus->clock = 48000;
spin_lock_init(&bus->bus_lock);
snd_ac97_bus_proc_init(bus);
- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, bus, &dev_ops)) < 0) {
+ if ((err = snd_device_new(card, SNDRV_DEV_BUS, bus, &dev_ops)) < 0) {
snd_ac97_bus_free(bus);
return err;
}
@@ -2137,7 +2137,7 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
snd_ac97_write_cache(ac97, AC97_EXTENDED_STATUS, reg);
}
snd_ac97_proc_init(ac97);
- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, ac97, &ops)) < 0) {
+ if ((err = snd_device_new(card, SNDRV_DEV_CODEC, ac97, &ops)) < 0) {
snd_ac97_free(ac97);
return err;
}
diff --git a/sound/pci/ac97/ak4531_codec.c b/sound/pci/ac97/ak4531_codec.c
index 1ee8540675dfa6..f9ce0fd2f52fbe 100644
--- a/sound/pci/ac97/ak4531_codec.c
+++ b/sound/pci/ac97/ak4531_codec.c
@@ -382,7 +382,7 @@ int snd_ak4531_mixer(snd_card_t * card, ak4531_t * _ak4531, ak4531_t ** rak4531)
}
}
snd_ak4531_proc_init(card, ak4531);
- if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, ak4531, &ops)) < 0) {
+ if ((err = snd_device_new(card, SNDRV_DEV_CODEC, ak4531, &ops)) < 0) {
snd_ak4531_free(ak4531);
return err;
}