mixer_quirks.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. /*
  2. * USB Audio Driver for ALSA
  3. *
  4. * Quirks and vendor-specific extensions for mixer interfaces
  5. *
  6. * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
  7. *
  8. * Many codes borrowed from audio.c by
  9. * Alan Cox (alan@lxorguk.ukuu.org.uk)
  10. * Thomas Sailer (sailer@ife.ee.ethz.ch)
  11. *
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; either version 2 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  26. */
  27. #include <linux/init.h>
  28. #include <linux/slab.h>
  29. #include <linux/usb.h>
  30. #include <linux/usb/audio.h>
  31. #include <sound/core.h>
  32. #include <sound/control.h>
  33. #include <sound/hwdep.h>
  34. #include <sound/info.h>
  35. #include "usbaudio.h"
  36. #include "mixer.h"
  37. #include "mixer_quirks.h"
  38. #include "helper.h"
  39. /*
  40. * Sound Blaster remote control configuration
  41. *
  42. * format of remote control data:
  43. * Extigy: xx 00
  44. * Audigy 2 NX: 06 80 xx 00 00 00
  45. * Live! 24-bit: 06 80 xx yy 22 83
  46. */
  47. static const struct rc_config {
  48. u32 usb_id;
  49. u8 offset;
  50. u8 length;
  51. u8 packet_length;
  52. u8 min_packet_length; /* minimum accepted length of the URB result */
  53. u8 mute_mixer_id;
  54. u32 mute_code;
  55. } rc_configs[] = {
  56. { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */
  57. { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */
  58. { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */
  59. { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */
  60. { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */
  61. };
  62. static void snd_usb_soundblaster_remote_complete(struct urb *urb)
  63. {
  64. struct usb_mixer_interface *mixer = urb->context;
  65. const struct rc_config *rc = mixer->rc_cfg;
  66. u32 code;
  67. if (urb->status < 0 || urb->actual_length < rc->min_packet_length)
  68. return;
  69. code = mixer->rc_buffer[rc->offset];
  70. if (rc->length == 2)
  71. code |= mixer->rc_buffer[rc->offset + 1] << 8;
  72. /* the Mute button actually changes the mixer control */
  73. if (code == rc->mute_code)
  74. snd_usb_mixer_notify_id(mixer, rc->mute_mixer_id);
  75. mixer->rc_code = code;
  76. wmb();
  77. wake_up(&mixer->rc_waitq);
  78. }
  79. static long snd_usb_sbrc_hwdep_read(struct snd_hwdep *hw, char __user *buf,
  80. long count, loff_t *offset)
  81. {
  82. struct usb_mixer_interface *mixer = hw->private_data;
  83. int err;
  84. u32 rc_code;
  85. if (count != 1 && count != 4)
  86. return -EINVAL;
  87. err = wait_event_interruptible(mixer->rc_waitq,
  88. (rc_code = xchg(&mixer->rc_code, 0)) != 0);
  89. if (err == 0) {
  90. if (count == 1)
  91. err = put_user(rc_code, buf);
  92. else
  93. err = put_user(rc_code, (u32 __user *)buf);
  94. }
  95. return err < 0 ? err : count;
  96. }
  97. static unsigned int snd_usb_sbrc_hwdep_poll(struct snd_hwdep *hw, struct file *file,
  98. poll_table *wait)
  99. {
  100. struct usb_mixer_interface *mixer = hw->private_data;
  101. poll_wait(file, &mixer->rc_waitq, wait);
  102. return mixer->rc_code ? POLLIN | POLLRDNORM : 0;
  103. }
  104. static int snd_usb_soundblaster_remote_init(struct usb_mixer_interface *mixer)
  105. {
  106. struct snd_hwdep *hwdep;
  107. int err, len, i;
  108. for (i = 0; i < ARRAY_SIZE(rc_configs); ++i)
  109. if (rc_configs[i].usb_id == mixer->chip->usb_id)
  110. break;
  111. if (i >= ARRAY_SIZE(rc_configs))
  112. return 0;
  113. mixer->rc_cfg = &rc_configs[i];
  114. len = mixer->rc_cfg->packet_length;
  115. init_waitqueue_head(&mixer->rc_waitq);
  116. err = snd_hwdep_new(mixer->chip->card, "SB remote control", 0, &hwdep);
  117. if (err < 0)
  118. return err;
  119. snprintf(hwdep->name, sizeof(hwdep->name),
  120. "%s remote control", mixer->chip->card->shortname);
  121. hwdep->iface = SNDRV_HWDEP_IFACE_SB_RC;
  122. hwdep->private_data = mixer;
  123. hwdep->ops.read = snd_usb_sbrc_hwdep_read;
  124. hwdep->ops.poll = snd_usb_sbrc_hwdep_poll;
  125. hwdep->exclusive = 1;
  126. mixer->rc_urb = usb_alloc_urb(0, GFP_KERNEL);
  127. if (!mixer->rc_urb)
  128. return -ENOMEM;
  129. mixer->rc_setup_packet = kmalloc(sizeof(*mixer->rc_setup_packet), GFP_KERNEL);
  130. if (!mixer->rc_setup_packet) {
  131. usb_free_urb(mixer->rc_urb);
  132. mixer->rc_urb = NULL;
  133. return -ENOMEM;
  134. }
  135. mixer->rc_setup_packet->bRequestType =
  136. USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE;
  137. mixer->rc_setup_packet->bRequest = UAC_GET_MEM;
  138. mixer->rc_setup_packet->wValue = cpu_to_le16(0);
  139. mixer->rc_setup_packet->wIndex = cpu_to_le16(0);
  140. mixer->rc_setup_packet->wLength = cpu_to_le16(len);
  141. usb_fill_control_urb(mixer->rc_urb, mixer->chip->dev,
  142. usb_rcvctrlpipe(mixer->chip->dev, 0),
  143. (u8*)mixer->rc_setup_packet, mixer->rc_buffer, len,
  144. snd_usb_soundblaster_remote_complete, mixer);
  145. return 0;
  146. }
  147. #define snd_audigy2nx_led_info snd_ctl_boolean_mono_info
  148. static int snd_audigy2nx_led_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
  149. {
  150. struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
  151. int index = kcontrol->private_value;
  152. ucontrol->value.integer.value[0] = mixer->audigy2nx_leds[index];
  153. return 0;
  154. }
  155. static int snd_audigy2nx_led_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
  156. {
  157. struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
  158. int index = kcontrol->private_value;
  159. int value = ucontrol->value.integer.value[0];
  160. int err, changed;
  161. if (value > 1)
  162. return -EINVAL;
  163. changed = value != mixer->audigy2nx_leds[index];
  164. if (mixer->chip->usb_id == USB_ID(0x041e, 0x3042))
  165. err = snd_usb_ctl_msg(mixer->chip->dev,
  166. usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
  167. USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
  168. !value, 0, NULL, 0, 100);
  169. else
  170. err = snd_usb_ctl_msg(mixer->chip->dev,
  171. usb_sndctrlpipe(mixer->chip->dev, 0), 0x24,
  172. USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
  173. value, index + 2, NULL, 0, 100);
  174. if (err < 0)
  175. return err;
  176. mixer->audigy2nx_leds[index] = value;
  177. return changed;
  178. }
  179. static struct snd_kcontrol_new snd_audigy2nx_controls[] = {
  180. {
  181. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  182. .name = "CMSS LED Switch",
  183. .info = snd_audigy2nx_led_info,
  184. .get = snd_audigy2nx_led_get,
  185. .put = snd_audigy2nx_led_put,
  186. .private_value = 0,
  187. },
  188. {
  189. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  190. .name = "Power LED Switch",
  191. .info = snd_audigy2nx_led_info,
  192. .get = snd_audigy2nx_led_get,
  193. .put = snd_audigy2nx_led_put,
  194. .private_value = 1,
  195. },
  196. {
  197. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  198. .name = "Dolby Digital LED Switch",
  199. .info = snd_audigy2nx_led_info,
  200. .get = snd_audigy2nx_led_get,
  201. .put = snd_audigy2nx_led_put,
  202. .private_value = 2,
  203. },
  204. };
  205. static int snd_audigy2nx_controls_create(struct usb_mixer_interface *mixer)
  206. {
  207. int i, err;
  208. for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_controls); ++i) {
  209. /* USB X-Fi S51 doesn't have a CMSS LED */
  210. if ((mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) && i == 0)
  211. continue;
  212. if (i > 1 && /* Live24ext has 2 LEDs only */
  213. (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
  214. mixer->chip->usb_id == USB_ID(0x041e, 0x3042) ||
  215. mixer->chip->usb_id == USB_ID(0x041e, 0x3048)))
  216. break;
  217. err = snd_ctl_add(mixer->chip->card,
  218. snd_ctl_new1(&snd_audigy2nx_controls[i], mixer));
  219. if (err < 0)
  220. return err;
  221. }
  222. mixer->audigy2nx_leds[1] = 1; /* Power LED is on by default */
  223. return 0;
  224. }
  225. static void snd_audigy2nx_proc_read(struct snd_info_entry *entry,
  226. struct snd_info_buffer *buffer)
  227. {
  228. static const struct sb_jack {
  229. int unitid;
  230. const char *name;
  231. } jacks_audigy2nx[] = {
  232. {4, "dig in "},
  233. {7, "line in"},
  234. {19, "spk out"},
  235. {20, "hph out"},
  236. {-1, NULL}
  237. }, jacks_live24ext[] = {
  238. {4, "line in"}, /* &1=Line, &2=Mic*/
  239. {3, "hph out"}, /* headphones */
  240. {0, "RC "}, /* last command, 6 bytes see rc_config above */
  241. {-1, NULL}
  242. };
  243. const struct sb_jack *jacks;
  244. struct usb_mixer_interface *mixer = entry->private_data;
  245. int i, err;
  246. u8 buf[3];
  247. snd_iprintf(buffer, "%s jacks\n\n", mixer->chip->card->shortname);
  248. if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020))
  249. jacks = jacks_audigy2nx;
  250. else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
  251. mixer->chip->usb_id == USB_ID(0x041e, 0x3048))
  252. jacks = jacks_live24ext;
  253. else
  254. return;
  255. for (i = 0; jacks[i].name; ++i) {
  256. snd_iprintf(buffer, "%s: ", jacks[i].name);
  257. err = snd_usb_ctl_msg(mixer->chip->dev,
  258. usb_rcvctrlpipe(mixer->chip->dev, 0),
  259. UAC_GET_MEM, USB_DIR_IN | USB_TYPE_CLASS |
  260. USB_RECIP_INTERFACE, 0,
  261. jacks[i].unitid << 8, buf, 3, 100);
  262. if (err == 3 && (buf[0] == 3 || buf[0] == 6))
  263. snd_iprintf(buffer, "%02x %02x\n", buf[1], buf[2]);
  264. else
  265. snd_iprintf(buffer, "?\n");
  266. }
  267. }
  268. static int snd_xonar_u1_switch_get(struct snd_kcontrol *kcontrol,
  269. struct snd_ctl_elem_value *ucontrol)
  270. {
  271. struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
  272. ucontrol->value.integer.value[0] = !!(mixer->xonar_u1_status & 0x02);
  273. return 0;
  274. }
  275. static int snd_xonar_u1_switch_put(struct snd_kcontrol *kcontrol,
  276. struct snd_ctl_elem_value *ucontrol)
  277. {
  278. struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
  279. u8 old_status, new_status;
  280. int err, changed;
  281. old_status = mixer->xonar_u1_status;
  282. if (ucontrol->value.integer.value[0])
  283. new_status = old_status | 0x02;
  284. else
  285. new_status = old_status & ~0x02;
  286. changed = new_status != old_status;
  287. err = snd_usb_ctl_msg(mixer->chip->dev,
  288. usb_sndctrlpipe(mixer->chip->dev, 0), 0x08,
  289. USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
  290. 50, 0, &new_status, 1, 100);
  291. if (err < 0)
  292. return err;
  293. mixer->xonar_u1_status = new_status;
  294. return changed;
  295. }
  296. static struct snd_kcontrol_new snd_xonar_u1_output_switch = {
  297. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  298. .name = "Digital Playback Switch",
  299. .info = snd_ctl_boolean_mono_info,
  300. .get = snd_xonar_u1_switch_get,
  301. .put = snd_xonar_u1_switch_put,
  302. };
  303. static int snd_xonar_u1_controls_create(struct usb_mixer_interface *mixer)
  304. {
  305. int err;
  306. err = snd_ctl_add(mixer->chip->card,
  307. snd_ctl_new1(&snd_xonar_u1_output_switch, mixer));
  308. if (err < 0)
  309. return err;
  310. mixer->xonar_u1_status = 0x05;
  311. return 0;
  312. }
  313. /* Native Instruments device quirks */
  314. #define _MAKE_NI_CONTROL(bRequest,wIndex) ((bRequest) << 16 | (wIndex))
  315. static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol,
  316. struct snd_ctl_elem_value *ucontrol)
  317. {
  318. struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
  319. struct usb_device *dev = mixer->chip->dev;
  320. u8 bRequest = (kcontrol->private_value >> 16) & 0xff;
  321. u16 wIndex = kcontrol->private_value & 0xffff;
  322. u8 tmp;
  323. int ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest,
  324. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
  325. 0, cpu_to_le16(wIndex),
  326. &tmp, sizeof(tmp), 1000);
  327. if (ret < 0) {
  328. snd_printk(KERN_ERR
  329. "unable to issue vendor read request (ret = %d)", ret);
  330. return ret;
  331. }
  332. ucontrol->value.integer.value[0] = tmp;
  333. return 0;
  334. }
  335. static int snd_nativeinstruments_control_put(struct snd_kcontrol *kcontrol,
  336. struct snd_ctl_elem_value *ucontrol)
  337. {
  338. struct usb_mixer_interface *mixer = snd_kcontrol_chip(kcontrol);
  339. struct usb_device *dev = mixer->chip->dev;
  340. u8 bRequest = (kcontrol->private_value >> 16) & 0xff;
  341. u16 wIndex = kcontrol->private_value & 0xffff;
  342. u16 wValue = ucontrol->value.integer.value[0];
  343. int ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), bRequest,
  344. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
  345. cpu_to_le16(wValue), cpu_to_le16(wIndex),
  346. NULL, 0, 1000);
  347. if (ret < 0) {
  348. snd_printk(KERN_ERR
  349. "unable to issue vendor write request (ret = %d)", ret);
  350. return ret;
  351. }
  352. return 0;
  353. }
  354. static struct snd_kcontrol_new snd_nativeinstruments_ta6_mixers[] = {
  355. {
  356. .name = "Direct Thru Channel A",
  357. .private_value = _MAKE_NI_CONTROL(0x01, 0x03),
  358. },
  359. {
  360. .name = "Direct Thru Channel B",
  361. .private_value = _MAKE_NI_CONTROL(0x01, 0x05),
  362. },
  363. {
  364. .name = "Phono Input Channel A",
  365. .private_value = _MAKE_NI_CONTROL(0x02, 0x03),
  366. },
  367. {
  368. .name = "Phono Input Channel B",
  369. .private_value = _MAKE_NI_CONTROL(0x02, 0x05),
  370. },
  371. };
  372. static struct snd_kcontrol_new snd_nativeinstruments_ta10_mixers[] = {
  373. {
  374. .name = "Direct Thru Channel A",
  375. .private_value = _MAKE_NI_CONTROL(0x01, 0x03),
  376. },
  377. {
  378. .name = "Direct Thru Channel B",
  379. .private_value = _MAKE_NI_CONTROL(0x01, 0x05),
  380. },
  381. {
  382. .name = "Direct Thru Channel C",
  383. .private_value = _MAKE_NI_CONTROL(0x01, 0x07),
  384. },
  385. {
  386. .name = "Direct Thru Channel D",
  387. .private_value = _MAKE_NI_CONTROL(0x01, 0x09),
  388. },
  389. {
  390. .name = "Phono Input Channel A",
  391. .private_value = _MAKE_NI_CONTROL(0x02, 0x03),
  392. },
  393. {
  394. .name = "Phono Input Channel B",
  395. .private_value = _MAKE_NI_CONTROL(0x02, 0x05),
  396. },
  397. {
  398. .name = "Phono Input Channel C",
  399. .private_value = _MAKE_NI_CONTROL(0x02, 0x07),
  400. },
  401. {
  402. .name = "Phono Input Channel D",
  403. .private_value = _MAKE_NI_CONTROL(0x02, 0x09),
  404. },
  405. };
  406. static int snd_nativeinstruments_create_mixer(struct usb_mixer_interface *mixer,
  407. const struct snd_kcontrol_new *kc,
  408. unsigned int count)
  409. {
  410. int i, err = 0;
  411. struct snd_kcontrol_new template = {
  412. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  413. .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
  414. .get = snd_nativeinstruments_control_get,
  415. .put = snd_nativeinstruments_control_put,
  416. .info = snd_ctl_boolean_mono_info,
  417. };
  418. for (i = 0; i < count; i++) {
  419. struct snd_kcontrol *c;
  420. template.name = kc[i].name;
  421. template.private_value = kc[i].private_value;
  422. c = snd_ctl_new1(&template, mixer);
  423. err = snd_ctl_add(mixer->chip->card, c);
  424. if (err < 0)
  425. break;
  426. }
  427. return err;
  428. }
  429. void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,
  430. unsigned char samplerate_id)
  431. {
  432. struct usb_mixer_interface *mixer;
  433. struct usb_mixer_elem_info *cval;
  434. int unitid = 12; /* SamleRate ExtensionUnit ID */
  435. list_for_each_entry(mixer, &chip->mixer_list, list) {
  436. cval = mixer->id_elems[unitid];
  437. if (cval) {
  438. snd_usb_mixer_set_ctl_value(cval, UAC_SET_CUR,
  439. cval->control << 8,
  440. samplerate_id);
  441. snd_usb_mixer_notify_id(mixer, unitid);
  442. }
  443. break;
  444. }
  445. }
  446. int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
  447. {
  448. int err = 0;
  449. struct snd_info_entry *entry;
  450. if ((err = snd_usb_soundblaster_remote_init(mixer)) < 0)
  451. return err;
  452. switch (mixer->chip->usb_id) {
  453. case USB_ID(0x041e, 0x3020):
  454. case USB_ID(0x041e, 0x3040):
  455. case USB_ID(0x041e, 0x3042):
  456. case USB_ID(0x041e, 0x3048):
  457. err = snd_audigy2nx_controls_create(mixer);
  458. if (err < 0)
  459. break;
  460. if (!snd_card_proc_new(mixer->chip->card, "audigy2nx", &entry))
  461. snd_info_set_text_ops(entry, mixer,
  462. snd_audigy2nx_proc_read);
  463. break;
  464. case USB_ID(0x0b05, 0x1739):
  465. case USB_ID(0x0b05, 0x1743):
  466. err = snd_xonar_u1_controls_create(mixer);
  467. break;
  468. case USB_ID(0x17cc, 0x1011): /* Traktor Audio 6 */
  469. err = snd_nativeinstruments_create_mixer(mixer,
  470. snd_nativeinstruments_ta6_mixers,
  471. ARRAY_SIZE(snd_nativeinstruments_ta6_mixers));
  472. break;
  473. case USB_ID(0x17cc, 0x1021): /* Traktor Audio 10 */
  474. err = snd_nativeinstruments_create_mixer(mixer,
  475. snd_nativeinstruments_ta10_mixers,
  476. ARRAY_SIZE(snd_nativeinstruments_ta10_mixers));
  477. break;
  478. }
  479. return err;
  480. }
  481. void snd_usb_mixer_rc_memory_change(struct usb_mixer_interface *mixer,
  482. int unitid)
  483. {
  484. if (!mixer->rc_cfg)
  485. return;
  486. /* unit ids specific to Extigy/Audigy 2 NX: */
  487. switch (unitid) {
  488. case 0: /* remote control */
  489. mixer->rc_urb->dev = mixer->chip->dev;
  490. usb_submit_urb(mixer->rc_urb, GFP_ATOMIC);
  491. break;
  492. case 4: /* digital in jack */
  493. case 7: /* line in jacks */
  494. case 19: /* speaker out jacks */
  495. case 20: /* headphones out jack */
  496. break;
  497. /* live24ext: 4 = line-in jack */
  498. case 3: /* hp-out jack (may actuate Mute) */
  499. if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) ||
  500. mixer->chip->usb_id == USB_ID(0x041e, 0x3048))
  501. snd_usb_mixer_notify_id(mixer, mixer->rc_cfg->mute_mixer_id);
  502. break;
  503. default:
  504. snd_printd(KERN_DEBUG "memory change in unknown unit %d\n", unitid);
  505. break;
  506. }
  507. }