[alsa-devel] [PATCH - SB-0500 1/1] preliminary support for Toshiba SB-0500 (remote works)
Signed-off-by: Andrea Borgia andrea@borgia.bo.it
diff --git a/usb/usbmixer.c b/usb/usbmixer.c index a492461..6490a74 100644 --- a/usb/usbmixer.c +++ b/usb/usbmixer.c @@ -66,6 +66,7 @@ static const struct rc_config { { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */ { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */ { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */ + { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */ };
struct usb_mixer_interface { @@ -1706,7 +1707,8 @@ static void snd_usb_mixer_memory_change(struct usb_mixer_interface *mixer, break; /* live24ext: 4 = line-in jack */ case 3: /* hp-out jack (may actuate Mute) */ - if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040)) + if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || + mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) snd_usb_mixer_notify_id(mixer, mixer->rc_cfg->mute_mixer_id); break; default: @@ -1957,8 +1959,9 @@ static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer) int i, err;
for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) { - if (i > 1 && /* Live24ext has 2 LEDs only */ - mixer->chip->usb_id == USB_ID(0x041e, 0x3040)) + if (i > 1 && /* Live24ext has 2 LEDs only */ + (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || + mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) break; err = snd_ctl_add(mixer->chip->card, snd_ctl_new1(&snd_audigy2nx_controls[i], mixer)); @@ -1995,7 +1998,8 @@ static void snd_audigy2nx_proc_read(struct snd_info_entry *entry, snd_iprintf(buffer, "%s jacks\n\n", mixer->chip->card->shortname); if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020)) jacks = jacks_audigy2nx; - else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040)) + else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || + mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) jacks = jacks_live24ext; else return; @@ -2045,7 +2049,8 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, goto _error;
if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020) || - mixer->chip->usb_id == USB_ID(0x041e, 0x3040)) { + mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || + mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) { struct snd_info_entry *entry;
if ((err = snd_audigy2nx_controls_create(mixer)) < 0) diff --git a/usb/usbmixer_maps.c b/usb/usbmixer_maps.c index d755be0..f41214f 100644 --- a/usb/usbmixer_maps.c +++ b/usb/usbmixer_maps.c @@ -285,6 +285,11 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { .map = live24ext_map, }, { + .id = USB_ID(0x041e, 0x3048), + .map = audigy2nx_map, + .selector_map = audigy2nx_selectors, + }, + { /* Hercules DJ Console (Windows Edition) */ .id = USB_ID(0x06f8, 0xb000), .ignore_ctl_error = 1,
At Mon, 5 Jan 2009 21:28:09 +0100, Andrea Borgia wrote:
Signed-off-by: Andrea Borgia andrea@borgia.bo.it
Could you provide a bit description of the patch? Otherwise the changes look good and trivial enough.
thanks,
Takashi
diff --git a/usb/usbmixer.c b/usb/usbmixer.c index a492461..6490a74 100644 --- a/usb/usbmixer.c +++ b/usb/usbmixer.c @@ -66,6 +66,7 @@ static const struct rc_config { { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */ { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */ { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */
- { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */
};
struct usb_mixer_interface { @@ -1706,7 +1707,8 @@ static void snd_usb_mixer_memory_change(struct usb_mixer_interface *mixer, break; /* live24ext: 4 = line-in jack */ case 3: /* hp-out jack (may actuate Mute) */
if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040))
if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
break; default:mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) snd_usb_mixer_notify_id(mixer, mixer->rc_cfg->mute_mixer_id);
@@ -1957,8 +1959,9 @@ static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer) int i, err;
for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) {
if (i > 1 && /* Live24ext has 2 LEDs only */
mixer->chip->usb_id == USB_ID(0x041e, 0x3040))
if (i > 1 && /* Live24ext has 2 LEDs only */
(mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
err = snd_ctl_add(mixer->chip->card, snd_ctl_new1(&snd_audigy2nx_controls[i], mixer));mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) break;
@@ -1995,7 +1998,8 @@ static void snd_audigy2nx_proc_read(struct snd_info_entry *entry, snd_iprintf(buffer, "%s jacks\n\n", mixer->chip->card->shortname); if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020)) jacks = jacks_audigy2nx;
- else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040))
- else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
jacks = jacks_live24ext; else return;mixer->chip->usb_id == USB_ID(0x041e, 0x3048))
@@ -2045,7 +2049,8 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, goto _error;
if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020) ||
mixer->chip->usb_id == USB_ID(0x041e, 0x3040)) {
mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) {
struct snd_info_entry *entry;
if ((err = snd_audigy2nx_controls_create(mixer)) < 0)
diff --git a/usb/usbmixer_maps.c b/usb/usbmixer_maps.c index d755be0..f41214f 100644 --- a/usb/usbmixer_maps.c +++ b/usb/usbmixer_maps.c @@ -285,6 +285,11 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { .map = live24ext_map, }, {
.id = USB_ID(0x041e, 0x3048),
.map = audigy2nx_map,
.selector_map = audigy2nx_selectors,
- },
- { /* Hercules DJ Console (Windows Edition) */ .id = USB_ID(0x06f8, 0xb000), .ignore_ctl_error = 1,
-- 1.5.4.3
Takashi Iwai wrote:
Could you provide a bit description of the patch? Otherwise the changes look good and trivial enough.
The Toshiba SB-0500 is a rebranded version of the Creative Live24! External: it shares the same chipset and only has minor "cosmetic" differences.
I have tested the remote (which was my main goal) and basic audio output seem to be ok. I am not at all certain that I got the mixer correctly figured out, that's why I am badging it "preliminary".
A more concise version for logging: "initial support for Toshiba SB-0500, a clone of Creative Live24!"
BR, Andrea.
At Mon, 05 Jan 2009 22:04:33 +0100, Andrea Borgia wrote:
Takashi Iwai wrote:
Could you provide a bit description of the patch? Otherwise the changes look good and trivial enough.
The Toshiba SB-0500 is a rebranded version of the Creative Live24! External: it shares the same chipset and only has minor "cosmetic" differences.
I have tested the remote (which was my main goal) and basic audio output seem to be ok. I am not at all certain that I got the mixer correctly figured out, that's why I am badging it "preliminary".
A more concise version for logging: "initial support for Toshiba SB-0500, a clone of Creative Live24!"
Please put the comment in the patch and repost, so that it can be applied "as is".
thanks,
Takashi
participants (2)
-
Andrea Borgia
-
Takashi Iwai