From: Takashi Iwai <tiwai@suse.de>
To: "Peter Zubaj" <pzad@pobox.sk>
Cc: "Dave Jones" <davej@redhat.com>,
alsa-devel@alsa-project.org, James@superbug.co.uk,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
perex@suse.cz
Subject: Re: [Alsa-devel] Re: [ALSA] snd-emu10k1: ALSA bug#1297: Fix a error recognising the SB Live Platinum.
Date: Tue, 04 Oct 2005 12:50:55 +0200 [thread overview]
Message-ID: <s5h4q7xeesw.wl%tiwai@suse.de> (raw)
In-Reply-To: <dc7e3d7c111741a991e11a1a39ca9262@pobox.sk>
At Tue, 04 Oct 2005 08:39:36 +0200,
Peter Zubaj wrote:
>
>
> If ac97_chip=1 and ac97 doesn't exists - driver will refuse to load.
> If ac97_chip=2 and ac97 doesn't exists - driver should ignore ac97
>
> But I don't know if this is correct (I am not author of patch and I not tested it).
> if message is printed then there is
> goto no_ac97; /* FIXME: get rid of ugly gotos.. */
> this will skip ac97 mixer creation (if ac97 is not there this will fail and driver refuses to load)
> But I don't know if snd_ac97_bus will fail if there is no ac97 codec (I think - not, and this is not correct), then test should be done on snd_ac97_mixer and not on snd_ac97_bus creation.
You're right. The additional patch below fixes it.
Takashi
--- linux/sound/pci/emu10k1/emumixer.c 29 Sep 2005 17:59:43 -0000 1.38
+++ linux/sound/pci/emu10k1/emumixer.c 4 Oct 2005 10:48:42 -0000
@@ -802,21 +802,21 @@
.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");
+ 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);
next prev parent reply other threads:[~2005-10-04 10:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-04 6:39 Peter Zubaj
2005-10-04 10:50 ` Takashi Iwai [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-03 6:23 Peter Zubaj
2005-10-04 0:54 ` Dave Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5h4q7xeesw.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=James@superbug.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@suse.cz \
--cc=pzad@pobox.sk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®