2 * Line6 Linux USB driver - 0.9.1beta
4 * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation, version 2.
12 #include <sound/core.h>
13 #include <sound/initval.h>
14 #include <linux/export.h>
19 static int line6_index
[SNDRV_CARDS
] = SNDRV_DEFAULT_IDX
;
20 static char *line6_id
[SNDRV_CARDS
] = SNDRV_DEFAULT_STR
;
23 Initialize the Line6 USB audio system.
25 int line6_init_audio(struct usb_line6
*line6
)
28 struct snd_card
*card
;
31 err
= snd_card_create(line6_index
[dev
], line6_id
[dev
], THIS_MODULE
, 0,
38 strcpy(card
->id
, line6
->properties
->id
);
39 strcpy(card
->driver
, DRIVER_NAME
);
40 strcpy(card
->shortname
, line6
->properties
->name
);
41 /* longname is 80 chars - see asound.h */
42 sprintf(card
->longname
, "Line6 %s at USB %s", line6
->properties
->name
,
43 dev_name(line6
->ifcdev
));
48 Register the Line6 USB audio system.
50 int line6_register_audio(struct usb_line6
*line6
)
54 err
= snd_card_register(line6
->card
);
62 Cleanup the Line6 USB audio system.
64 void line6_cleanup_audio(struct usb_line6
*line6
)
66 struct snd_card
*card
= line6
->card
;
71 snd_card_disconnect(card
);