diff options
Diffstat (limited to 'drivers/staging/line6/audio.c')
| -rw-r--r-- | drivers/staging/line6/audio.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/staging/line6/audio.c b/drivers/staging/line6/audio.c index e2ac8d60f8c..171d80c1b02 100644 --- a/drivers/staging/line6/audio.c +++ b/drivers/staging/line6/audio.c @@ -1,7 +1,7 @@ /* - * Line6 Linux USB driver - 0.8.0 + * Line6 Linux USB driver - 0.9.1beta * - * Copyright (C) 2004-2009 Markus Grabner (grabner@icg.tugraz.at) + * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -9,37 +9,35 @@ * */ -#include "driver.h" -#include "audio.h" - #include <sound/core.h> #include <sound/initval.h> +#include <linux/export.h> - -static int line6_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; -static char *line6_id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; - +#include "driver.h" +#include "audio.h" /* Initialize the Line6 USB audio system. */ int line6_init_audio(struct usb_line6 *line6) { - static int dev; struct snd_card *card; int err; - err = snd_card_create(line6_index[dev], line6_id[dev], THIS_MODULE, 0, - &card); + err = snd_card_new(line6->ifcdev, + SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, + THIS_MODULE, 0, &card); if (err < 0) return err; line6->card = card; + strcpy(card->id, line6->properties->id); strcpy(card->driver, DRIVER_NAME); - strcpy(card->shortname, "Line6-USB"); + strcpy(card->shortname, line6->properties->name); + /* longname is 80 chars - see asound.h */ sprintf(card->longname, "Line6 %s at USB %s", line6->properties->name, - dev_name(line6->ifcdev)); /* 80 chars - see asound.h */ + dev_name(line6->ifcdev)); return 0; } |
