From 0444e2aca9ac89f571f0bb7781d12818719e4baf Mon Sep 17 00:00:00 2001 From: Sasha Khapyorsky Date: Tue, 13 Sep 2005 11:21:30 +0200 Subject: [ALSA] no templated index for mc97 controls AC97 Codec No index is templated for mdoem controls. Signed-off-by: Sasha Khapyorsky Signed-off-by: Takashi Iwai --- sound/pci/ac97/ac97_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci') diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index e64cb07a39c..f221eba5c32 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -1557,7 +1557,7 @@ static int snd_ac97_modem_build(snd_card_t * card, ac97_t * ac97) /* build modem switches */ for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_modem_switches); idx++) - if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_modem_switches[idx], ac97))) < 0) + if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ac97_controls_modem_switches[idx], ac97))) < 0) return err; /* build chip specific controls */ -- cgit v1.2.3 From 27bcaa693c866b9bccf94ee5b60eaf705e90c341 Mon Sep 17 00:00:00 2001 From: Sasha Khapyorsky Date: Tue, 13 Sep 2005 11:23:13 +0200 Subject: [ALSA] no templated index for si3036 modem controls AC97 Codec No index is templated for si3036 modem controls. Signed-off-by: Sasha Khapyorsky Signed-off-by: Takashi Iwai --- sound/pci/ac97/ac97_patch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sound/pci') diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 045ddc743ed..0238cc65d32 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -2752,7 +2752,11 @@ AC97_DOUBLE("Modem Speaker Volume", 0x5c, 14, 12, 3, 1) static int patch_si3036_specific(ac97_t * ac97) { - return patch_build_controls(ac97, snd_ac97_controls_si3036, ARRAY_SIZE(snd_ac97_controls_si3036)); + int idx, err; + for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_si3036); idx++) + if ((err = snd_ctl_add(ac97->bus->card, snd_ctl_new1(&snd_ac97_controls_si3036[idx], ac97))) < 0) + return err; + return 0; } static struct snd_ac97_build_ops patch_si3036_ops = { -- cgit v1.2.3 From 84802f0df3425ae0f9987af0d35ea19910479ec0 Mon Sep 17 00:00:00 2001 From: Sasha Khapyorsky Date: Tue, 13 Sep 2005 11:25:54 +0200 Subject: [ALSA] hda-codec - 'empty' generic mfg-only codec HDA generic driver This creates 'empty' hda generic for unknown MFG-only codecs. Signed-off-by: Sasha Khapyorsky Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_generic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 5b829a1a4c6..d0eb9f2250a 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -881,10 +881,8 @@ int snd_hda_parse_generic_codec(struct hda_codec *codec) struct hda_gspec *spec; int err; - if(!codec->afg) { - snd_printdd("hda_generic: no generic modem yet\n"); - return -ENODEV; - } + if(!codec->afg) + return 0; spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (spec == NULL) { -- cgit v1.2.3 From e8dede5a136bd7ef36d1779ea173cfd504dff0cb Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 13 Sep 2005 11:28:53 +0200 Subject: [ALSA] hda-intel - Disable DMA position auto-correction HDA Intel driver Disable the auto-correction of DMA position temporarily. It doesn't work as expected yet... Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_intel.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound/pci') diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 9590ece2099..6fe696e53ea 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1137,6 +1137,7 @@ static snd_pcm_uframes_t azx_pcm_pointer(snd_pcm_substream_t *substream) pos = azx_sd_readl(azx_dev, SD_LPIB); if (chip->position_fix == POS_FIX_FIFO) pos += azx_dev->fifo_size; +#if 0 /* disabled temprarily, auto-correction doesn't work well... */ else if (chip->position_fix == POS_FIX_AUTO && azx_dev->period_updating) { /* check the validity of DMA position */ unsigned int diff = 0; @@ -1157,6 +1158,10 @@ static snd_pcm_uframes_t azx_pcm_pointer(snd_pcm_substream_t *substream) } azx_dev->period_updating = 0; } +#else + else if (chip->position_fix == POS_FIX_AUTO) + pos += azx_dev->fifo_size; +#endif } if (pos >= azx_dev->bufsize) pos = 0; -- cgit v1.2.3 From 3a91e95969b84a56c7fef15ba25a5f6a17dd94b2 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Fri, 16 Sep 2005 18:46:36 +0200 Subject: [ALSA] remove bogus match method for ac97_bus AC97 Codec The bus_id is initialized with a generic identifier string which is not really useful for proper driver matching. Let the driver decide what it needs via its probe method instead. Signed-off-by: Nicolas Pitre Signed-off-by: Takashi Iwai --- sound/pci/ac97/ac97_bus.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/ac97/ac97_bus.c b/sound/pci/ac97/ac97_bus.c index 227f8b9f67c..6f0e4bd83aa 100644 --- a/sound/pci/ac97/ac97_bus.c +++ b/sound/pci/ac97/ac97_bus.c @@ -17,12 +17,13 @@ #include /* - * Codec families have names seperated by commas, so we search for an - * individual codec name within the family string. + * Let drivers decide whether they want to support given codec from their + * probe method. Drivers have direct access to the ac97_t structure and may + * decide based on the id field amongst other things. */ static int ac97_bus_match(struct device *dev, struct device_driver *drv) { - return (strstr(dev->bus_id, drv->name) != NULL); + return 1; } static int ac97_bus_suspend(struct device *dev, pm_message_t state) -- cgit v1.2.3 From 72e75de2df9a7116d0afbcd5810b2a8fd4bf7559 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Fri, 16 Sep 2005 18:49:22 +0200 Subject: [ALSA] remove redundent assignment to the ac97 device structure AC97 Codec Don't use dev.platform_data to store a reference to the containing ac97_t structure. Such assignment is redundent since we can deduce the ac97_t structure location from the contained device structure. This sets platform_data free for other purposes. Signed-off-by: Nicolas Pitre Signed-off-by: Takashi Iwai --- sound/pci/ac97/ac97_codec.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/pci') diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index f221eba5c32..41fc290149e 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -1828,7 +1828,6 @@ static int snd_ac97_dev_register(snd_device_t *device) ac97->dev.bus = &ac97_bus_type; ac97->dev.parent = ac97->bus->card->dev; - ac97->dev.platform_data = ac97; ac97->dev.release = ac97_device_release; snprintf(ac97->dev.bus_id, BUS_ID_SIZE, "card%d-%d", ac97->bus->card->number, ac97->num); if ((err = device_register(&ac97->dev)) < 0) { -- cgit v1.2.3 From 90b66e833261618e11d71a35f2488a7d664a4566 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Fri, 16 Sep 2005 18:50:53 +0200 Subject: [ALSA] clean suspend/resume calls for ac97_bus_type AC97 Codec A single call to the driver suspend/resume method for each device is enough. The level and SUSPEND_*/RESUME_* arguments are deprecated and said to be removed eventually anyway (no other subsystem are using them anymore except platform devices). Signed-off-by: Nicolas Pitre Signed-off-by: Takashi Iwai --- sound/pci/ac97/ac97_bus.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/ac97/ac97_bus.c b/sound/pci/ac97/ac97_bus.c index 6f0e4bd83aa..becbc420ba4 100644 --- a/sound/pci/ac97/ac97_bus.c +++ b/sound/pci/ac97/ac97_bus.c @@ -30,13 +30,8 @@ static int ac97_bus_suspend(struct device *dev, pm_message_t state) { int ret = 0; - if (dev->driver && dev->driver->suspend) { - ret = dev->driver->suspend(dev, state, SUSPEND_DISABLE); - if (ret == 0) - ret = dev->driver->suspend(dev, state, SUSPEND_SAVE_STATE); - if (ret == 0) - ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN); - } + if (dev->driver && dev->driver->suspend) + ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN); return ret; } @@ -44,13 +39,8 @@ static int ac97_bus_resume(struct device *dev) { int ret = 0; - if (dev->driver && dev->driver->resume) { + if (dev->driver && dev->driver->resume) ret = dev->driver->resume(dev, RESUME_POWER_ON); - if (ret == 0) - ret = dev->driver->resume(dev, RESUME_RESTORE_STATE); - if (ret == 0) - ret = dev->driver->resume(dev, RESUME_ENABLE); - } return ret; } -- cgit v1.2.3 From db99055f8d8eb54d9da55293a11b82e9d53ca80d Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 16 Sep 2005 19:07:52 +0200 Subject: [ALSA] via82xx - Add a dxs whitelist entry VIA82xx driver Added a dxs whitelist entry for an ECS mobo. Signed-off-by: Takashi Iwai --- sound/pci/via82xx.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/pci') diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 6db7de6b971..964113ffa60 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -2147,6 +2147,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci) { .subvendor = 0x1019, .subdevice = 0x0996, .action = VIA_DXS_48K }, { .subvendor = 0x1019, .subdevice = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */ { .subvendor = 0x1019, .subdevice = 0x0a85, .action = VIA_DXS_NO_VRA }, /* ECS L7VMM2 */ + { .subvendor = 0x1019, .subdevice = 0xa101, .action = VIA_DXS_SRC }, { .subvendor = 0x1025, .subdevice = 0x0033, .action = VIA_DXS_NO_VRA }, /* Acer Inspire 1353LM */ { .subvendor = 0x1025, .subdevice = 0x0046, .action = VIA_DXS_SRC }, /* Acer Aspire 1524 WLMi */ { .subvendor = 0x1043, .subdevice = 0x8095, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8X (FIXME: possibly VIA_DXS_ENABLE?)*/ -- cgit v1.2.3 From a7175aab3f5cffe3c79575e56dfcfe87a41a74c7 Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Thu, 29 Sep 2005 13:13:38 +0200 Subject: [ALSA] fix HD audio ALC260 mono (un)mute HDA Codec driver The ALC260 'Mono Playback Switch' is marked as an output in patch_realtek.c. It actually does not work unless it is marked as an input. Go figure... This was tested and confirmed on an HP xw4300. Signed-off-by: John W. Linville Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 849b5b50c92..9aca9b4e813 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2243,7 +2243,7 @@ static snd_kcontrol_new_t alc260_base_mixer[] = { HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT), ALC_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT), HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), - ALC_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_OUTPUT), + ALC_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_INPUT), HDA_CODEC_VOLUME("Capture Volume", 0x04, 0x0, HDA_INPUT), HDA_CODEC_MUTE("Capture Switch", 0x04, 0x0, HDA_INPUT), { @@ -2270,7 +2270,7 @@ static snd_kcontrol_new_t alc260_hp_mixer[] = { HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT), ALC_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT), HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), - ALC_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_OUTPUT), + ALC_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_INPUT), HDA_CODEC_VOLUME("Capture Volume", 0x05, 0x0, HDA_INPUT), HDA_CODEC_MUTE("Capture Switch", 0x05, 0x0, HDA_INPUT), { -- cgit v1.2.3 From 1c1fa8b69e6d538bcc1e58791938b31a2354ee65 Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Thu, 29 Sep 2005 13:18:41 +0200 Subject: [ALSA] fix alc880_test_mixer typo HDA Codec driver Fix a typo (cut & paste) in the alc880_test_mixer structure. Signed-off-by: John W. Linville Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9aca9b4e813..f62597e576d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1385,8 +1385,8 @@ static snd_kcontrol_new_t alc880_test_mixer[] = { HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), ALC_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), ALC_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), - ALC_BIND_MUTE("CLFE Playback Volume", 0x0e, 2, HDA_INPUT), - ALC_BIND_MUTE("Side Playback Volume", 0x0f, 2, HDA_INPUT), + ALC_BIND_MUTE("CLFE Playback Switch", 0x0e, 2, HDA_INPUT), + ALC_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), PIN_CTL_TEST("Front Pin Mode", 0x14), PIN_CTL_TEST("Surround Pin Mode", 0x15), PIN_CTL_TEST("CLFE Pin Mode", 0x16), -- cgit v1.2.3 From 92447f3f1a1c1af418eb1dfee85a7685d9b9a3ef Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Thu, 29 Sep 2005 13:20:45 +0200 Subject: [ALSA] fix HD audio ALC882 lfe (un)mute HDA Codec driver Mark the ALC882 'LFE Playback Switch' as an input, like the other playback switch settings. Signed-off-by: John W. Linville Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f62597e576d..429e4786f7c 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2501,7 +2501,7 @@ static snd_kcontrol_new_t alc882_base_mixer[] = { HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), ALC_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT), - ALC_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_OUTPUT), + ALC_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), ALC_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), -- cgit v1.2.3 From 35451088f445955fe460a38b25b97c263ff35033 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 29 Sep 2005 13:25:14 +0200 Subject: [ALSA] Fix confliction of capture controls on ALC880 test model HDA Codec driver Fixed the confliction of capture controls on ALC880 'test' model. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 429e4786f7c..7327deb6df9 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1409,18 +1409,6 @@ static snd_kcontrol_new_t alc880_test_mixer[] = { HDA_CODEC_MUTE("In-4 Playback Switch", 0x0b, 0x3, HDA_INPUT), HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x4, HDA_INPUT), HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x4, HDA_INPUT), - HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), - HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Input Source", - .count = 2, - .info = alc_mux_enum_info, - .get = alc_mux_enum_get, - .put = alc_mux_enum_put, - }, { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Channel Mode", -- cgit v1.2.3 From c66186e1c966e7e115a86af55597c05c5512014b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 29 Sep 2005 13:49:44 +0200 Subject: [ALSA] via82xx - dxs_support entry for an ASUS mobo VIA82xx driver Addded a dxs_support entry for an ASUS mobo. Signed-off-by: Takashi Iwai --- sound/pci/via82xx.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/pci') diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 964113ffa60..3c0205b91e1 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -2153,6 +2153,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci) { .subvendor = 0x1043, .subdevice = 0x8095, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8X (FIXME: possibly VIA_DXS_ENABLE?)*/ { .subvendor = 0x1043, .subdevice = 0x80a1, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8-X */ { .subvendor = 0x1043, .subdevice = 0x80b0, .action = VIA_DXS_NO_VRA }, /* ASUS A7V600 & K8V*/ + { .subvendor = 0x1043, .subdevice = 0x810d, .action = VIA_DXS_SRC }, /* ASUS */ { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC }, /* ASUS A8V Deluxe */ { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */ { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */ -- cgit v1.2.3 From f12aa40c9d76af5add413731d30565327219c41f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 30 Sep 2005 16:56:59 +0200 Subject: [ALSA] emu10k1 - Fix loading of SBLive Game board EMU10K1/EMU10K2 driver Fixed the error at loading SBLive Game board (and possible other models). The PCI SSIDs of this board conflicts with SB Live 5.1 Platinum, which has no AC97 chip. Signed-off-by: Takashi Iwai --- sound/pci/emu10k1/emu10k1_main.c | 5 ++++- sound/pci/emu10k1/emumixer.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index e87e8427f25..e9cd8e054f2 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -756,9 +756,12 @@ static emu_chip_details_t emu_chip_details[] = { .sblive51 = 1} , /* Tested by alsa bugtrack user "hus" bug #1297 12th Aug 2005 */ {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80611102, - .driver = "EMU10K1", .name = "SBLive! Platinum 5.1 [SB0060]", + .driver = "EMU10K1", .name = "SBLive 5.1 [SB0060]", .id = "Live", .emu10k1_chip = 1, + .ac97_chip = 2, /* ac97 is optional; both SBLive 5.1 and platinum + * share the same IDs! + */ .sblive51 = 1} , {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80511102, .driver = "EMU10K1", .name = "SBLive! Value [CT4850]", diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index d71a72e84bc..6994f90bb83 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c @@ -802,8 +802,13 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu, .read = snd_emu10k1_ac97_read, }; - if ((err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus)) < 0) - return err; + if ((err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus)) < 0) { + if (emu->card_capabilities->ac97_chip == 1) + return err; + snd_printd(KERN_INFO "emu10k1: AC97 is optional on this board\n"); + snd_printd(KERN_INFO" Proceeding without ac97 mixers...\n"); + goto no_ac97; /* FIXME: get rid of ugly gotos.. */ + } pbus->no_vra = 1; /* we don't need VRA */ memset(&ac97, 0, sizeof(ac97)); @@ -836,6 +841,7 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu, for (; *c; c++) remove_ctl(card, *c); } else { + no_ac97: if (emu->card_capabilities->ecard) strcpy(emu->card->mixername, "EMU APS"); else if (emu->audigy) -- cgit v1.2.3 From 315e3bd717068624ce888f3d045a168acefc6ce8 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Tue, 4 Oct 2005 08:42:10 +0200 Subject: [ALSA] korg1212: fix typo KORG1212 driver Add a missing comma that made the stateName array one entry too short. Signed-off-by: Clemens Ladisch --- sound/pci/korg1212/korg1212.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci') diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 09f9cbe116a..5561fd4091e 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -442,7 +442,7 @@ static char* stateName[] = { "Setup for play", "Playing", "Monitor mode on", - "Calibrating" + "Calibrating", "Invalid" }; -- cgit v1.2.3 From b150869369adafb7cc0cf65ea500f9f3c4bbf857 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 4 Oct 2005 13:49:32 +0200 Subject: [ALSA] emu10k1 - Fix handling of ac97_chip=2 EMU10K1/EMU10K2 driver Fixed the handling of ac97_chip=2 capability type. The error occurs in snd_ac97_mixer(), not in snd_ac97_bus(). Also, release the unnecessary ac97_bus object in the error path. Signed-off-by: Takashi Iwai --- sound/pci/emu10k1/emumixer.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 6994f90bb83..7cc831ccd0c 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c @@ -802,21 +802,22 @@ int __devinit snd_emu10k1_mixer(emu10k1_t *emu, .read = snd_emu10k1_ac97_read, }; - if ((err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus)) < 0) { - if (emu->card_capabilities->ac97_chip == 1) - return err; - snd_printd(KERN_INFO "emu10k1: AC97 is optional on this board\n"); - snd_printd(KERN_INFO" Proceeding without ac97 mixers...\n"); - goto no_ac97; /* FIXME: get rid of ugly gotos.. */ - } + if ((err = snd_ac97_bus(emu->card, 0, &ops, NULL, &pbus)) < 0) + return err; pbus->no_vra = 1; /* we don't need VRA */ memset(&ac97, 0, sizeof(ac97)); ac97.private_data = emu; ac97.private_free = snd_emu10k1_mixer_free_ac97; ac97.scaps = AC97_SCAP_NO_SPDIF; - if ((err = snd_ac97_mixer(pbus, &ac97, &emu->ac97)) < 0) - return err; + if ((err = snd_ac97_mixer(pbus, &ac97, &emu->ac97)) < 0) { + if (emu->card_capabilities->ac97_chip == 1) + return err; + snd_printd(KERN_INFO "emu10k1: AC97 is optional on this board\n"); + snd_printd(KERN_INFO" Proceeding without ac97 mixers...\n"); + snd_device_free(emu->card, pbus); + goto no_ac97; /* FIXME: get rid of ugly gotos.. */ + } if (emu->audigy) { /* set master volume to 0 dB */ snd_ac97_write(emu->ac97, AC97_MASTER, 0x0000); -- cgit v1.2.3 From 4d060fd16946d767ee903804c6769a26d7da7ab2 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 4 Oct 2005 13:50:44 +0200 Subject: [ALSA] ali5451 - Don't build non-existing modem PCM ALI5451 driver Don't build the modem PCM if the corresponding codec isn't detected. Signed-off-by: Takashi Iwai --- sound/pci/ali5451/ali5451.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sound/pci') diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index d683f7736a6..f35b558c29b 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c @@ -1993,8 +1993,10 @@ static int __devinit snd_ali_mixer(ali_t * codec) if ((err = snd_ac97_mixer(codec->ac97_bus, &ac97, &codec->ac97[i])) < 0) { snd_printk("ali mixer %d creating error.\n", i); if(i == 0) - return err; - } + return err; + codec->num_of_codecs = 1; + break; + } } if (codec->spdif_support) { -- cgit v1.2.3