[alsa-devel] [PATCH] Turtle Beach Multisound Classic/Pinnacle driver (4th rev)
Takashi Iwai
tiwai at suse.de
Mon Jan 26 09:56:02 CET 2009
At Sat, 24 Jan 2009 13:35:28 +0100,
Krzysztof Helt wrote:
>
> From: Krzysztof Helt <krzysztof.h1 at wp.pl>
>
> This is driver for Turtle Beach Multisound cards:
> Classic, Fiji and Pinnacle.
>
> Tested pcm playback and recording and MIDI playback
> on Multisound Pinnacle.
>
> Signed-off-by: Krzysztof Helt <krzysztof.h1 at wp.pl>
>
> ---
>
> All issues pointed by Takashi are resolved. I moved
> more code to the common part and made a common
> library.
Thanks, this looks pretty good.
But, one thing I forgot to ask...
> +static int __devinit snd_msnd_isa_probe(struct device *pdev, unsigned int idx)
> +{
> + int err;
> + struct snd_card *card;
> + struct snd_msnd *chip;
> +
> + if (isapnp[idx] || cfg[idx] == SNDRV_AUTO_PORT) {
> + printk(KERN_INFO LOGNAME ": Assuming PnP mode\n");
> + return -ENODEV;
> + }
> +
> + card = snd_card_new(index[idx], id[idx], THIS_MODULE,
> + sizeof(struct snd_msnd));
> + if (!card)
> + return -ENOMEM;
Could you use the new API snd_card_create() introduced recently?
> +#ifdef CONFIG_PNP
> +static int __devinit snd_msnd_pnp_detect(struct pnp_card_link *pcard,
> + const struct pnp_card_device_id *pid)
> +{
...
> + /*
> + * Create a new ALSA sound card entry, in anticipation
> + * of detecting our hardware ...
> + */
> + card = snd_card_new(index[idx], id[idx], THIS_MODULE,
> + sizeof(struct snd_msnd));
> + if (!card)
> + return -ENOMEM;
Ditto.
thanks,
Takashi
More information about the Alsa-devel
mailing list