seq_oss_synth.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. /*
  2. * OSS compatible sequencer driver
  3. *
  4. * synth device handlers
  5. *
  6. * Copyright (C) 1998,99 Takashi Iwai <tiwai@suse.de>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. #include "seq_oss_synth.h"
  23. #include "seq_oss_midi.h"
  24. #include "../seq_lock.h"
  25. #include <linux/init.h>
  26. #include <linux/module.h>
  27. #include <linux/slab.h>
  28. #include <linux/nospec.h>
  29. /*
  30. * constants
  31. */
  32. #define SNDRV_SEQ_OSS_MAX_SYNTH_NAME 30
  33. #define MAX_SYSEX_BUFLEN 128
  34. /*
  35. * definition of synth info records
  36. */
  37. /* sysex buffer */
  38. struct seq_oss_synth_sysex {
  39. int len;
  40. int skip;
  41. unsigned char buf[MAX_SYSEX_BUFLEN];
  42. };
  43. /* synth info */
  44. struct seq_oss_synth {
  45. int seq_device;
  46. /* for synth_info */
  47. int synth_type;
  48. int synth_subtype;
  49. int nr_voices;
  50. char name[SNDRV_SEQ_OSS_MAX_SYNTH_NAME];
  51. struct snd_seq_oss_callback oper;
  52. int opened;
  53. void *private_data;
  54. snd_use_lock_t use_lock;
  55. };
  56. /*
  57. * device table
  58. */
  59. static int max_synth_devs;
  60. static struct seq_oss_synth *synth_devs[SNDRV_SEQ_OSS_MAX_SYNTH_DEVS];
  61. static struct seq_oss_synth midi_synth_dev = {
  62. -1, /* seq_device */
  63. SYNTH_TYPE_MIDI, /* synth_type */
  64. 0, /* synth_subtype */
  65. 16, /* nr_voices */
  66. "MIDI", /* name */
  67. };
  68. static DEFINE_SPINLOCK(register_lock);
  69. /*
  70. * prototypes
  71. */
  72. static struct seq_oss_synth *get_synthdev(struct seq_oss_devinfo *dp, int dev);
  73. static void reset_channels(struct seq_oss_synthinfo *info);
  74. /*
  75. * global initialization
  76. */
  77. void __init
  78. snd_seq_oss_synth_init(void)
  79. {
  80. snd_use_lock_init(&midi_synth_dev.use_lock);
  81. }
  82. /*
  83. * registration of the synth device
  84. */
  85. int
  86. snd_seq_oss_synth_probe(struct device *_dev)
  87. {
  88. struct snd_seq_device *dev = to_seq_dev(_dev);
  89. int i;
  90. struct seq_oss_synth *rec;
  91. struct snd_seq_oss_reg *reg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
  92. unsigned long flags;
  93. rec = kzalloc(sizeof(*rec), GFP_KERNEL);
  94. if (!rec)
  95. return -ENOMEM;
  96. rec->seq_device = -1;
  97. rec->synth_type = reg->type;
  98. rec->synth_subtype = reg->subtype;
  99. rec->nr_voices = reg->nvoices;
  100. rec->oper = reg->oper;
  101. rec->private_data = reg->private_data;
  102. rec->opened = 0;
  103. snd_use_lock_init(&rec->use_lock);
  104. /* copy and truncate the name of synth device */
  105. strlcpy(rec->name, dev->name, sizeof(rec->name));
  106. /* registration */
  107. spin_lock_irqsave(&register_lock, flags);
  108. for (i = 0; i < max_synth_devs; i++) {
  109. if (synth_devs[i] == NULL)
  110. break;
  111. }
  112. if (i >= max_synth_devs) {
  113. if (max_synth_devs >= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS) {
  114. spin_unlock_irqrestore(&register_lock, flags);
  115. pr_err("ALSA: seq_oss: no more synth slot\n");
  116. kfree(rec);
  117. return -ENOMEM;
  118. }
  119. max_synth_devs++;
  120. }
  121. rec->seq_device = i;
  122. synth_devs[i] = rec;
  123. spin_unlock_irqrestore(&register_lock, flags);
  124. dev->driver_data = rec;
  125. #ifdef SNDRV_OSS_INFO_DEV_SYNTH
  126. if (i < SNDRV_CARDS)
  127. snd_oss_info_register(SNDRV_OSS_INFO_DEV_SYNTH, i, rec->name);
  128. #endif
  129. return 0;
  130. }
  131. int
  132. snd_seq_oss_synth_remove(struct device *_dev)
  133. {
  134. struct snd_seq_device *dev = to_seq_dev(_dev);
  135. int index;
  136. struct seq_oss_synth *rec = dev->driver_data;
  137. unsigned long flags;
  138. spin_lock_irqsave(&register_lock, flags);
  139. for (index = 0; index < max_synth_devs; index++) {
  140. if (synth_devs[index] == rec)
  141. break;
  142. }
  143. if (index >= max_synth_devs) {
  144. spin_unlock_irqrestore(&register_lock, flags);
  145. pr_err("ALSA: seq_oss: can't unregister synth\n");
  146. return -EINVAL;
  147. }
  148. synth_devs[index] = NULL;
  149. if (index == max_synth_devs - 1) {
  150. for (index--; index >= 0; index--) {
  151. if (synth_devs[index])
  152. break;
  153. }
  154. max_synth_devs = index + 1;
  155. }
  156. spin_unlock_irqrestore(&register_lock, flags);
  157. #ifdef SNDRV_OSS_INFO_DEV_SYNTH
  158. if (rec->seq_device < SNDRV_CARDS)
  159. snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_SYNTH, rec->seq_device);
  160. #endif
  161. snd_use_lock_sync(&rec->use_lock);
  162. kfree(rec);
  163. return 0;
  164. }
  165. /*
  166. */
  167. static struct seq_oss_synth *
  168. get_sdev(int dev)
  169. {
  170. struct seq_oss_synth *rec;
  171. unsigned long flags;
  172. spin_lock_irqsave(&register_lock, flags);
  173. rec = synth_devs[dev];
  174. if (rec)
  175. snd_use_lock_use(&rec->use_lock);
  176. spin_unlock_irqrestore(&register_lock, flags);
  177. return rec;
  178. }
  179. /*
  180. * set up synth tables
  181. */
  182. void
  183. snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp)
  184. {
  185. int i;
  186. struct seq_oss_synth *rec;
  187. struct seq_oss_synthinfo *info;
  188. dp->max_synthdev = max_synth_devs;
  189. dp->synth_opened = 0;
  190. memset(dp->synths, 0, sizeof(dp->synths));
  191. for (i = 0; i < dp->max_synthdev; i++) {
  192. rec = get_sdev(i);
  193. if (rec == NULL)
  194. continue;
  195. if (rec->oper.open == NULL || rec->oper.close == NULL) {
  196. snd_use_lock_free(&rec->use_lock);
  197. continue;
  198. }
  199. info = &dp->synths[i];
  200. info->arg.app_index = dp->port;
  201. info->arg.file_mode = dp->file_mode;
  202. info->arg.seq_mode = dp->seq_mode;
  203. if (dp->seq_mode == SNDRV_SEQ_OSS_MODE_SYNTH)
  204. info->arg.event_passing = SNDRV_SEQ_OSS_PROCESS_EVENTS;
  205. else
  206. info->arg.event_passing = SNDRV_SEQ_OSS_PASS_EVENTS;
  207. info->opened = 0;
  208. if (!try_module_get(rec->oper.owner)) {
  209. snd_use_lock_free(&rec->use_lock);
  210. continue;
  211. }
  212. if (rec->oper.open(&info->arg, rec->private_data) < 0) {
  213. module_put(rec->oper.owner);
  214. snd_use_lock_free(&rec->use_lock);
  215. continue;
  216. }
  217. info->nr_voices = rec->nr_voices;
  218. if (info->nr_voices > 0) {
  219. info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL);
  220. if (!info->ch) {
  221. rec->oper.close(&info->arg);
  222. module_put(rec->oper.owner);
  223. snd_use_lock_free(&rec->use_lock);
  224. continue;
  225. }
  226. reset_channels(info);
  227. }
  228. info->opened++;
  229. rec->opened++;
  230. dp->synth_opened++;
  231. snd_use_lock_free(&rec->use_lock);
  232. }
  233. }
  234. /*
  235. * set up synth tables for MIDI emulation - /dev/music mode only
  236. */
  237. void
  238. snd_seq_oss_synth_setup_midi(struct seq_oss_devinfo *dp)
  239. {
  240. int i;
  241. if (dp->max_synthdev >= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS)
  242. return;
  243. for (i = 0; i < dp->max_mididev; i++) {
  244. struct seq_oss_synthinfo *info;
  245. info = &dp->synths[dp->max_synthdev];
  246. if (snd_seq_oss_midi_open(dp, i, dp->file_mode) < 0)
  247. continue;
  248. info->arg.app_index = dp->port;
  249. info->arg.file_mode = dp->file_mode;
  250. info->arg.seq_mode = dp->seq_mode;
  251. info->arg.private_data = info;
  252. info->is_midi = 1;
  253. info->midi_mapped = i;
  254. info->arg.event_passing = SNDRV_SEQ_OSS_PASS_EVENTS;
  255. snd_seq_oss_midi_get_addr(dp, i, &info->arg.addr);
  256. info->opened = 1;
  257. midi_synth_dev.opened++;
  258. dp->max_synthdev++;
  259. if (dp->max_synthdev >= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS)
  260. break;
  261. }
  262. }
  263. /*
  264. * clean up synth tables
  265. */
  266. void
  267. snd_seq_oss_synth_cleanup(struct seq_oss_devinfo *dp)
  268. {
  269. int i;
  270. struct seq_oss_synth *rec;
  271. struct seq_oss_synthinfo *info;
  272. if (snd_BUG_ON(dp->max_synthdev > SNDRV_SEQ_OSS_MAX_SYNTH_DEVS))
  273. return;
  274. for (i = 0; i < dp->max_synthdev; i++) {
  275. info = &dp->synths[i];
  276. if (! info->opened)
  277. continue;
  278. if (info->is_midi) {
  279. if (midi_synth_dev.opened > 0) {
  280. snd_seq_oss_midi_close(dp, info->midi_mapped);
  281. midi_synth_dev.opened--;
  282. }
  283. } else {
  284. rec = get_sdev(i);
  285. if (rec == NULL)
  286. continue;
  287. if (rec->opened > 0) {
  288. rec->oper.close(&info->arg);
  289. module_put(rec->oper.owner);
  290. rec->opened = 0;
  291. }
  292. snd_use_lock_free(&rec->use_lock);
  293. }
  294. kfree(info->sysex);
  295. info->sysex = NULL;
  296. kfree(info->ch);
  297. info->ch = NULL;
  298. }
  299. dp->synth_opened = 0;
  300. dp->max_synthdev = 0;
  301. }
  302. static struct seq_oss_synthinfo *
  303. get_synthinfo_nospec(struct seq_oss_devinfo *dp, int dev)
  304. {
  305. if (dev < 0 || dev >= dp->max_synthdev)
  306. return NULL;
  307. dev = array_index_nospec(dev, SNDRV_SEQ_OSS_MAX_SYNTH_DEVS);
  308. return &dp->synths[dev];
  309. }
  310. /*
  311. * return synth device information pointer
  312. */
  313. static struct seq_oss_synth *
  314. get_synthdev(struct seq_oss_devinfo *dp, int dev)
  315. {
  316. struct seq_oss_synth *rec;
  317. struct seq_oss_synthinfo *info = get_synthinfo_nospec(dp, dev);
  318. if (!info)
  319. return NULL;
  320. if (!info->opened)
  321. return NULL;
  322. if (info->is_midi) {
  323. rec = &midi_synth_dev;
  324. snd_use_lock_use(&rec->use_lock);
  325. } else {
  326. rec = get_sdev(dev);
  327. if (!rec)
  328. return NULL;
  329. }
  330. if (! rec->opened) {
  331. snd_use_lock_free(&rec->use_lock);
  332. return NULL;
  333. }
  334. return rec;
  335. }
  336. /*
  337. * reset note and velocity on each channel.
  338. */
  339. static void
  340. reset_channels(struct seq_oss_synthinfo *info)
  341. {
  342. int i;
  343. if (info->ch == NULL || ! info->nr_voices)
  344. return;
  345. for (i = 0; i < info->nr_voices; i++) {
  346. info->ch[i].note = -1;
  347. info->ch[i].vel = 0;
  348. }
  349. }
  350. /*
  351. * reset synth device:
  352. * call reset callback. if no callback is defined, send a heartbeat
  353. * event to the corresponding port.
  354. */
  355. void
  356. snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev)
  357. {
  358. struct seq_oss_synth *rec;
  359. struct seq_oss_synthinfo *info;
  360. info = get_synthinfo_nospec(dp, dev);
  361. if (!info || !info->opened)
  362. return;
  363. if (info->sysex)
  364. info->sysex->len = 0; /* reset sysex */
  365. reset_channels(info);
  366. if (info->is_midi) {
  367. if (midi_synth_dev.opened <= 0)
  368. return;
  369. snd_seq_oss_midi_reset(dp, info->midi_mapped);
  370. /* reopen the device */
  371. snd_seq_oss_midi_close(dp, dev);
  372. if (snd_seq_oss_midi_open(dp, info->midi_mapped,
  373. dp->file_mode) < 0) {
  374. midi_synth_dev.opened--;
  375. info->opened = 0;
  376. kfree(info->sysex);
  377. info->sysex = NULL;
  378. kfree(info->ch);
  379. info->ch = NULL;
  380. }
  381. return;
  382. }
  383. rec = get_sdev(dev);
  384. if (rec == NULL)
  385. return;
  386. if (rec->oper.reset) {
  387. rec->oper.reset(&info->arg);
  388. } else {
  389. struct snd_seq_event ev;
  390. memset(&ev, 0, sizeof(ev));
  391. snd_seq_oss_fill_addr(dp, &ev, info->arg.addr.client,
  392. info->arg.addr.port);
  393. ev.type = SNDRV_SEQ_EVENT_RESET;
  394. snd_seq_oss_dispatch(dp, &ev, 0, 0);
  395. }
  396. snd_use_lock_free(&rec->use_lock);
  397. }
  398. /*
  399. * load a patch record:
  400. * call load_patch callback function
  401. */
  402. int
  403. snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt,
  404. const char __user *buf, int p, int c)
  405. {
  406. struct seq_oss_synth *rec;
  407. struct seq_oss_synthinfo *info;
  408. int rc;
  409. info = get_synthinfo_nospec(dp, dev);
  410. if (!info)
  411. return -ENXIO;
  412. if (info->is_midi)
  413. return 0;
  414. if ((rec = get_synthdev(dp, dev)) == NULL)
  415. return -ENXIO;
  416. if (rec->oper.load_patch == NULL)
  417. rc = -ENXIO;
  418. else
  419. rc = rec->oper.load_patch(&info->arg, fmt, buf, p, c);
  420. snd_use_lock_free(&rec->use_lock);
  421. return rc;
  422. }
  423. /*
  424. * check if the device is valid synth device and return the synth info
  425. */
  426. struct seq_oss_synthinfo *
  427. snd_seq_oss_synth_info(struct seq_oss_devinfo *dp, int dev)
  428. {
  429. struct seq_oss_synth *rec;
  430. rec = get_synthdev(dp, dev);
  431. if (rec) {
  432. snd_use_lock_free(&rec->use_lock);
  433. return get_synthinfo_nospec(dp, dev);
  434. }
  435. return NULL;
  436. }
  437. /*
  438. * receive OSS 6 byte sysex packet:
  439. * the full sysex message will be sent if it reaches to the end of data
  440. * (0xff).
  441. */
  442. int
  443. snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf, struct snd_seq_event *ev)
  444. {
  445. int i, send;
  446. unsigned char *dest;
  447. struct seq_oss_synth_sysex *sysex;
  448. struct seq_oss_synthinfo *info;
  449. info = snd_seq_oss_synth_info(dp, dev);
  450. if (!info)
  451. return -ENXIO;
  452. sysex = info->sysex;
  453. if (sysex == NULL) {
  454. sysex = kzalloc(sizeof(*sysex), GFP_KERNEL);
  455. if (sysex == NULL)
  456. return -ENOMEM;
  457. info->sysex = sysex;
  458. }
  459. send = 0;
  460. dest = sysex->buf + sysex->len;
  461. /* copy 6 byte packet to the buffer */
  462. for (i = 0; i < 6; i++) {
  463. if (buf[i] == 0xff) {
  464. send = 1;
  465. break;
  466. }
  467. dest[i] = buf[i];
  468. sysex->len++;
  469. if (sysex->len >= MAX_SYSEX_BUFLEN) {
  470. sysex->len = 0;
  471. sysex->skip = 1;
  472. break;
  473. }
  474. }
  475. if (sysex->len && send) {
  476. if (sysex->skip) {
  477. sysex->skip = 0;
  478. sysex->len = 0;
  479. return -EINVAL; /* skip */
  480. }
  481. /* copy the data to event record and send it */
  482. ev->flags = SNDRV_SEQ_EVENT_LENGTH_VARIABLE;
  483. if (snd_seq_oss_synth_addr(dp, dev, ev))
  484. return -EINVAL;
  485. ev->data.ext.len = sysex->len;
  486. ev->data.ext.ptr = sysex->buf;
  487. sysex->len = 0;
  488. return 0;
  489. }
  490. return -EINVAL; /* skip */
  491. }
  492. /*
  493. * fill the event source/destination addresses
  494. */
  495. int
  496. snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev)
  497. {
  498. struct seq_oss_synthinfo *info = snd_seq_oss_synth_info(dp, dev);
  499. if (!info)
  500. return -EINVAL;
  501. snd_seq_oss_fill_addr(dp, ev, info->arg.addr.client,
  502. info->arg.addr.port);
  503. return 0;
  504. }
  505. /*
  506. * OSS compatible ioctl
  507. */
  508. int
  509. snd_seq_oss_synth_ioctl(struct seq_oss_devinfo *dp, int dev, unsigned int cmd, unsigned long addr)
  510. {
  511. struct seq_oss_synth *rec;
  512. struct seq_oss_synthinfo *info;
  513. int rc;
  514. info = get_synthinfo_nospec(dp, dev);
  515. if (!info || info->is_midi)
  516. return -ENXIO;
  517. if ((rec = get_synthdev(dp, dev)) == NULL)
  518. return -ENXIO;
  519. if (rec->oper.ioctl == NULL)
  520. rc = -ENXIO;
  521. else
  522. rc = rec->oper.ioctl(&info->arg, cmd, addr);
  523. snd_use_lock_free(&rec->use_lock);
  524. return rc;
  525. }
  526. /*
  527. * send OSS raw events - SEQ_PRIVATE and SEQ_VOLUME
  528. */
  529. int
  530. snd_seq_oss_synth_raw_event(struct seq_oss_devinfo *dp, int dev, unsigned char *data, struct snd_seq_event *ev)
  531. {
  532. struct seq_oss_synthinfo *info;
  533. info = snd_seq_oss_synth_info(dp, dev);
  534. if (!info || info->is_midi)
  535. return -ENXIO;
  536. ev->type = SNDRV_SEQ_EVENT_OSS;
  537. memcpy(ev->data.raw8.d, data, 8);
  538. return snd_seq_oss_synth_addr(dp, dev, ev);
  539. }
  540. /*
  541. * create OSS compatible synth_info record
  542. */
  543. int
  544. snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf)
  545. {
  546. struct seq_oss_synth *rec;
  547. struct seq_oss_synthinfo *info = get_synthinfo_nospec(dp, dev);
  548. if (!info)
  549. return -ENXIO;
  550. if (info->is_midi) {
  551. struct midi_info minf;
  552. snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf);
  553. inf->synth_type = SYNTH_TYPE_MIDI;
  554. inf->synth_subtype = 0;
  555. inf->nr_voices = 16;
  556. inf->device = dev;
  557. strlcpy(inf->name, minf.name, sizeof(inf->name));
  558. } else {
  559. if ((rec = get_synthdev(dp, dev)) == NULL)
  560. return -ENXIO;
  561. inf->synth_type = rec->synth_type;
  562. inf->synth_subtype = rec->synth_subtype;
  563. inf->nr_voices = rec->nr_voices;
  564. inf->device = dev;
  565. strlcpy(inf->name, rec->name, sizeof(inf->name));
  566. snd_use_lock_free(&rec->use_lock);
  567. }
  568. return 0;
  569. }
  570. #ifdef CONFIG_SND_PROC_FS
  571. /*
  572. * proc interface
  573. */
  574. void
  575. snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
  576. {
  577. int i;
  578. struct seq_oss_synth *rec;
  579. snd_iprintf(buf, "\nNumber of synth devices: %d\n", max_synth_devs);
  580. for (i = 0; i < max_synth_devs; i++) {
  581. snd_iprintf(buf, "\nsynth %d: ", i);
  582. rec = get_sdev(i);
  583. if (rec == NULL) {
  584. snd_iprintf(buf, "*empty*\n");
  585. continue;
  586. }
  587. snd_iprintf(buf, "[%s]\n", rec->name);
  588. snd_iprintf(buf, " type 0x%x : subtype 0x%x : voices %d\n",
  589. rec->synth_type, rec->synth_subtype,
  590. rec->nr_voices);
  591. snd_iprintf(buf, " capabilities : ioctl %s / load_patch %s\n",
  592. enabled_str((long)rec->oper.ioctl),
  593. enabled_str((long)rec->oper.load_patch));
  594. snd_use_lock_free(&rec->use_lock);
  595. }
  596. }
  597. #endif /* CONFIG_SND_PROC_FS */