spacepaste

  1.  
  2. #
  3. # ALSA library configuration file
  4. #
  5. # pre-load the configuration files
  6. @hooks [
  7. {
  8. func load
  9. files [
  10. {
  11. @func concat
  12. strings [
  13. { @func datadir }
  14. "/alsa.conf.d/"
  15. ]
  16. }
  17. "/etc/asound.conf"
  18. "~/.asoundrc"
  19. ]
  20. errors false
  21. }
  22. ]
  23. # load card-specific configuration files (on request)
  24. cards.@hooks [
  25. {
  26. func load
  27. files [
  28. {
  29. @func concat
  30. strings [
  31. { @func datadir }
  32. "/cards/aliases.conf"
  33. ]
  34. }
  35. ]
  36. }
  37. {
  38. func load_for_all_cards
  39. files [
  40. {
  41. @func concat
  42. strings [
  43. { @func datadir }
  44. "/cards/"
  45. { @func private_string }
  46. ".conf"
  47. ]
  48. }
  49. ]
  50. errors false
  51. }
  52. ]
  53. #
  54. # defaults
  55. #
  56. # show all name hints also for definitions without hint {} section
  57. defaults.namehint.showall off
  58. # show just basic name hints
  59. defaults.namehint.basic on
  60. # show extended name hints
  61. defaults.namehint.extended off
  62. #
  63. defaults.ctl.card 0
  64. defaults.pcm.card 0
  65. defaults.pcm.device 0
  66. defaults.pcm.subdevice -1
  67. defaults.pcm.nonblock 1
  68. defaults.pcm.compat 0
  69. defaults.pcm.minperiodtime 5000 # in us
  70. defaults.pcm.ipc_key 5678293
  71. defaults.pcm.ipc_gid audio
  72. defaults.pcm.ipc_perm 0660
  73. defaults.pcm.dmix.max_periods 0
  74. defaults.pcm.dmix.rate 48000
  75. defaults.pcm.dmix.format "unchanged"
  76. defaults.pcm.dmix.card defaults.pcm.card
  77. defaults.pcm.dmix.device defaults.pcm.device
  78. defaults.pcm.dsnoop.card defaults.pcm.card
  79. defaults.pcm.dsnoop.device defaults.pcm.device
  80. defaults.pcm.front.card defaults.pcm.card
  81. defaults.pcm.front.device defaults.pcm.device
  82. defaults.pcm.rear.card defaults.pcm.card
  83. defaults.pcm.rear.device defaults.pcm.device
  84. defaults.pcm.center_lfe.card defaults.pcm.card
  85. defaults.pcm.center_lfe.device defaults.pcm.device
  86. defaults.pcm.side.card defaults.pcm.card
  87. defaults.pcm.side.device defaults.pcm.device
  88. defaults.pcm.surround21.card defaults.pcm.card
  89. defaults.pcm.surround21.device defaults.pcm.device
  90. defaults.pcm.surround40.card defaults.pcm.card
  91. defaults.pcm.surround40.device defaults.pcm.device
  92. defaults.pcm.surround41.card defaults.pcm.card
  93. defaults.pcm.surround41.device defaults.pcm.device
  94. defaults.pcm.surround50.card defaults.pcm.card
  95. defaults.pcm.surround50.device defaults.pcm.device
  96. defaults.pcm.surround51.card defaults.pcm.card
  97. defaults.pcm.surround51.device defaults.pcm.device
  98. defaults.pcm.surround71.card defaults.pcm.card
  99. defaults.pcm.surround71.device defaults.pcm.device
  100. defaults.pcm.iec958.card defaults.pcm.card
  101. defaults.pcm.iec958.device defaults.pcm.device
  102. defaults.pcm.modem.card defaults.pcm.card
  103. defaults.pcm.modem.device defaults.pcm.device
  104. # truncate files via file or tee PCM
  105. defaults.pcm.file_format "raw"
  106. defaults.pcm.file_truncate true
  107. defaults.rawmidi.card 0
  108. defaults.rawmidi.device 0
  109. defaults.rawmidi.subdevice -1
  110. defaults.hwdep.card 0
  111. defaults.hwdep.device 0
  112. defaults.timer.class 2
  113. defaults.timer.sclass 0
  114. defaults.timer.card 0
  115. defaults.timer.device 0
  116. defaults.timer.subdevice 0
  117. #
  118. # PCM interface
  119. #
  120. # redirect to load-on-demand extended pcm definitions
  121. pcm.cards cards.pcm
  122. pcm.default cards.pcm.default
  123. pcm.sysdefault cards.pcm.default
  124. pcm.front cards.pcm.front
  125. pcm.rear cards.pcm.rear
  126. pcm.center_lfe cards.pcm.center_lfe
  127. pcm.side cards.pcm.side
  128. pcm.surround21 cards.pcm.surround21
  129. pcm.surround40 cards.pcm.surround40
  130. pcm.surround41 cards.pcm.surround41
  131. pcm.surround50 cards.pcm.surround50
  132. pcm.surround51 cards.pcm.surround51
  133. pcm.surround71 cards.pcm.surround71
  134. pcm.iec958 cards.pcm.iec958
  135. pcm.spdif iec958
  136. pcm.hdmi cards.pcm.hdmi
  137. pcm.dmix cards.pcm.dmix
  138. pcm.dsnoop cards.pcm.dsnoop
  139. pcm.modem cards.pcm.modem
  140. pcm.phoneline cards.pcm.phoneline
  141. pcm.hw {
  142. @args [ CARD DEV SUBDEV ]
  143. @args.CARD {
  144. type string
  145. default {
  146. @func getenv
  147. vars [
  148. ALSA_PCM_CARD
  149. ALSA_CARD
  150. ]
  151. default {
  152. @func refer
  153. name defaults.pcm.card
  154. }
  155. }
  156. }
  157. @args.DEV {
  158. type integer
  159. default {
  160. @func igetenv
  161. vars [
  162. ALSA_PCM_DEVICE
  163. ]
  164. default {
  165. @func refer
  166. name defaults.pcm.device
  167. }
  168. }
  169. }
  170. @args.SUBDEV {
  171. type integer
  172. default {
  173. @func refer
  174. name defaults.pcm.subdevice
  175. }
  176. }
  177. type hw
  178. card $CARD
  179. device $DEV
  180. subdevice $SUBDEV
  181. hint {
  182. show {
  183. @func refer
  184. name defaults.namehint.extended
  185. }
  186. description "Direct hardware device without any conversions"
  187. }
  188. }
  189. pcm.plughw {
  190. @args [ CARD DEV SUBDEV ]
  191. @args.CARD {
  192. type string
  193. default {
  194. @func getenv
  195. vars [
  196. ALSA_PCM_CARD
  197. ALSA_CARD
  198. ]
  199. default {
  200. @func refer
  201. name defaults.pcm.card
  202. }
  203. }
  204. }
  205. @args.DEV {
  206. type integer
  207. default {
  208. @func igetenv
  209. vars [
  210. ALSA_PCM_DEVICE
  211. ]
  212. default {
  213. @func refer
  214. name defaults.pcm.device
  215. }
  216. }
  217. }
  218. @args.SUBDEV {
  219. type integer
  220. default {
  221. @func refer
  222. name defaults.pcm.subdevice
  223. }
  224. }
  225. type plug
  226. slave.pcm {
  227. type hw
  228. card $CARD
  229. device $DEV
  230. subdevice $SUBDEV
  231. }
  232. hint {
  233. show {
  234. @func refer
  235. name defaults.namehint.extended
  236. }
  237. description "Hardware device with all software conversions"
  238. }
  239. }
  240. pcm.plug {
  241. @args [ SLAVE ]
  242. @args.SLAVE {
  243. type string
  244. }
  245. type plug
  246. slave.pcm $SLAVE
  247. }
  248. pcm.shm {
  249. @args [ SOCKET PCM ]
  250. @args.SOCKET {
  251. type string
  252. }
  253. @args.PCM {
  254. type string
  255. }
  256. type shm
  257. server $SOCKET
  258. pcm $PCM
  259. }
  260. pcm.tee {
  261. @args [ SLAVE FILE FORMAT ]
  262. @args.SLAVE {
  263. type string
  264. }
  265. @args.FILE {
  266. type string
  267. }
  268. @args.FORMAT {
  269. type string
  270. default {
  271. @func refer
  272. name defaults.pcm.file_format
  273. }
  274. }
  275. type file
  276. slave.pcm $SLAVE
  277. file $FILE
  278. format $FORMAT
  279. truncate {
  280. @func refer
  281. name defaults.pcm.file_truncate
  282. }
  283. }
  284. pcm.file {
  285. @args [ FILE FORMAT ]
  286. @args.FILE {
  287. type string
  288. }
  289. @args.FORMAT {
  290. type string
  291. default {
  292. @func refer
  293. name defaults.pcm.file_format
  294. }
  295. }
  296. type file
  297. slave.pcm null
  298. file $FILE
  299. format $FORMAT
  300. truncate {
  301. @func refer
  302. name defaults.pcm.file_truncate
  303. }
  304. }
  305. pcm.null {
  306. type null
  307. hint {
  308. show {
  309. @func refer
  310. name defaults.namehint.basic
  311. }
  312. description "Discard all samples (playback) or generate zero samples (capture)"
  313. }
  314. }
  315. #
  316. # Control interface
  317. #
  318. ctl.sysdefault {
  319. type hw
  320. card {
  321. @func getenv
  322. vars [
  323. ALSA_CTL_CARD
  324. ALSA_CARD
  325. ]
  326. default {
  327. @func refer
  328. name defaults.ctl.card
  329. }
  330. }
  331. hint.description "Default control device"
  332. }
  333. ctl.default ctl.sysdefault
  334. ctl.hw {
  335. @args [ CARD ]
  336. @args.CARD {
  337. type string
  338. default {
  339. @func getenv
  340. vars [
  341. ALSA_CTL_CARD
  342. ALSA_CARD
  343. ]
  344. default {
  345. @func refer
  346. name defaults.ctl.card
  347. }
  348. }
  349. }
  350. type hw
  351. card $CARD
  352. hint.description "Direct control device"
  353. }
  354. ctl.shm {
  355. @args [ SOCKET CTL ]
  356. @args.SOCKET {
  357. type string
  358. }
  359. @args.CTL {
  360. type string
  361. }
  362. type shm
  363. server $SOCKET
  364. ctl $CTL
  365. }
  366. #
  367. # RawMidi interface
  368. #
  369. rawmidi.default {
  370. type hw
  371. card {
  372. @func getenv
  373. vars [
  374. ALSA_RAWMIDI_CARD
  375. ALSA_CARD
  376. ]
  377. default {
  378. @func refer
  379. name defaults.rawmidi.card
  380. }
  381. }
  382. device {
  383. @func igetenv
  384. vars [
  385. ALSA_RAWMIDI_DEVICE
  386. ]
  387. default {
  388. @func refer
  389. name defaults.rawmidi.device
  390. }
  391. }
  392. hint.description "Default raw MIDI device"
  393. }
  394. rawmidi.hw {
  395. @args [ CARD DEV SUBDEV ]
  396. @args.CARD {
  397. type string
  398. default {
  399. @func getenv
  400. vars [
  401. ALSA_RAWMIDI_CARD
  402. ALSA_CARD
  403. ]
  404. default {
  405. @func refer
  406. name defaults.rawmidi.card
  407. }
  408. }
  409. }
  410. @args.DEV {
  411. type integer
  412. default {
  413. @func igetenv
  414. vars [
  415. ALSA_RAWMIDI_DEVICE
  416. ]
  417. default {
  418. @func refer
  419. name defaults.rawmidi.device
  420. }
  421. }
  422. }
  423. @args.SUBDEV {
  424. type integer
  425. default -1
  426. }
  427. type hw
  428. card $CARD
  429. device $DEV
  430. subdevice $SUBDEV
  431. hint {
  432. description "Direct rawmidi driver device"
  433. device $DEV
  434. }
  435. }
  436. rawmidi.virtual {
  437. @args [ MERGE ]
  438. @args.MERGE {
  439. type string
  440. default 1
  441. }
  442. type virtual
  443. merge $MERGE
  444. }
  445. #
  446. # Sequencer interface
  447. #
  448. seq.default {
  449. type hw
  450. hint.description "Default sequencer device"
  451. }
  452. seq.hw {
  453. type hw
  454. }
  455. #
  456. # HwDep interface
  457. #
  458. hwdep.default {
  459. type hw
  460. card {
  461. @func getenv
  462. vars [
  463. ALSA_HWDEP_CARD
  464. ALSA_CARD
  465. ]
  466. default {
  467. @func refer
  468. name defaults.hwdep.card
  469. }
  470. }
  471. device {
  472. @func igetenv
  473. vars [
  474. ALSA_HWDEP_DEVICE
  475. ]
  476. default {
  477. @func refer
  478. name defaults.hwdep.device
  479. }
  480. }
  481. hint.description "Default hardware dependent device"
  482. }
  483. hwdep.hw {
  484. @args [ CARD DEV ]
  485. @args.CARD {
  486. type string
  487. default {
  488. @func getenv
  489. vars [
  490. ALSA_HWDEP_CARD
  491. ALSA_CARD
  492. ]
  493. default {
  494. @func refer
  495. name defaults.hwdep.card
  496. }
  497. }
  498. }
  499. @args.DEV {
  500. type integer
  501. default {
  502. @func igetenv
  503. vars [
  504. ALSA_HWDEP_DEVICE
  505. ]
  506. default {
  507. @func refer
  508. name defaults.hwdep.device
  509. }
  510. }
  511. }
  512. type hw
  513. card $CARD
  514. device $DEV
  515. hint {
  516. description "Direct hardware dependent device"
  517. device $DEV
  518. }
  519. }
  520. #
  521. # Timer interface
  522. #
  523. timer_query.default {
  524. type hw
  525. }
  526. timer_query.hw {
  527. type hw
  528. }
  529. timer.default {
  530. type hw
  531. class {
  532. @func refer
  533. name defaults.timer.class
  534. }
  535. sclass {
  536. @func refer
  537. name defaults.timer.sclass
  538. }
  539. card {
  540. @func refer
  541. name defaults.timer.card
  542. }
  543. device {
  544. @func refer
  545. name defaults.timer.device
  546. }
  547. subdevice {
  548. @func refer
  549. name defaults.timer.subdevice
  550. }
  551. hint.description "Default timer device"
  552. }
  553. timer.hw {
  554. @args [ CLASS SCLASS CARD DEV SUBDEV ]
  555. @args.CLASS {
  556. type integer
  557. default {
  558. @func refer
  559. name defaults.timer.class
  560. }
  561. }
  562. @args.SCLASS {
  563. type integer
  564. default {
  565. @func refer
  566. name defaults.timer.sclass
  567. }
  568. }
  569. @args.CARD {
  570. type string
  571. default {
  572. @func refer
  573. name defaults.timer.card
  574. }
  575. }
  576. @args.DEV {
  577. type integer
  578. default {
  579. @func refer
  580. name defaults.timer.device
  581. }
  582. }
  583. @args.SUBDEV {
  584. type integer
  585. default {
  586. @func refer
  587. name defaults.timer.subdevice
  588. }
  589. }
  590. type hw
  591. class $CLASS
  592. sclass $SCLASS
  593. card $CARD
  594. device $DEV
  595. subdevice $SUBDEV
  596. hint {
  597. description "Direct timer device"
  598. device $DEV
  599. }
  600. }
  601.