mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Compare commits
	
		
			284 commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
							 | 
						eda76146c5 | ||
| 
							 | 
						eeca04741d | ||
| 
							 | 
						e5cb0b3346 | ||
| 
							 | 
						e6d0db9d0c | ||
| 
							 | 
						d62b1d5407 | ||
| 
							 | 
						3a97718124 | ||
| 
							 | 
						782b0597c2 | ||
| 
							 | 
						4ad4d9590a | ||
| 
							 | 
						5f524e3004 | ||
| 
							 | 
						ee5a58f48e | ||
| 
							 | 
						07ec2ad34c | ||
| 
							 | 
						8df60992b7 | ||
| 
							 | 
						368ea9af82 | ||
| 
							 | 
						8ab0228f51 | ||
| 
							 | 
						81d70a2713 | ||
| 
							 | 
						c748afe123 | ||
| 
							 | 
						8291d2c601 | ||
| 
							 | 
						e51cba0973 | ||
| 
							 | 
						6073f53051 | ||
| 
							 | 
						8b75db9676 | ||
| 
							 | 
						15f2b27612 | ||
| 
							 | 
						7e01443ecc | ||
| 
							 | 
						a4e47461ec | ||
| 
							 | 
						647c001321 | ||
| 
							 | 
						0d2acc2084 | ||
| 
							 | 
						90eb3c1e96 | ||
| 
							 | 
						95d0274b60 | ||
| 
							 | 
						e088d08c76 | ||
| 
							 | 
						d8300e5cb7 | ||
| 
							 | 
						70f4c95df5 | ||
| 
							 | 
						d5f19bcabc | ||
| 
							 | 
						42b8f1299f | ||
| 
							 | 
						fb285b366f | ||
| 
							 | 
						1b9a073e6a | ||
| 
							 | 
						6855cb838d | ||
| 
							 | 
						e9e3c01ff7 | ||
| 
							 | 
						8f6fef8b1a | ||
| 
							 | 
						12f6790910 | ||
| 
							 | 
						7fbd47ce79 | ||
| 
							 | 
						0c7086777a | ||
| 
							 | 
						df8f1cc1ec | ||
| 
							 | 
						e550dcdd90 | ||
| 
							 | 
						305168fd22 | ||
| 
							 | 
						0bb35d4980 | ||
| 
							 | 
						995e279081 | ||
| 
							 | 
						1101c397aa | ||
| 
							 | 
						c8bc54a9ca | ||
| 
							 | 
						a7de48692f | ||
| 
							 | 
						ea8972c83b | ||
| 
							 | 
						35d2efefa9 | ||
| 
							 | 
						cdd5a9fa10 | ||
| 
							 | 
						137eca7720 | ||
| 
							 | 
						e1cf4d3f68 | ||
| 
							 | 
						3fe7d9a49b | ||
| 
							 | 
						352cbc5eb9 | ||
| 
							 | 
						76d2d285c1 | ||
| 
							 | 
						07cee0ba05 | ||
| 
							 | 
						6880219ad4 | ||
| 
							 | 
						76edab4e59 | ||
| 
							 | 
						785fd327ad | ||
| 
							 | 
						49295a4e17 | ||
| 
							 | 
						4e7a510095 | ||
| 
							 | 
						a3865b2439 | ||
| 
							 | 
						073dc7577a | ||
| 
							 | 
						93d7645d84 | ||
| 
							 | 
						513ef7ace4 | ||
| 
							 | 
						9ac93d1252 | ||
| 
							 | 
						fc58f8fcc3 | ||
| 
							 | 
						2adc30e983 | ||
| 
							 | 
						3b9f3b9431 | ||
| 
							 | 
						645668dca2 | ||
| 
							 | 
						f81236cf7e | ||
| 
							 | 
						b154d9145f | ||
| 
							 | 
						9b6dfb3eb6 | ||
| 
							 | 
						f08f4aceec | ||
| 
							 | 
						3e38164ee5 | ||
| 
							 | 
						fa673b719c | ||
| 
							 | 
						769d1db1b0 | ||
| 
							 | 
						ddc4c668ba | ||
| 
							 | 
						d969439813 | ||
| 
							 | 
						f090a93ea8 | ||
| 
							 | 
						28948f2fcc | ||
| 
							 | 
						530e2f8131 | ||
| 
							 | 
						48101de6fa | ||
| 
							 | 
						24c7f42733 | ||
| 
							 | 
						568b2ac1db | ||
| 
							 | 
						ade099fab7 | ||
| 
							 | 
						30f8ba74c5 | ||
| 
							 | 
						8734673c21 | ||
| 
							 | 
						32e2c8d8a2 | ||
| 
							 | 
						2071eb8a44 | ||
| 
							 | 
						f8df023597 | ||
| 
							 | 
						18579adfbc | ||
| 
							 | 
						8da704ef4f | ||
| 
							 | 
						3390f31664 | ||
| 
							 | 
						6da898cf40 | ||
| 
							 | 
						ef38bff00e | ||
| 
							 | 
						cacc5bd5c1 | ||
| 
							 | 
						f784035a90 | ||
| 
							 | 
						6167b8ce3e | ||
| 
							 | 
						6767f623ca | ||
| 
							 | 
						34422861f5 | ||
| 
							 | 
						b359ed813e | ||
| 
							 | 
						5600b901b2 | ||
| 
							 | 
						291e727dfe | ||
| 
							 | 
						3864f7d95f | ||
| 
							 | 
						c6cd83bd0a | ||
| 
							 | 
						99499a6ebc | ||
| 
							 | 
						3fd24db22d | ||
| 
							 | 
						ef6463a209 | ||
| 
							 | 
						de529410da | ||
| 
							 | 
						dcc5d6a8bd | ||
| 
							 | 
						08bf1a7b0c | ||
| 
							 | 
						6f17ec50b3 | ||
| 
							 | 
						4489923d2c | ||
| 
							 | 
						13057b74c8 | ||
| 
							 | 
						431f69a8c3 | ||
| 
							 | 
						da744ef116 | ||
| 
							 | 
						19be3b23b3 | ||
| 
							 | 
						d8ce72f256 | ||
| 
							 | 
						2a736a0d25 | ||
| 
							 | 
						7e3a3c2b0a | ||
| 
							 | 
						ffed4f3426 | ||
| 
							 | 
						f48dd3a751 | ||
| 
							 | 
						8476874843 | ||
| 
							 | 
						a69ac97e4d | ||
| 
							 | 
						55a758a964 | ||
| 
							 | 
						f0658e6dbd | ||
| 
							 | 
						b44eff91c9 | ||
| 
							 | 
						5801f1b861 | ||
| 
							 | 
						14308adb0d | ||
| 
							 | 
						10ff172202 | ||
| 
							 | 
						c905573003 | ||
| 
							 | 
						dc7da761f3 | ||
| 
							 | 
						55c6338290 | ||
| 
							 | 
						31f2ab57e2 | ||
| 
							 | 
						c3fec78ddd | ||
| 
							 | 
						19e6349182 | ||
| 
							 | 
						d4992c36cc | ||
| 
							 | 
						60d6fad711 | ||
| 
							 | 
						3d4230aa8c | ||
| 
							 | 
						0e0a92bde2 | ||
| 
							 | 
						cd04da2bcf | ||
| 
							 | 
						454638ef30 | ||
| 
							 | 
						caab680d7e | ||
| 
							 | 
						d8000f57fc | ||
| 
							 | 
						f33284e85e | ||
| 
							 | 
						ed6b07084b | ||
| 
							 | 
						94a5ddff9d | ||
| 
							 | 
						2fca03e792 | ||
| 
							 | 
						f202ec3c23 | ||
| 
							 | 
						915a71a2cd | ||
| 
							 | 
						96f60d829f | ||
| 
							 | 
						81a7a93636 | ||
| 
							 | 
						0e3dfb9f70 | ||
| 
							 | 
						10bd599970 | ||
| 
							 | 
						fcce13a672 | ||
| 
							 | 
						9685505bf4 | ||
| 
							 | 
						f70653fda7 | ||
| 
							 | 
						c72bbed825 | ||
| 
							 | 
						8883943995 | ||
| 
							 | 
						00da3feace | ||
| 
							 | 
						9ed626d472 | ||
| 
							 | 
						70d4e042dc | ||
| 
							 | 
						2714f438cb | ||
| 
							 | 
						08e79fc5a3 | ||
| 
							 | 
						731253e82a | ||
| 
							 | 
						bbe38d055f | ||
| 
							 | 
						cde0e819f7 | ||
| 
							 | 
						220377a2dd | ||
| 
							 | 
						c4680ed458 | ||
| 
							 | 
						382c700dfe | ||
| 
							 | 
						47228e4e6e | ||
| 
							 | 
						9cb4414e3b | ||
| 
							 | 
						72e72ed029 | ||
| 
							 | 
						473a2eaba8 | ||
| 
							 | 
						23931800da | ||
| 
							 | 
						6a0a316bfb | ||
| 
							 | 
						f53fd880f0 | ||
| 
							 | 
						57959cef8f | ||
| 
							 | 
						e72c605179 | ||
| 
							 | 
						df0feab38f | ||
| 
							 | 
						9505cfdb46 | ||
| 
							 | 
						f39256a9b0 | ||
| 
							 | 
						ad3a8b8b31 | ||
| 
							 | 
						6142ff0ca7 | ||
| 
							 | 
						dc1e683cc2 | ||
| 
							 | 
						91bbe55894 | ||
| 
							 | 
						ec20272797 | ||
| 
							 | 
						403d687b95 | ||
| 
							 | 
						58da05803b | ||
| 
							 | 
						b7389e2e2e | ||
| 
							 | 
						77247f51c4 | ||
| 
							 | 
						80e20a1052 | ||
| 
							 | 
						517957a24b | ||
| 
							 | 
						2aefb5c41c | ||
| 
							 | 
						c40dc19a57 | ||
| 
							 | 
						e80ee6ae75 | ||
| 
							 | 
						040356ecf0 | ||
| 
							 | 
						81b0cf46d1 | ||
| 
							 | 
						8bc10c83b1 | ||
| 
							 | 
						f47763d2c1 | ||
| 
							 | 
						6627953de0 | ||
| 
							 | 
						a034b84705 | ||
| 
							 | 
						c86a4f5cf6 | ||
| 
							 | 
						cbdb428ab9 | ||
| 
							 | 
						325210acc8 | ||
| 
							 | 
						55cdf2fd63 | ||
| 
							 | 
						3661bdae35 | ||
| 
							 | 
						904f0f7e7a | ||
| 
							 | 
						58077e2f0d | ||
| 
							 | 
						798f387fe9 | ||
| 
							 | 
						3da32ca4db | ||
| 
							 | 
						507d906abb | ||
| 
							 | 
						d6d5982d3a | ||
| 
							 | 
						e2d9e41174 | ||
| 
							 | 
						1de6f99c7d | ||
| 
							 | 
						264d6c43ee | ||
| 
							 | 
						90e25887d2 | ||
| 
							 | 
						dd9cb31a90 | ||
| 
							 | 
						2115cdb4dc | ||
| 
							 | 
						b40fcda7fb | ||
| 
							 | 
						a8afb0449c | ||
| 
							 | 
						44705e3a20 | ||
| 
							 | 
						3b4cdbdf19 | ||
| 
							 | 
						fea9fc2298 | ||
| 
							 | 
						2f9bbefb8d | ||
| 
							 | 
						e11ea20645 | ||
| 
							 | 
						e824f70d62 | ||
| 
							 | 
						d72da154a3 | ||
| 
							 | 
						1fc1c1b7dc | ||
| 
							 | 
						496c4e031b | ||
| 
							 | 
						c083417b72 | ||
| 
							 | 
						436cd5b6d0 | ||
| 
							 | 
						d25ddafaa7 | ||
| 
							 | 
						2e82060ebc | ||
| 
							 | 
						9f2c68cef7 | ||
| 
							 | 
						13e31fb1ec | ||
| 
							 | 
						e29413a220 | ||
| 
							 | 
						d28e8cb294 | ||
| 
							 | 
						75f8e2e73e | ||
| 
							 | 
						ea0850f3f3 | ||
| 
							 | 
						536c93928b | ||
| 
							 | 
						f0f054517c | ||
| 
							 | 
						9649b64c6f | ||
| 
							 | 
						8b64f22459 | ||
| 
							 | 
						a0836e2af1 | ||
| 
							 | 
						3e4aeba25b | ||
| 
							 | 
						425e4d1fbe | ||
| 
							 | 
						78b20e3caa | ||
| 
							 | 
						152983f01b | ||
| 
							 | 
						161f47da5f | ||
| 
							 | 
						39060852d8 | ||
| 
							 | 
						aa4f56c3c9 | ||
| 
							 | 
						1b436862ed | ||
| 
							 | 
						9447e57d7c | ||
| 
							 | 
						7e678d70c2 | ||
| 
							 | 
						3bb9c44375 | ||
| 
							 | 
						4633d35171 | ||
| 
							 | 
						9253f08fb7 | ||
| 
							 | 
						dac9059524 | ||
| 
							 | 
						60c1430b43 | ||
| 
							 | 
						f89245ee66 | ||
| 
							 | 
						b33ef3f73d | ||
| 
							 | 
						e288ca7c29 | ||
| 
							 | 
						595115758b | ||
| 
							 | 
						0222f45d11 | ||
| 
							 | 
						8033ff9996 | ||
| 
							 | 
						d80616c0c1 | ||
| 
							 | 
						fc86eafa08 | ||
| 
							 | 
						378c6a9215 | ||
| 
							 | 
						27cfa707e3 | ||
| 
							 | 
						9230d000b3 | ||
| 
							 | 
						cfd3da47fa | ||
| 
							 | 
						351a237b2d | ||
| 
							 | 
						65c4796a85 | ||
| 
							 | 
						b97047b450 | ||
| 
							 | 
						917f412484 | ||
| 
							 | 
						f91c89da99 | ||
| 
							 | 
						92fff4e9d0 | ||
| 
							 | 
						ff0db96bbc | ||
| 
							 | 
						2d56ff8ded | ||
| 
							 | 
						89ee619147 | ||
| 
							 | 
						87ff5318e3 | 
					 212 changed files with 7555 additions and 6963 deletions
				
			
		
							
								
								
									
										8
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/build.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -11,9 +11,9 @@ jobs:
 | 
				
			||||||
    - name: Prepare environment
 | 
					    - name: Prepare environment
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        dnf -y upgrade
 | 
					        dnf -y upgrade
 | 
				
			||||||
        dnf -y install @development-tools libtool bzip2
 | 
					        dnf -y install @development-tools libtool bzip2 awk
 | 
				
			||||||
    - name: Checkout
 | 
					    - name: Checkout
 | 
				
			||||||
      uses: actions/checkout@v3
 | 
					      uses: actions/checkout@v4
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        fetch-depth: 0
 | 
					        fetch-depth: 0
 | 
				
			||||||
    - name: Safe git directory
 | 
					    - name: Safe git directory
 | 
				
			||||||
| 
						 | 
					@ -64,7 +64,7 @@ jobs:
 | 
				
			||||||
        cd alsa-lib-$(cat version)
 | 
					        cd alsa-lib-$(cat version)
 | 
				
			||||||
        make install
 | 
					        make install
 | 
				
			||||||
    - name: Archive package
 | 
					    - name: Archive package
 | 
				
			||||||
      uses: actions/upload-artifact@v1
 | 
					      uses: actions/upload-artifact@v4
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        name: alsa-lib-test-package
 | 
					        name: alsa-lib-test-package
 | 
				
			||||||
        path: artifacts/
 | 
					        path: artifacts/
 | 
				
			||||||
| 
						 | 
					@ -75,7 +75,7 @@ jobs:
 | 
				
			||||||
      image: ubuntu:latest
 | 
					      image: ubuntu:latest
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - name: Checkout
 | 
					    - name: Checkout
 | 
				
			||||||
      uses: actions/checkout@v3
 | 
					      uses: actions/checkout@v4
 | 
				
			||||||
    - name: Prepare environment
 | 
					    - name: Prepare environment
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        export DEBIAN_FRONTEND=noninteractive
 | 
					        export DEBIAN_FRONTEND=noninteractive
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -35,7 +35,6 @@ include/version.h
 | 
				
			||||||
include/alsa
 | 
					include/alsa
 | 
				
			||||||
include/asoundlib.h
 | 
					include/asoundlib.h
 | 
				
			||||||
utils/alsa-lib.spec
 | 
					utils/alsa-lib.spec
 | 
				
			||||||
alsalisp/alsalisp
 | 
					 | 
				
			||||||
aserver/aserver
 | 
					aserver/aserver
 | 
				
			||||||
m4/libtool.m4
 | 
					m4/libtool.m4
 | 
				
			||||||
m4/ltoptions.m4
 | 
					m4/ltoptions.m4
 | 
				
			||||||
| 
						 | 
					@ -43,6 +42,7 @@ m4/ltsugar.m4
 | 
				
			||||||
m4/ltversion.m4
 | 
					m4/ltversion.m4
 | 
				
			||||||
m4/lt~obsolete.m4
 | 
					m4/lt~obsolete.m4
 | 
				
			||||||
src/Versions
 | 
					src/Versions
 | 
				
			||||||
 | 
					src/Versions.in
 | 
				
			||||||
src/conf/topology/sklrt286/data/pvt_data
 | 
					src/conf/topology/sklrt286/data/pvt_data
 | 
				
			||||||
src/control/ctl_symbols_list.c
 | 
					src/control/ctl_symbols_list.c
 | 
				
			||||||
src/pcm/pcm_symbols_list.c
 | 
					src/pcm/pcm_symbols_list.c
 | 
				
			||||||
| 
						 | 
					@ -64,6 +64,8 @@ test/playmidi1
 | 
				
			||||||
test/queue_timer
 | 
					test/queue_timer
 | 
				
			||||||
test/rawmidi
 | 
					test/rawmidi
 | 
				
			||||||
test/seq
 | 
					test/seq
 | 
				
			||||||
 | 
					test/seq-ump-example
 | 
				
			||||||
test/timer
 | 
					test/timer
 | 
				
			||||||
 | 
					test/umpinfo
 | 
				
			||||||
test/lsb/config
 | 
					test/lsb/config
 | 
				
			||||||
test/lsb/midi_event
 | 
					test/lsb/midi_event
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,11 +10,6 @@ endif
 | 
				
			||||||
if BUILD_PCM_PLUGIN_SHM
 | 
					if BUILD_PCM_PLUGIN_SHM
 | 
				
			||||||
SUBDIRS += aserver
 | 
					SUBDIRS += aserver
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
if BUILD_MIXER
 | 
					 | 
				
			||||||
if BUILD_ALISP
 | 
					 | 
				
			||||||
SUBDIRS += alsalisp
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
SUBDIRS += test utils
 | 
					SUBDIRS += test utils
 | 
				
			||||||
EXTRA_DIST=README.md ChangeLog INSTALL TODO NOTES configure gitcompile libtool \
 | 
					EXTRA_DIST=README.md ChangeLog INSTALL TODO NOTES configure gitcompile libtool \
 | 
				
			||||||
	   depcomp version MEMORY-LEAK m4/attributes.m4
 | 
						   depcomp version MEMORY-LEAK m4/attributes.m4
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +0,0 @@
 | 
				
			||||||
noinst_PROGRAMS = alsalisp
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
alsalisp_SOURCES = alsalisp.c
 | 
					 | 
				
			||||||
alsalisp_LDADD = ../src/libasound.la
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
all: alsalisp
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/src/alisp
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,110 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *  ALSA lisp implementation
 | 
					 | 
				
			||||||
 *  Copyright (c) 2003 by Jaroslav Kysela <perex@perex.cz>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This library is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *   it under the terms of the GNU Lesser General Public License as
 | 
					 | 
				
			||||||
 *   published by the Free Software Foundation; either version 2.1 of
 | 
					 | 
				
			||||||
 *   the License, or (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *   GNU Lesser General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   You should have received a copy of the GNU Lesser General Public
 | 
					 | 
				
			||||||
 *   License along with this library; if not, write to the Free Software
 | 
					 | 
				
			||||||
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <stdio.h>
 | 
					 | 
				
			||||||
#include <stdlib.h>
 | 
					 | 
				
			||||||
#include <string.h>
 | 
					 | 
				
			||||||
#include <unistd.h>
 | 
					 | 
				
			||||||
#include <err.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "asoundlib.h"
 | 
					 | 
				
			||||||
#include "alisp.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int verbose = 0;
 | 
					 | 
				
			||||||
static int warning = 0;
 | 
					 | 
				
			||||||
static int debug = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void interpret_filename(const char *file)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_cfg cfg;
 | 
					 | 
				
			||||||
	snd_input_t *in;
 | 
					 | 
				
			||||||
	snd_output_t *out;
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	memset(&cfg, 0, sizeof(cfg));
 | 
					 | 
				
			||||||
	if (file != NULL && strcmp(file, "-") != 0) {
 | 
					 | 
				
			||||||
		if ((err = snd_input_stdio_open(&in, file, "r")) < 0) {
 | 
					 | 
				
			||||||
			fprintf(stderr, "unable to open filename '%s' (%s)\n", file, snd_strerror(err));
 | 
					 | 
				
			||||||
			return;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		if ((err = snd_input_stdio_attach(&in, stdin, 0)) < 0) {
 | 
					 | 
				
			||||||
			fprintf(stderr, "unable to attach stdin '%s' (%s)\n", file, snd_strerror(err));
 | 
					 | 
				
			||||||
			return;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (snd_output_stdio_attach(&out, stdout, 0) < 0) {
 | 
					 | 
				
			||||||
		snd_input_close(in);
 | 
					 | 
				
			||||||
		fprintf(stderr, "unable to attach stdout (%s)\n", strerror(errno));
 | 
					 | 
				
			||||||
		return;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	cfg.verbose = verbose;
 | 
					 | 
				
			||||||
	cfg.warning = warning;
 | 
					 | 
				
			||||||
	cfg.debug = debug;
 | 
					 | 
				
			||||||
	cfg.in = in;
 | 
					 | 
				
			||||||
	cfg.out = cfg.eout = cfg.vout = cfg.wout = cfg.dout = out;
 | 
					 | 
				
			||||||
	err = alsa_lisp(&cfg, NULL);
 | 
					 | 
				
			||||||
	if (err < 0)
 | 
					 | 
				
			||||||
		fprintf(stderr, "alsa lisp returned error %i (%s)\n", err, strerror(err));
 | 
					 | 
				
			||||||
	else if (verbose)
 | 
					 | 
				
			||||||
		printf("file %s passed ok via alsa lisp interpreter\n", file);
 | 
					 | 
				
			||||||
	snd_output_close(out);
 | 
					 | 
				
			||||||
	snd_input_close(in);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static void usage(void)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	fprintf(stderr, "usage: alsalisp [-vdw] [file...]\n");
 | 
					 | 
				
			||||||
	exit(1);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int main(int argc, char **argv)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	int c;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	while ((c = getopt(argc, argv, "vdw")) != -1) {
 | 
					 | 
				
			||||||
		switch (c) {
 | 
					 | 
				
			||||||
		case 'v':
 | 
					 | 
				
			||||||
			verbose = 1;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case 'd':
 | 
					 | 
				
			||||||
			debug = 1;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case 'w':
 | 
					 | 
				
			||||||
			warning = 1;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case '?':
 | 
					 | 
				
			||||||
		default:
 | 
					 | 
				
			||||||
			usage();
 | 
					 | 
				
			||||||
			/* NOTREACHED */
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	argc -= optind;
 | 
					 | 
				
			||||||
	argv += optind;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (argc < 1)
 | 
					 | 
				
			||||||
		interpret_filename(NULL);
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		while (*argv)
 | 
					 | 
				
			||||||
			interpret_filename(*argv++);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,91 +0,0 @@
 | 
				
			||||||
(setq card (Acall 'card_next -1))
 | 
					 | 
				
			||||||
(setq card (Aresult card))
 | 
					 | 
				
			||||||
(while (>= card 0)
 | 
					 | 
				
			||||||
  (progn
 | 
					 | 
				
			||||||
    (princ "found card: " card "\n")
 | 
					 | 
				
			||||||
    (princ "  name    : " (Aresult (Acall 'card_get_name card)) "\n")
 | 
					 | 
				
			||||||
    (princ "  longname: " (Aresult (Acall 'card_get_longname card)) "\n")
 | 
					 | 
				
			||||||
    (setq card (Acall 'card_next card))
 | 
					 | 
				
			||||||
    (setq card (Aresult card))
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
(unsetq card)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(princ "card_get_index test (SI7018): " (Acall 'card_get_index "SI7018") "\n")
 | 
					 | 
				
			||||||
(princ "card_get_index test (ABCD): " (Acall 'card_get_index "ABCD") "\n")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(setq hctl (Acall 'hctl_open 'default nil))
 | 
					 | 
				
			||||||
(if (= (Aerror hctl) 0)
 | 
					 | 
				
			||||||
  (progn
 | 
					 | 
				
			||||||
    (princ "open success: " hctl "\n")
 | 
					 | 
				
			||||||
    (setq hctl (Ahandle hctl))
 | 
					 | 
				
			||||||
    (princ "open hctl: " hctl "\n")
 | 
					 | 
				
			||||||
    (setq hctl (Acall 'hctl_close hctl))
 | 
					 | 
				
			||||||
    (if (= hctl 0)
 | 
					 | 
				
			||||||
      (princ "close success\n")
 | 
					 | 
				
			||||||
      (princ "close failed: " hctl "\n")
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
  (progn
 | 
					 | 
				
			||||||
    (princ "open failed: " hctl "\n")
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
(unsetq hctl)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(setq ctl (Acall 'ctl_open 'default nil))
 | 
					 | 
				
			||||||
(if (= (Aerror ctl) 0)
 | 
					 | 
				
			||||||
  (progn
 | 
					 | 
				
			||||||
    (princ "ctl open success: " ctl "\n")
 | 
					 | 
				
			||||||
    (setq ctl (Ahandle ctl))
 | 
					 | 
				
			||||||
    (setq info (Aresult (Acall 'ctl_card_info ctl)))
 | 
					 | 
				
			||||||
    (princ "ctl card info: " info "\n")
 | 
					 | 
				
			||||||
    (princ "ctl card info (mixername): " (cdr (assq "mixername" info)) "\n")
 | 
					 | 
				
			||||||
    (unsetq info)
 | 
					 | 
				
			||||||
    (setq hctl (Acall 'hctl_open_ctl ctl))
 | 
					 | 
				
			||||||
    (if (= (Aerror hctl) 0)
 | 
					 | 
				
			||||||
      (progn
 | 
					 | 
				
			||||||
        (princ "hctl open success: " hctl "\n")
 | 
					 | 
				
			||||||
        (setq hctl (Ahandle hctl))
 | 
					 | 
				
			||||||
        (princ "open hctl: " hctl "\n")
 | 
					 | 
				
			||||||
	(princ "load hctl: " (Acall 'hctl_load hctl) "\n")
 | 
					 | 
				
			||||||
	(princ "first    : " (Acall 'hctl_first_elem hctl) "\n")
 | 
					 | 
				
			||||||
	(princ "last     : " (Acall 'hctl_last_elem hctl) "\n")
 | 
					 | 
				
			||||||
	(princ "next (first): " (Acall 'hctl_elem_next (Acall 'hctl_first_elem hctl)) "\n")
 | 
					 | 
				
			||||||
	(princ "prev (last) : " (Acall 'hctl_elem_prev (Acall 'hctl_last_elem hctl)) "\n")
 | 
					 | 
				
			||||||
	(setq elem (Acall 'hctl_first_elem hctl))
 | 
					 | 
				
			||||||
	(while elem
 | 
					 | 
				
			||||||
	  (progn
 | 
					 | 
				
			||||||
	    (setq info (Acall 'hctl_elem_info elem))
 | 
					 | 
				
			||||||
	    (princ info "\n")
 | 
					 | 
				
			||||||
	    (setq value (Acall 'hctl_elem_read elem))
 | 
					 | 
				
			||||||
	    (princ value "\n")
 | 
					 | 
				
			||||||
	    (when (equal (cdr (assq "name" (car (cdr (assq "id" (Aresult info)))))) "Master Playback Volume")
 | 
					 | 
				
			||||||
	      (princ "write Master: " (Acall 'hctl_elem_write elem (20 20)) "\n")
 | 
					 | 
				
			||||||
	    )
 | 
					 | 
				
			||||||
	    (unsetq info value)
 | 
					 | 
				
			||||||
	    (gc)
 | 
					 | 
				
			||||||
	    (setq elem (Acall 'hctl_elem_next elem))
 | 
					 | 
				
			||||||
	  )
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
	(unsetq elem)
 | 
					 | 
				
			||||||
        (setq hctl (Acall 'hctl_close hctl))
 | 
					 | 
				
			||||||
        (if (= hctl 0)
 | 
					 | 
				
			||||||
          (princ "hctl close success\n")
 | 
					 | 
				
			||||||
          (princ "hctl close failed: " hctl "\n")
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
      )
 | 
					 | 
				
			||||||
      (progn
 | 
					 | 
				
			||||||
        (princ "hctl open failed: " hctl "\n")
 | 
					 | 
				
			||||||
	(Acall 'ctl_close ctl)
 | 
					 | 
				
			||||||
      )
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
    (unsetq hctl)
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
  (progn
 | 
					 | 
				
			||||||
    (princ "ctl open failed: " ctl "\n")
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
(unsetq ctl)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(&stat-memory)
 | 
					 | 
				
			||||||
(&dump-memory "memory.dump")
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,26 +0,0 @@
 | 
				
			||||||
(princ "Hello ALSA world\n")
 | 
					 | 
				
			||||||
(princ "One " 1 "\n")
 | 
					 | 
				
			||||||
(princ "Two " (+ 1 1) "\n")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun myprinc (o) (progn (princ o)))
 | 
					 | 
				
			||||||
(myprinc "Printed via myprinc function!\n")
 | 
					 | 
				
			||||||
(unsetq myprinc)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun printnum (from to) (while (<= from to) (princ " " from) (setq from (+ from 1))))
 | 
					 | 
				
			||||||
(princ "Numbers 1-10: ") (printnum 1 10) (princ "\n")
 | 
					 | 
				
			||||||
(unsetq printnum)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun factorial (n) (if (> n 1) (* n (factorial (- n 1))) 1))
 | 
					 | 
				
			||||||
(princ "Factorial of 10: " (factorial 10) "\n")
 | 
					 | 
				
			||||||
(princ "Float test 1.1 + 1.35 = " (+ 1.1 1.35) "\n")
 | 
					 | 
				
			||||||
(princ "Factorial of 10.0: " (factorial 10.0) "\n")
 | 
					 | 
				
			||||||
(princ "Factorial of 20.0: " (factorial 20.0) "\n")
 | 
					 | 
				
			||||||
(unsetq factorial)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(setq alist '((one . first) (two . second) (three . third)))
 | 
					 | 
				
			||||||
(princ "alist = " alist "\n")
 | 
					 | 
				
			||||||
(princ "alist assoc one = " (assoc 'one alist) "\n")
 | 
					 | 
				
			||||||
(princ "alist rassoc third = " (rassoc 'third alist) "\n")
 | 
					 | 
				
			||||||
(unsetq alist)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(&stat-memory)
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1 +0,0 @@
 | 
				
			||||||
(princ "itest.lisp file included!\n")
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,382 +0,0 @@
 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; Test code for all basic alsa lisp commands.
 | 
					 | 
				
			||||||
; The test is indended to find memory leaks.
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; Copyright (c) 2003 Jaroslav Kysela <perex@perex.cz>
 | 
					 | 
				
			||||||
; License: GPL v2 (http://www.gnu.org/licenses/gpl.html)
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; Basic commands
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(!=)				(&check-memory)
 | 
					 | 
				
			||||||
(!= 0)				(&check-memory)
 | 
					 | 
				
			||||||
(!= 0 1)			(&check-memory)
 | 
					 | 
				
			||||||
(!= 1 1)			(&check-memory)
 | 
					 | 
				
			||||||
(!= 0 1 2)			(&check-memory)
 | 
					 | 
				
			||||||
(!= 'aaaa 'bbbb)		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(%)				(&check-memory)
 | 
					 | 
				
			||||||
(% 11)				(&check-memory)
 | 
					 | 
				
			||||||
(% 11 5)			(&check-memory)
 | 
					 | 
				
			||||||
(% 11.5 5.1)			(&check-memory)
 | 
					 | 
				
			||||||
(% 11.5 5.1 2.2)		(&check-memory)
 | 
					 | 
				
			||||||
(% 'aaaa 'bbbb)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(&check-memory)			(&check-memory)
 | 
					 | 
				
			||||||
(&check-memory "abcd")		(&check-memory)
 | 
					 | 
				
			||||||
(&dump-memory "-")		(&check-memory)
 | 
					 | 
				
			||||||
(&dump-memory)			(&check-memory)
 | 
					 | 
				
			||||||
(&dump-objects "-")		(&check-memory)
 | 
					 | 
				
			||||||
(&dump-objects)			(&check-memory)
 | 
					 | 
				
			||||||
(&stat-memory)			(&check-memory)
 | 
					 | 
				
			||||||
(&stat-memory "abcd")		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(*)				(&check-memory)
 | 
					 | 
				
			||||||
(* 1)				(&check-memory)
 | 
					 | 
				
			||||||
(* 1 2)				(&check-memory)
 | 
					 | 
				
			||||||
(* 1.1 2.2)			(&check-memory)
 | 
					 | 
				
			||||||
(* 1.1 2.2 3.3)			(&check-memory)
 | 
					 | 
				
			||||||
(* 'aaaa)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(+)				(&check-memory)
 | 
					 | 
				
			||||||
(+ 1)				(&check-memory)
 | 
					 | 
				
			||||||
(+ 1 2)				(&check-memory)
 | 
					 | 
				
			||||||
(+ 1.1 2.2)			(&check-memory)
 | 
					 | 
				
			||||||
(+ 1.1 2.2 3.3)			(&check-memory)
 | 
					 | 
				
			||||||
(+ 'aaaa)			(&check-memory)
 | 
					 | 
				
			||||||
(+ 'aaaa 'bbbb)			(&check-memory)
 | 
					 | 
				
			||||||
(+ "aaaa")			(&check-memory)
 | 
					 | 
				
			||||||
(+ "aaaa" "bbbb")		(&check-memory)
 | 
					 | 
				
			||||||
(+ "aaaa" "bbbb" "cccc")	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(-)				(&check-memory)
 | 
					 | 
				
			||||||
(- 1)				(&check-memory)
 | 
					 | 
				
			||||||
(- 1 2)				(&check-memory)
 | 
					 | 
				
			||||||
(- 1.1 2.2)			(&check-memory)
 | 
					 | 
				
			||||||
(- 1.1 2.2 3.3)			(&check-memory)
 | 
					 | 
				
			||||||
(- 'aaaa)			(&check-memory)
 | 
					 | 
				
			||||||
(- 'aaaa 'bbbb)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(/)				(&check-memory)
 | 
					 | 
				
			||||||
(/ 1)				(&check-memory)
 | 
					 | 
				
			||||||
(/ 1 2)				(&check-memory)
 | 
					 | 
				
			||||||
(/ 1.1 2.2)			(&check-memory)
 | 
					 | 
				
			||||||
(/ 1.1 2.2 3.3)			(&check-memory)
 | 
					 | 
				
			||||||
(/ 'aaaa)			(&check-memory)
 | 
					 | 
				
			||||||
(/ 'aaaa 'bbbb)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(<)				(&check-memory)
 | 
					 | 
				
			||||||
(< 0)				(&check-memory)
 | 
					 | 
				
			||||||
(< 0 1)				(&check-memory)
 | 
					 | 
				
			||||||
(< 1 0)				(&check-memory)
 | 
					 | 
				
			||||||
(< 0 1 2)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(<=)				(&check-memory)
 | 
					 | 
				
			||||||
(<= 0)				(&check-memory)
 | 
					 | 
				
			||||||
(<= 0 1)			(&check-memory)
 | 
					 | 
				
			||||||
(<= 1 0)			(&check-memory)
 | 
					 | 
				
			||||||
(<= 0 1 2)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(=)				(&check-memory)
 | 
					 | 
				
			||||||
(= 0)				(&check-memory)
 | 
					 | 
				
			||||||
(= 0 1)				(&check-memory)
 | 
					 | 
				
			||||||
(= 1 1)				(&check-memory)
 | 
					 | 
				
			||||||
(= 0 1 2)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(>)				(&check-memory)
 | 
					 | 
				
			||||||
(> 0)				(&check-memory)
 | 
					 | 
				
			||||||
(> 0 1)				(&check-memory)
 | 
					 | 
				
			||||||
(> 1 0)				(&check-memory)
 | 
					 | 
				
			||||||
(> 0 1 2)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(>= 0)				(&check-memory)
 | 
					 | 
				
			||||||
(>= 0 1)			(&check-memory)
 | 
					 | 
				
			||||||
(>= 1 0)			(&check-memory)
 | 
					 | 
				
			||||||
(>= 0 1 2)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(and)				(&check-memory)
 | 
					 | 
				
			||||||
(and 0)				(&check-memory)
 | 
					 | 
				
			||||||
(and 1)				(&check-memory)
 | 
					 | 
				
			||||||
(and 0 0 0)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(quote a)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(assoc)							(&check-memory)
 | 
					 | 
				
			||||||
(assoc 'one)						(&check-memory)
 | 
					 | 
				
			||||||
(assoc 'one '((one . first)))				(&check-memory)
 | 
					 | 
				
			||||||
(assoc 'one '((two . second)))				(&check-memory)
 | 
					 | 
				
			||||||
(assoc 'one '((one . first) (two . second)))		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(assq)							(&check-memory)
 | 
					 | 
				
			||||||
(assq 'one)						(&check-memory)
 | 
					 | 
				
			||||||
(assq "one" '(("one" . "first")))			(&check-memory)
 | 
					 | 
				
			||||||
(assq "one" '(("two" . "second")))			(&check-memory)
 | 
					 | 
				
			||||||
(assq "one" '(("one" . "first") ("two" . "second")))	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(atom)				(&check-memory)
 | 
					 | 
				
			||||||
(atom 'one)			(&check-memory)
 | 
					 | 
				
			||||||
(atom "one")			(&check-memory)
 | 
					 | 
				
			||||||
(atom "one" 'two)		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(funcall)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(car)				(&check-memory)
 | 
					 | 
				
			||||||
(car '(one . two))		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(cdr)				(&check-memory)
 | 
					 | 
				
			||||||
(cdr '(one . two))		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(concat)			(&check-memory)
 | 
					 | 
				
			||||||
(concat 'aaaa)			(&check-memory)
 | 
					 | 
				
			||||||
(concat 'aaaa 'bbbb)		(&check-memory)
 | 
					 | 
				
			||||||
(concat "aaaa")			(&check-memory)
 | 
					 | 
				
			||||||
(concat "aaaa" "bbbb")		(&check-memory)
 | 
					 | 
				
			||||||
(concat "aaaa" "bbbb" "cccc")	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(cond)				(&check-memory)
 | 
					 | 
				
			||||||
(cond 0)			(&check-memory)
 | 
					 | 
				
			||||||
(cond 0 1)			(&check-memory)
 | 
					 | 
				
			||||||
(cond 0 1 2)			(&check-memory)
 | 
					 | 
				
			||||||
(cond 0 1 2 3)			(&check-memory)
 | 
					 | 
				
			||||||
(cond (0 'a) (1 'b) (0 'd))	(&check-memory)
 | 
					 | 
				
			||||||
(cond 1)			(&check-memory)
 | 
					 | 
				
			||||||
(cond 1 1)			(&check-memory)
 | 
					 | 
				
			||||||
(cond 1 1 2)			(&check-memory)
 | 
					 | 
				
			||||||
(cond 1 1 2 3)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(cons)				(&check-memory)
 | 
					 | 
				
			||||||
(cons "a")			(&check-memory)
 | 
					 | 
				
			||||||
(cons "a" "b")			(&check-memory)
 | 
					 | 
				
			||||||
(cons "a" "b" "c")		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(eq)				(&check-memory)
 | 
					 | 
				
			||||||
(eq 1)				(&check-memory)
 | 
					 | 
				
			||||||
(eq 0 0)			(&check-memory)
 | 
					 | 
				
			||||||
(eq "a" "b")			(&check-memory)
 | 
					 | 
				
			||||||
(eq "a" "b" "c")		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(equal)				(&check-memory)
 | 
					 | 
				
			||||||
(equal 1)			(&check-memory)
 | 
					 | 
				
			||||||
(equal 0 0)			(&check-memory)
 | 
					 | 
				
			||||||
(equal "a" "b")			(&check-memory)
 | 
					 | 
				
			||||||
(equal "a" "b" "c")		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(exfun)				(&check-memory)
 | 
					 | 
				
			||||||
(exfun 'abcd)			(&check-memory)
 | 
					 | 
				
			||||||
(exfun 'abcd 'ijkl)		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(format)			(&check-memory)
 | 
					 | 
				
			||||||
(format 1)			(&check-memory)
 | 
					 | 
				
			||||||
(format 'a)			(&check-memory)
 | 
					 | 
				
			||||||
(format "a" "b" "c")		(&check-memory)
 | 
					 | 
				
			||||||
(format "1.2")			(&check-memory)
 | 
					 | 
				
			||||||
(format "%c" 43)		(&check-memory)
 | 
					 | 
				
			||||||
(format "%d" 12)		(&check-memory)
 | 
					 | 
				
			||||||
(format "%i" 12)		(&check-memory)
 | 
					 | 
				
			||||||
(format "%f" 12.1)		(&check-memory)
 | 
					 | 
				
			||||||
(format "%s" "abcd")		(&check-memory)
 | 
					 | 
				
			||||||
(format "%s %i %i" "abcd" 1 2)	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(garbage-collect)		(&check-memory)
 | 
					 | 
				
			||||||
(gc)				(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(if)				(&check-memory)
 | 
					 | 
				
			||||||
(if t)				(&check-memory)
 | 
					 | 
				
			||||||
(if t 'a)			(&check-memory)
 | 
					 | 
				
			||||||
(if t 'a 'b)			(&check-memory)
 | 
					 | 
				
			||||||
(if nil)			(&check-memory)
 | 
					 | 
				
			||||||
(if nil 'a)			(&check-memory)
 | 
					 | 
				
			||||||
(if nil 'a 'b)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(include "itest.lisp")		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(list)				(&check-memory)
 | 
					 | 
				
			||||||
(list "a")			(&check-memory)
 | 
					 | 
				
			||||||
(list "a" "b")			(&check-memory)
 | 
					 | 
				
			||||||
(list "a" "b" "c")		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(not)				(&check-memory)
 | 
					 | 
				
			||||||
(not 0)				(&check-memory)
 | 
					 | 
				
			||||||
(not nil)			(&check-memory)
 | 
					 | 
				
			||||||
(not t)				(&check-memory)
 | 
					 | 
				
			||||||
(not 'a)			(&check-memory)
 | 
					 | 
				
			||||||
(not 'a 'b 'c 'd)		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(nth)				(&check-memory)
 | 
					 | 
				
			||||||
(nth 2)				(&check-memory)
 | 
					 | 
				
			||||||
(nth 2 nil)			(&check-memory)
 | 
					 | 
				
			||||||
(nth 2 '(('one 'two 'three)))	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(null)				(&check-memory)
 | 
					 | 
				
			||||||
(null 0)			(&check-memory)
 | 
					 | 
				
			||||||
(null nil)			(&check-memory)
 | 
					 | 
				
			||||||
(null t)			(&check-memory)
 | 
					 | 
				
			||||||
(null 'a)			(&check-memory)
 | 
					 | 
				
			||||||
(null 'a 'b 'c 'd)		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(or)				(&check-memory)
 | 
					 | 
				
			||||||
(or 0)				(&check-memory)
 | 
					 | 
				
			||||||
(or 1)				(&check-memory)
 | 
					 | 
				
			||||||
(or 0 0 0)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(path)				(&check-memory)
 | 
					 | 
				
			||||||
(path 0)			(&check-memory)
 | 
					 | 
				
			||||||
(path 1)			(&check-memory)
 | 
					 | 
				
			||||||
(path 0 0 0)			(&check-memory)
 | 
					 | 
				
			||||||
(path "data")			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(princ)				(&check-memory)
 | 
					 | 
				
			||||||
(princ "\nabcd\n")		(&check-memory)
 | 
					 | 
				
			||||||
(princ "a" "b" "c\n")		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(prog1)				(&check-memory)
 | 
					 | 
				
			||||||
(prog1 1)			(&check-memory)
 | 
					 | 
				
			||||||
(prog1 1 2 3 4)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(prog2)				(&check-memory)
 | 
					 | 
				
			||||||
(prog2 1)			(&check-memory)
 | 
					 | 
				
			||||||
(prog2 1 2 3 4)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(progn)				(&check-memory)
 | 
					 | 
				
			||||||
(progn 1)			(&check-memory)
 | 
					 | 
				
			||||||
(progn 1 2 3 4)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(quote)				(&check-memory)
 | 
					 | 
				
			||||||
(quote a)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(rassoc)						(&check-memory)
 | 
					 | 
				
			||||||
(rassoc 'first)						(&check-memory)
 | 
					 | 
				
			||||||
(rassoc 'first '((one . first)))			(&check-memory)
 | 
					 | 
				
			||||||
(rassoc 'first '((two . second)))			(&check-memory)
 | 
					 | 
				
			||||||
(rassoc 'first '((one . first) (two . second)))		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(rassq)							(&check-memory)
 | 
					 | 
				
			||||||
(rassq "first")						(&check-memory)
 | 
					 | 
				
			||||||
(rassq "first" '(("one" . "first")))			(&check-memory)
 | 
					 | 
				
			||||||
(rassq "first" '(("two" . "second")))			(&check-memory)
 | 
					 | 
				
			||||||
(rassq "first" '(("one" . "first") ("two" . "second")))	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(set)				(&check-memory)
 | 
					 | 
				
			||||||
(set "a") (unset "a")		(&check-memory)
 | 
					 | 
				
			||||||
(set "a" 1) (unset "a")		(&check-memory)
 | 
					 | 
				
			||||||
(set a 1) (unset a)		(&check-memory)
 | 
					 | 
				
			||||||
(set "a" 1 2) (unset "a")	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(setf)				(&check-memory)
 | 
					 | 
				
			||||||
(setf a) (unsetf a)		(&check-memory)
 | 
					 | 
				
			||||||
(setf a 1) (unsetf a)		(&check-memory)
 | 
					 | 
				
			||||||
(setf a 1 2) (unsetf a)		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(setq)				(&check-memory)
 | 
					 | 
				
			||||||
(setq a) (unsetq a)		(&check-memory)
 | 
					 | 
				
			||||||
(setq a 1) (unsetq a)		(&check-memory)
 | 
					 | 
				
			||||||
(setq a 1 2) (unsetq a)		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(string-equal)			(&check-memory)
 | 
					 | 
				
			||||||
(string-equal 1)		(&check-memory)
 | 
					 | 
				
			||||||
(string-equal "a")		(&check-memory)
 | 
					 | 
				
			||||||
(string-equal "a" "a")		(&check-memory)
 | 
					 | 
				
			||||||
(string-equal "a" "b")		(&check-memory)
 | 
					 | 
				
			||||||
(string-equal "a" "b" "c")	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(string-to-integer)		(&check-memory)
 | 
					 | 
				
			||||||
(string-to-integer 1)		(&check-memory)
 | 
					 | 
				
			||||||
(string-to-integer 1.5)		(&check-memory)
 | 
					 | 
				
			||||||
(string-to-integer "a")		(&check-memory)
 | 
					 | 
				
			||||||
(string-to-integer "a" "a")	(&check-memory)
 | 
					 | 
				
			||||||
(string-to-integer "a" "b")	(&check-memory)
 | 
					 | 
				
			||||||
(string-to-integer "a" "b" "c")	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(string-to-float)		(&check-memory)
 | 
					 | 
				
			||||||
(string-to-float 1)		(&check-memory)
 | 
					 | 
				
			||||||
(string-to-float 1.5)		(&check-memory)
 | 
					 | 
				
			||||||
(string-to-float "a")		(&check-memory)
 | 
					 | 
				
			||||||
(string-to-float "a" "a")	(&check-memory)
 | 
					 | 
				
			||||||
(string-to-float "a" "b")	(&check-memory)
 | 
					 | 
				
			||||||
(string-to-float "a" "b" "c")	(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(string=)			(&check-memory)
 | 
					 | 
				
			||||||
(string= 1)			(&check-memory)
 | 
					 | 
				
			||||||
(string= "a")			(&check-memory)
 | 
					 | 
				
			||||||
(string= "a" "a")		(&check-memory)
 | 
					 | 
				
			||||||
(string= "a" "b")		(&check-memory)
 | 
					 | 
				
			||||||
(string= "a" "b" "c")		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(unless)			(&check-memory)
 | 
					 | 
				
			||||||
(unless 1)			(&check-memory)
 | 
					 | 
				
			||||||
(unless 0 1 2)			(&check-memory)
 | 
					 | 
				
			||||||
(unless t 2 3 4)		(&check-memory)
 | 
					 | 
				
			||||||
(unless nil 2 3 4)		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(unset)				(&check-memory)
 | 
					 | 
				
			||||||
(unset "a")			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(unsetf)			(&check-memory)
 | 
					 | 
				
			||||||
(unsetf a)			(&check-memory)
 | 
					 | 
				
			||||||
(unsetf a b)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(unsetq)			(&check-memory)
 | 
					 | 
				
			||||||
(unsetq a)			(&check-memory)
 | 
					 | 
				
			||||||
(unsetq a b)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(when)				(&check-memory)
 | 
					 | 
				
			||||||
(when 0)			(&check-memory)
 | 
					 | 
				
			||||||
(when 0 1)			(&check-memory)
 | 
					 | 
				
			||||||
(when t 1)			(&check-memory)
 | 
					 | 
				
			||||||
(when nil 1)			(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(while)				(&check-memory)
 | 
					 | 
				
			||||||
(while nil)			(&check-memory)
 | 
					 | 
				
			||||||
(while nil 1)			(&check-memory)
 | 
					 | 
				
			||||||
(while nil 1 2 3 4)		(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; more complex command sequences
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(setq abcd "abcd")
 | 
					 | 
				
			||||||
(unsetq abcd)
 | 
					 | 
				
			||||||
(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(setq abcd (("abcd" . "efgh") ("1234" . "5678")))
 | 
					 | 
				
			||||||
(unsetq abcd)
 | 
					 | 
				
			||||||
(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun myfun () (princ "a\n"))
 | 
					 | 
				
			||||||
(exfun 'myfun)
 | 
					 | 
				
			||||||
(unsetq myfun)
 | 
					 | 
				
			||||||
(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun myfun () (princ "a\n"))
 | 
					 | 
				
			||||||
(funcall 'myfun)
 | 
					 | 
				
			||||||
(funcall 'myfun 'aaaaa)
 | 
					 | 
				
			||||||
(unsetq myfun)
 | 
					 | 
				
			||||||
(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun myfun (o) (princ o "a\n"))
 | 
					 | 
				
			||||||
(funcall 'myfun)
 | 
					 | 
				
			||||||
(funcall 'myfun 'aaaaa)
 | 
					 | 
				
			||||||
(unsetq myfun)
 | 
					 | 
				
			||||||
(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun myfun (o p) (princ o p "\n"))
 | 
					 | 
				
			||||||
(funcall 'myfun)
 | 
					 | 
				
			||||||
(funcall 'myfun 'aaaaa)
 | 
					 | 
				
			||||||
(funcall 'myfun 'aaaaa 'bbbbb)
 | 
					 | 
				
			||||||
(unsetq myfun)
 | 
					 | 
				
			||||||
(&check-memory)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun printnum (from to) (while (<= from to) (princ " " from) (setq from (+ from 1))))
 | 
					 | 
				
			||||||
(princ "Numbers 1-10:") (printnum 1 10) (princ "\n")
 | 
					 | 
				
			||||||
(unsetq printnum)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; game over
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(princ "*********************\n")
 | 
					 | 
				
			||||||
(princ "OK, all tests passed!\n")
 | 
					 | 
				
			||||||
(princ "*********************\n")
 | 
					 | 
				
			||||||
(&stat-memory)
 | 
					 | 
				
			||||||
| 
						 | 
					@ -18,6 +18,8 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "aserver.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <sys/shm.h>
 | 
					#include <sys/shm.h>
 | 
				
			||||||
#include <sys/socket.h>
 | 
					#include <sys/socket.h>
 | 
				
			||||||
#include <poll.h>
 | 
					#include <poll.h>
 | 
				
			||||||
| 
						 | 
					@ -33,7 +35,6 @@
 | 
				
			||||||
#include <limits.h>
 | 
					#include <limits.h>
 | 
				
			||||||
#include <signal.h>
 | 
					#include <signal.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "aserver.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
char *command;
 | 
					char *command;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -737,7 +738,7 @@ static int snd_client_open(client_t *client)
 | 
				
			||||||
		ans.result = -EINVAL;
 | 
							ans.result = -EINVAL;
 | 
				
			||||||
		goto _answer;
 | 
							goto _answer;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	name = alloca(req.namelen);
 | 
						name = alloca(req.namelen + 1);
 | 
				
			||||||
	err = read(client->ctrl_fd, name, req.namelen);
 | 
						err = read(client->ctrl_fd, name, req.namelen);
 | 
				
			||||||
	if (err < 0) {
 | 
						if (err < 0) {
 | 
				
			||||||
		SYSERROR("read failed");
 | 
							SYSERROR("read failed");
 | 
				
			||||||
| 
						 | 
					@ -774,6 +775,10 @@ static int snd_client_open(client_t *client)
 | 
				
			||||||
	name[req.namelen] = '\0';
 | 
						name[req.namelen] = '\0';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	client->transport_type = req.transport_type;
 | 
						client->transport_type = req.transport_type;
 | 
				
			||||||
 | 
						if (sizeof(client->name) < (size_t)(req.namelen + 1)) {
 | 
				
			||||||
 | 
							ans.result = -ENOMEM;
 | 
				
			||||||
 | 
							goto _answer;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	strcpy(client->name, name);
 | 
						strcpy(client->name, name);
 | 
				
			||||||
	client->stream = req.stream;
 | 
						client->stream = req.stream;
 | 
				
			||||||
	client->mode = req.mode;
 | 
						client->mode = req.mode;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										76
									
								
								configure.ac
									
										
									
									
									
								
							
							
						
						
									
										76
									
								
								configure.ac
									
										
									
									
									
								
							| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
dnl Process this file with autoconf to produce a configure script.
 | 
					dnl Process this file with autoconf to produce a configure script.
 | 
				
			||||||
AC_PREREQ(2.59)
 | 
					AC_PREREQ(2.59)
 | 
				
			||||||
AC_INIT(alsa-lib, 1.2.7)
 | 
					AC_INIT(alsa-lib, 1.2.14)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_CONFIG_SRCDIR([src/control/control.c])
 | 
					AC_CONFIG_SRCDIR([src/control/control.c])
 | 
				
			||||||
AC_CONFIG_MACRO_DIR([m4])
 | 
					AC_CONFIG_MACRO_DIR([m4])
 | 
				
			||||||
| 
						 | 
					@ -46,12 +46,16 @@ dnl Checks for typedefs, structures, and compiler characteristics.
 | 
				
			||||||
AC_C_CONST
 | 
					AC_C_CONST
 | 
				
			||||||
AC_C_INLINE
 | 
					AC_C_INLINE
 | 
				
			||||||
AC_HEADER_TIME
 | 
					AC_HEADER_TIME
 | 
				
			||||||
 | 
					AC_CHECK_ATTRIBUTE_SYMVER
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl Checks for library functions.
 | 
					dnl Checks for library functions.
 | 
				
			||||||
AC_PROG_GCC_TRADITIONAL
 | 
					AC_PROG_GCC_TRADITIONAL
 | 
				
			||||||
AC_CHECK_FUNCS([uselocale])
 | 
					AC_CHECK_FUNCS([uselocale])
 | 
				
			||||||
AC_CHECK_FUNCS([eaccess])
 | 
					AC_CHECK_FUNCS([eaccess])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dnl Enable largefile support
 | 
				
			||||||
 | 
					AC_SYS_LARGEFILE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SAVE_LIBRARY_VERSION
 | 
					SAVE_LIBRARY_VERSION
 | 
				
			||||||
AC_SUBST(LIBTOOL_VERSION_INFO)
 | 
					AC_SUBST(LIBTOOL_VERSION_INFO)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -67,6 +71,15 @@ EOF
 | 
				
			||||||
  exit 1
 | 
					  exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dnl Do not use --with-pic for shared libraries (consider to use PIE)
 | 
				
			||||||
 | 
					if test "$enable_static" = "yes" -a "$pic_mode" = "yes"; then
 | 
				
			||||||
 | 
					cat <<EOF
 | 
				
			||||||
 | 
					  Please, do not enable PIC (--with-pic) for static library. Consider
 | 
				
			||||||
 | 
					  to remove this option or use PIE flags.
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					  exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl ALSA configuration directory
 | 
					dnl ALSA configuration directory
 | 
				
			||||||
AC_ARG_WITH(configdir,
 | 
					AC_ARG_WITH(configdir,
 | 
				
			||||||
    AS_HELP_STRING([--with-configdir=dir],
 | 
					    AS_HELP_STRING([--with-configdir=dir],
 | 
				
			||||||
| 
						 | 
					@ -255,9 +268,8 @@ AC_ARG_WITH(libdl,
 | 
				
			||||||
  [ have_libdl="$withval" ], [ have_libdl="yes" ])
 | 
					  [ have_libdl="$withval" ], [ have_libdl="yes" ])
 | 
				
			||||||
HAVE_LIBDL=
 | 
					HAVE_LIBDL=
 | 
				
			||||||
if test "$have_libdl" = "yes"; then
 | 
					if test "$have_libdl" = "yes"; then
 | 
				
			||||||
  AC_CHECK_LIB([dl], [dlsym], [HAVE_LIBDL="yes"])
 | 
					  AC_SEARCH_LIBS([dlsym], [dl], [HAVE_LIBDL="yes"])
 | 
				
			||||||
  if test "$HAVE_LIBDL" = "yes" ; then
 | 
					  if test "$HAVE_LIBDL" = "yes" ; then
 | 
				
			||||||
    ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl"
 | 
					 | 
				
			||||||
    AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
 | 
					    AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
| 
						 | 
					@ -335,7 +347,7 @@ else
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl Check for headers
 | 
					dnl Check for headers
 | 
				
			||||||
AC_CHECK_HEADERS([endian.h sys/endian.h sys/shm.h])
 | 
					AC_CHECK_HEADERS([endian.h sys/endian.h sys/shm.h malloc.h])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl Check for resmgr support...
 | 
					dnl Check for resmgr support...
 | 
				
			||||||
AC_MSG_CHECKING(for resmgr support)
 | 
					AC_MSG_CHECKING(for resmgr support)
 | 
				
			||||||
| 
						 | 
					@ -407,10 +419,6 @@ AC_ARG_ENABLE(ucm,
 | 
				
			||||||
AC_ARG_ENABLE(topology,
 | 
					AC_ARG_ENABLE(topology,
 | 
				
			||||||
  AS_HELP_STRING([--disable-topology], [disable the DSP topology component]),
 | 
					  AS_HELP_STRING([--disable-topology], [disable the DSP topology component]),
 | 
				
			||||||
  [build_topology="$enableval"], [build_topology="yes"])
 | 
					  [build_topology="$enableval"], [build_topology="yes"])
 | 
				
			||||||
AC_ARG_ENABLE(alisp,
 | 
					 | 
				
			||||||
  AS_HELP_STRING([--enable-alisp], [enable the alisp component]),
 | 
					 | 
				
			||||||
  [build_alisp="$enableval"], [build_alisp="no"])
 | 
					 | 
				
			||||||
test "$softfloat" = "yes" && build_alisp="no"
 | 
					 | 
				
			||||||
AC_ARG_ENABLE(old-symbols,
 | 
					AC_ARG_ENABLE(old-symbols,
 | 
				
			||||||
  AS_HELP_STRING([--disable-old-symbols], [disable old obsoleted symbols]),
 | 
					  AS_HELP_STRING([--disable-old-symbols], [disable old obsoleted symbols]),
 | 
				
			||||||
  [keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
 | 
					  [keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
 | 
				
			||||||
| 
						 | 
					@ -471,6 +479,12 @@ fi
 | 
				
			||||||
AC_SUBST(PYTHON_LIBS)
 | 
					AC_SUBST(PYTHON_LIBS)
 | 
				
			||||||
AC_SUBST(PYTHON_INCLUDES)
 | 
					AC_SUBST(PYTHON_INCLUDES)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if test "$build_rawmidi" != "yes"; then
 | 
				
			||||||
 | 
					  if test "$build_seq" = "yes"; then
 | 
				
			||||||
 | 
					    AC_ERROR([Cannot enable sequencer without rawmidi])
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AM_CONDITIONAL([BUILD_MIXER], [test x$build_mixer = xyes])
 | 
					AM_CONDITIONAL([BUILD_MIXER], [test x$build_mixer = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_PCM], [test x$build_pcm = xyes])
 | 
					AM_CONDITIONAL([BUILD_PCM], [test x$build_pcm = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_RAWMIDI], [test x$build_rawmidi = xyes])
 | 
					AM_CONDITIONAL([BUILD_RAWMIDI], [test x$build_rawmidi = xyes])
 | 
				
			||||||
| 
						 | 
					@ -478,7 +492,6 @@ AM_CONDITIONAL([BUILD_HWDEP], [test x$build_hwdep = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_SEQ], [test x$build_seq = xyes])
 | 
					AM_CONDITIONAL([BUILD_SEQ], [test x$build_seq = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_UCM], [test x$build_ucm = xyes])
 | 
					AM_CONDITIONAL([BUILD_UCM], [test x$build_ucm = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_TOPOLOGY], [test x$build_topology = xyes])
 | 
					AM_CONDITIONAL([BUILD_TOPOLOGY], [test x$build_topology = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_ALISP], [test x$build_alisp = xyes])
 | 
					 | 
				
			||||||
AM_CONDITIONAL([BUILD_MIXER_MODULES], [test x$build_mixer_modules = xyes])
 | 
					AM_CONDITIONAL([BUILD_MIXER_MODULES], [test x$build_mixer_modules = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_MIXER_PYMODULES], [test x$build_mixer_pymodules = xyes])
 | 
					AM_CONDITIONAL([BUILD_MIXER_PYMODULES], [test x$build_mixer_pymodules = xyes])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -616,6 +629,7 @@ AM_CONDITIONAL([BUILD_PCM_PLUGIN_DSNOOP], [test x$build_pcm_dsnoop = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_PCM_PLUGIN_ASYM], [test x$build_pcm_asym = xyes])
 | 
					AM_CONDITIONAL([BUILD_PCM_PLUGIN_ASYM], [test x$build_pcm_asym = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_PCM_PLUGIN_IEC958], [test x$build_pcm_iec958 = xyes])
 | 
					AM_CONDITIONAL([BUILD_PCM_PLUGIN_IEC958], [test x$build_pcm_iec958 = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_PCM_PLUGIN_SOFTVOL], [test x$build_pcm_softvol = xyes])
 | 
					AM_CONDITIONAL([BUILD_PCM_PLUGIN_SOFTVOL], [test x$build_pcm_softvol = xyes])
 | 
				
			||||||
 | 
					AM_CONDITIONAL([BUILD_PCM_PLUGIN_EXTERNAL], [test x$build_pcm_extplug = xyes -o x$build_pcm_ioplug = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_PCM_PLUGIN_EXTPLUG], [test x$build_pcm_extplug = xyes])
 | 
					AM_CONDITIONAL([BUILD_PCM_PLUGIN_EXTPLUG], [test x$build_pcm_extplug = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_PCM_PLUGIN_IOPLUG], [test x$build_pcm_ioplug = xyes])
 | 
					AM_CONDITIONAL([BUILD_PCM_PLUGIN_IOPLUG], [test x$build_pcm_ioplug = xyes])
 | 
				
			||||||
AM_CONDITIONAL([BUILD_PCM_PLUGIN_MMAP_EMUL], [test x$build_pcm_mmap_emul = xyes])
 | 
					AM_CONDITIONAL([BUILD_PCM_PLUGIN_MMAP_EMUL], [test x$build_pcm_mmap_emul = xyes])
 | 
				
			||||||
| 
						 | 
					@ -639,6 +653,9 @@ fi
 | 
				
			||||||
if test "$build_pcm_alaw" = "yes"; then
 | 
					if test "$build_pcm_alaw" = "yes"; then
 | 
				
			||||||
  AC_DEFINE([BUILD_PCM_PLUGIN_ALAW], "1", [Build PCM alaw plugin])
 | 
					  AC_DEFINE([BUILD_PCM_PLUGIN_ALAW], "1", [Build PCM alaw plugin])
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					if test "$build_pcm_iec958" = "yes"; then
 | 
				
			||||||
 | 
					  AC_DEFINE([BUILD_PCM_PLUGIN_IEC958], "1", [Build PCM iec958 plugin])
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
if test "$build_pcm_mmap_emul" = "yes"; then
 | 
					if test "$build_pcm_mmap_emul" = "yes"; then
 | 
				
			||||||
  AC_DEFINE([BUILD_PCM_PLUGIN_MMAP_EMUL], "1", [Build PCM mmap-emul plugin])
 | 
					  AC_DEFINE([BUILD_PCM_PLUGIN_MMAP_EMUL], "1", [Build PCM mmap-emul plugin])
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					@ -744,28 +761,31 @@ if test ! -L "$srcdir"/include/alsa ; then
 | 
				
			||||||
  ln -sf . "$srcdir"/include/alsa
 | 
					  ln -sf . "$srcdir"/include/alsa
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
 | 
					AC_CONFIG_FILES(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
 | 
				
			||||||
	  include/Makefile include/sound/Makefile include/sound/uapi/Makefile \
 | 
							include/Makefile include/sound/Makefile include/sound/uapi/Makefile \
 | 
				
			||||||
	  src/Versions src/Makefile \
 | 
							src/Versions.in src/Makefile \
 | 
				
			||||||
          src/control/Makefile src/mixer/Makefile \
 | 
							src/control/Makefile src/mixer/Makefile \
 | 
				
			||||||
	  src/pcm/Makefile src/pcm/scopes/Makefile \
 | 
							src/pcm/Makefile src/pcm/scopes/Makefile \
 | 
				
			||||||
	  src/rawmidi/Makefile src/timer/Makefile \
 | 
							src/rawmidi/Makefile src/timer/Makefile \
 | 
				
			||||||
          src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
 | 
							src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
 | 
				
			||||||
          src/alisp/Makefile src/topology/Makefile \
 | 
							src/topology/Makefile \
 | 
				
			||||||
	  src/conf/Makefile \
 | 
							src/conf/Makefile \
 | 
				
			||||||
	  src/conf/cards/Makefile \
 | 
							src/conf/cards/Makefile \
 | 
				
			||||||
	  src/conf/ctl/Makefile \
 | 
							src/conf/ctl/Makefile \
 | 
				
			||||||
	  src/conf/pcm/Makefile \
 | 
							src/conf/pcm/Makefile \
 | 
				
			||||||
	  modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
 | 
							modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
 | 
				
			||||||
	  alsalisp/Makefile aserver/Makefile \
 | 
							aserver/Makefile \
 | 
				
			||||||
	  test/Makefile test/lsb/Makefile \
 | 
							test/Makefile test/lsb/Makefile \
 | 
				
			||||||
	  utils/Makefile utils/alsa-lib.spec utils/alsa.pc utils/alsa-topology.pc)
 | 
							utils/Makefile utils/alsa-lib.spec utils/alsa.pc utils/alsa-topology.pc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					AC_OUTPUT()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl Create asoundlib.h dynamically according to configure options
 | 
					dnl Create asoundlib.h dynamically according to configure options
 | 
				
			||||||
echo "Creating asoundlib.h..."
 | 
					echo "Creating asoundlib.h..."
 | 
				
			||||||
cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
 | 
					cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
 | 
				
			||||||
 | 
					if test "$ac_cv_header_sys_endian_h" != "yes"; then
 | 
				
			||||||
test "$ac_cv_header_endian_h" = "yes" && echo "#include <endian.h>" >> include/asoundlib.h
 | 
					test "$ac_cv_header_endian_h" = "yes" && echo "#include <endian.h>" >> include/asoundlib.h
 | 
				
			||||||
if test "$ac_cv_header_sys_endian_h" = "yes"; then
 | 
					else
 | 
				
			||||||
cat >> include/asoundlib.h <<EOF
 | 
					cat >> include/asoundlib.h <<EOF
 | 
				
			||||||
#include <sys/endian.h>
 | 
					#include <sys/endian.h>
 | 
				
			||||||
#ifndef __BYTE_ORDER
 | 
					#ifndef __BYTE_ORDER
 | 
				
			||||||
| 
						 | 
					@ -781,9 +801,11 @@ EOF
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
cat >> include/asoundlib.h <<EOF
 | 
					cat >> include/asoundlib.h <<EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
#ifndef __GNUC__
 | 
					#ifndef __GNUC__
 | 
				
			||||||
#define __inline__ inline
 | 
					#define __inline__ inline
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <alsa/asoundef.h>
 | 
					#include <alsa/asoundef.h>
 | 
				
			||||||
#include <alsa/version.h>
 | 
					#include <alsa/version.h>
 | 
				
			||||||
| 
						 | 
					@ -795,10 +817,12 @@ cat >> include/asoundlib.h <<EOF
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
test "$build_pcm" = "yes" && echo "#include <alsa/pcm.h>" >> include/asoundlib.h
 | 
					test "$build_pcm" = "yes" && echo "#include <alsa/pcm.h>" >> include/asoundlib.h
 | 
				
			||||||
test "$build_rawmidi" = "yes" && echo "#include <alsa/rawmidi.h>" >> include/asoundlib.h
 | 
					test "$build_rawmidi" = "yes" && echo "#include <alsa/rawmidi.h>" >> include/asoundlib.h
 | 
				
			||||||
 | 
					test "$build_rawmidi" = "yes" && echo "#include <alsa/ump.h>" >> include/asoundlib.h
 | 
				
			||||||
test "$build_pcm" = "yes" && echo "#include <alsa/timer.h>" >> include/asoundlib.h
 | 
					test "$build_pcm" = "yes" && echo "#include <alsa/timer.h>" >> include/asoundlib.h
 | 
				
			||||||
test "$build_hwdep" = "yes" && echo "#include <alsa/hwdep.h>" >> include/asoundlib.h
 | 
					test "$build_hwdep" = "yes" && echo "#include <alsa/hwdep.h>" >> include/asoundlib.h
 | 
				
			||||||
echo "#include <alsa/control.h>" >> include/asoundlib.h
 | 
					echo "#include <alsa/control.h>" >> include/asoundlib.h
 | 
				
			||||||
test "$build_mixer" = "yes" && echo "#include <alsa/mixer.h>" >> include/asoundlib.h
 | 
					test "$build_mixer" = "yes" && echo "#include <alsa/mixer.h>" >> include/asoundlib.h
 | 
				
			||||||
 | 
					test "$build_seq" = "yes" && echo "#include <alsa/ump_msg.h>" >> include/asoundlib.h
 | 
				
			||||||
test "$build_seq" = "yes" && echo "#include <alsa/seq_event.h>" >> include/asoundlib.h
 | 
					test "$build_seq" = "yes" && echo "#include <alsa/seq_event.h>" >> include/asoundlib.h
 | 
				
			||||||
test "$build_seq" = "yes" && echo "#include <alsa/seq.h>" >> include/asoundlib.h
 | 
					test "$build_seq" = "yes" && echo "#include <alsa/seq.h>" >> include/asoundlib.h
 | 
				
			||||||
test "$build_seq" = "yes" && echo "#include <alsa/seqmid.h>" >> include/asoundlib.h
 | 
					test "$build_seq" = "yes" && echo "#include <alsa/seqmid.h>" >> include/asoundlib.h
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,14 +9,16 @@ doc:
 | 
				
			||||||
	doxygen doxygen.cfg
 | 
						doxygen doxygen.cfg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
doc-pack: doc
 | 
					doc-pack: doc
 | 
				
			||||||
	-chmod a+r $(top_srcdir)/doc/doxygen/html/*
 | 
						-chmod -R a+r $(top_srcdir)/doc/doxygen/html/*
 | 
				
			||||||
	-chmod a-w $(top_srcdir)/doc/doxygen/html/*
 | 
						-chmod -R a-w $(top_srcdir)/doc/doxygen/html/*
 | 
				
			||||||
	if ! test -z "$(AMTAR)"; then \
 | 
						if ! test -z "$(AMTAR)"; then \
 | 
				
			||||||
		$(AMTAR) --create --directory=$(top_srcdir)/doc/doxygen/html --verbose --file=- . | bzip2 -c -9 > $(top_srcdir)/../alsa-lib-doc.tar.bz2 ; \
 | 
							$(AMTAR) --create --directory=$(top_srcdir)/doc/doxygen/html --verbose --file=- . | bzip2 -c -9 > $(top_srcdir)/../alsa-lib-doc.tar.bz2 ; \
 | 
				
			||||||
	else \
 | 
						else \
 | 
				
			||||||
		$(TAR) --create --directory=$(top_srcdir)/doc/doxygen/html --verbose --file=- . | bzip2 -c -9 > $(top_srcdir)/../alsa-lib-doc.tar.bz2 ; \
 | 
							$(TAR) --create --directory=$(top_srcdir)/doc/doxygen/html --verbose --file=- . | bzip2 -c -9 > $(top_srcdir)/../alsa-lib-doc.tar.bz2 ; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
						-chmod -R u+w $(top_srcdir)/doc/doxygen/html/*
 | 
				
			||||||
	rm -rf $(top_srcdir)/doc/doxygen/html/*
 | 
						rm -rf $(top_srcdir)/doc/doxygen/html/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
doc-clean:
 | 
					doc-clean:
 | 
				
			||||||
 | 
						-chmod -R u+w $(top_srcdir)/doc/doxygen/html/*
 | 
				
			||||||
	rm -rf $(top_srcdir)/doc/doxygen/html/*
 | 
						rm -rf $(top_srcdir)/doc/doxygen/html/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,6 +17,8 @@ INPUT            = @top_srcdir@/doc/index.doxygen \
 | 
				
			||||||
		   @top_srcdir@/include/control.h \
 | 
							   @top_srcdir@/include/control.h \
 | 
				
			||||||
		   @top_srcdir@/include/pcm.h \
 | 
							   @top_srcdir@/include/pcm.h \
 | 
				
			||||||
		   @top_srcdir@/include/rawmidi.h \
 | 
							   @top_srcdir@/include/rawmidi.h \
 | 
				
			||||||
 | 
							   @top_srcdir@/include/ump.h \
 | 
				
			||||||
 | 
							   @top_srcdir@/include/ump_msg.h \
 | 
				
			||||||
		   @top_srcdir@/include/timer.h \
 | 
							   @top_srcdir@/include/timer.h \
 | 
				
			||||||
		   @top_srcdir@/include/hwdep.h \
 | 
							   @top_srcdir@/include/hwdep.h \
 | 
				
			||||||
		   @top_srcdir@/include/seq.h \
 | 
							   @top_srcdir@/include/seq.h \
 | 
				
			||||||
| 
						 | 
					@ -36,18 +38,21 @@ INPUT            = @top_srcdir@/doc/index.doxygen \
 | 
				
			||||||
		   @top_srcdir@/src/input.c \
 | 
							   @top_srcdir@/src/input.c \
 | 
				
			||||||
		   @top_srcdir@/src/output.c \
 | 
							   @top_srcdir@/src/output.c \
 | 
				
			||||||
		   @top_srcdir@/src/conf.c \
 | 
							   @top_srcdir@/src/conf.c \
 | 
				
			||||||
 | 
							   @top_srcdir@/src/confeval.c \
 | 
				
			||||||
		   @top_srcdir@/src/confmisc.c \
 | 
							   @top_srcdir@/src/confmisc.c \
 | 
				
			||||||
		   @top_srcdir@/src/names.c \
 | 
							   @top_srcdir@/src/names.c \
 | 
				
			||||||
		   @top_srcdir@/src/shmarea.c \
 | 
							   @top_srcdir@/src/shmarea.c \
 | 
				
			||||||
		   @top_srcdir@/src/userfile.c \
 | 
							   @top_srcdir@/src/userfile.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/cards.c \
 | 
							   @top_srcdir@/src/control/cards.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/control.c \
 | 
							   @top_srcdir@/src/control/control.c \
 | 
				
			||||||
 | 
							   @top_srcdir@/src/control/control_ext.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/control_plugin.c \
 | 
							   @top_srcdir@/src/control/control_plugin.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/control_hw.c \
 | 
							   @top_srcdir@/src/control/control_hw.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/control_remap.c \
 | 
							   @top_srcdir@/src/control/control_remap.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/control_shm.c \
 | 
							   @top_srcdir@/src/control/control_shm.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/ctlparse.c \
 | 
							   @top_srcdir@/src/control/ctlparse.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/hcontrol.c \
 | 
							   @top_srcdir@/src/control/hcontrol.c \
 | 
				
			||||||
 | 
							   @top_srcdir@/src/control/namehint.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/setup.c \
 | 
							   @top_srcdir@/src/control/setup.c \
 | 
				
			||||||
		   @top_srcdir@/src/control/tlv.c \
 | 
							   @top_srcdir@/src/control/tlv.c \
 | 
				
			||||||
		   @top_srcdir@/src/mixer \
 | 
							   @top_srcdir@/src/mixer \
 | 
				
			||||||
| 
						 | 
					@ -109,8 +114,9 @@ EXCLUDE		 = @top_srcdir@/src/control/control_local.h \
 | 
				
			||||||
		   @top_srcdir@/src/topology/tplg_local.h
 | 
							   @top_srcdir@/src/topology/tplg_local.h
 | 
				
			||||||
RECURSIVE	 = YES
 | 
					RECURSIVE	 = YES
 | 
				
			||||||
FILE_PATTERNS    = *.c *.h
 | 
					FILE_PATTERNS    = *.c *.h
 | 
				
			||||||
 | 
					INCLUDE_PATH     = @top_builddir@/include
 | 
				
			||||||
EXAMPLE_PATH     = @top_srcdir@/test
 | 
					EXAMPLE_PATH     = @top_srcdir@/test
 | 
				
			||||||
IMAGE_PATH	 = pictures
 | 
					IMAGE_PATH	 = @top_srcdir@/doc/pictures
 | 
				
			||||||
QUIET            = YES
 | 
					QUIET            = YES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXTRACT_ALL	 = NO
 | 
					EXTRACT_ALL	 = NO
 | 
				
			||||||
| 
						 | 
					@ -126,7 +132,8 @@ PREDEFINED	 = DOXYGEN PIC "DOC_HIDDEN" \
 | 
				
			||||||
		   ALSA_PCM_NEW_HW_PARAMS_API \
 | 
							   ALSA_PCM_NEW_HW_PARAMS_API \
 | 
				
			||||||
		   _POSIX_C_SOURCE \
 | 
							   _POSIX_C_SOURCE \
 | 
				
			||||||
		   "use_default_symbol_version(x,y,z)=" \
 | 
							   "use_default_symbol_version(x,y,z)=" \
 | 
				
			||||||
		   "link_warning(x,y)="
 | 
							   "link_warning(x,y)=" \
 | 
				
			||||||
 | 
							   __attribute__((x))=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
OPTIMIZE_OUTPUT_FOR_C = YES	# doxygen 1.2.6 option
 | 
					OPTIMIZE_OUTPUT_FOR_C = YES	# doxygen 1.2.6 option
 | 
				
			||||||
TYPEDEF_HIDES_STRUCT = YES	# needed in doxygen >= 1.5.4
 | 
					TYPEDEF_HIDES_STRUCT = YES	# needed in doxygen >= 1.5.4
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1 +1,9 @@
 | 
				
			||||||
EXTRA_DIST=wave1.gif wave2.gif
 | 
					GIT_FILES=$(wildcard *.gif)
 | 
				
			||||||
 | 
					PUML_FILES=$(wildcard *.puml)
 | 
				
			||||||
 | 
					SVG_FILES=$(PUML_FILES:.puml=.svg)
 | 
				
			||||||
 | 
					EXTRA_DIST=$(GIT_FILES) $(PUML_FILES) $(SVG_FILES)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					all: $(SVG_FILES)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.puml.svg:
 | 
				
			||||||
 | 
						plantuml -tsvg $<
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										17
									
								
								doc/pictures/ucm-seq-boot.puml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								doc/pictures/ucm-seq-boot.puml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					@startuml
 | 
				
			||||||
 | 
					title "UCM sequence boot order (using udev and alsactl)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start
 | 
				
			||||||
 | 
					:Sound card detected (udev);
 | 
				
			||||||
 | 
					:UCM: FixedBootSequence;
 | 
				
			||||||
 | 
					if (Card state (/var/lib/alsa/asound.state)) then (not present)
 | 
				
			||||||
 | 
					  :UCM: BootSequence;
 | 
				
			||||||
 | 
					else (present)
 | 
				
			||||||
 | 
					  :alsactl: Restore state (from asound.state);
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					:Standard sound card use (with or without UCM);
 | 
				
			||||||
 | 
					:Save sound card state (asound.state);
 | 
				
			||||||
 | 
					:Sound card detached;
 | 
				
			||||||
 | 
					stop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@enduml
 | 
				
			||||||
							
								
								
									
										27
									
								
								doc/pictures/ucm-seq-boot.svg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								doc/pictures/ucm-seq-boot.svg
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
		 After Width: | Height: | Size: 7.2 KiB  | 
							
								
								
									
										26
									
								
								doc/pictures/ucm-seq-device.puml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								doc/pictures/ucm-seq-device.puml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,26 @@
 | 
				
			||||||
 | 
					@startuml
 | 
				
			||||||
 | 
					title "UCM device sequence graph"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start
 | 
				
			||||||
 | 
					split
 | 
				
			||||||
 | 
					  :Enable device;
 | 
				
			||||||
 | 
					  :EnableSequence;
 | 
				
			||||||
 | 
					  :Use device;
 | 
				
			||||||
 | 
					  :Disable device;
 | 
				
			||||||
 | 
					  :DisableSequence;
 | 
				
			||||||
 | 
					split again
 | 
				
			||||||
 | 
					  :Switch device;
 | 
				
			||||||
 | 
					  :Disable old device;
 | 
				
			||||||
 | 
					  if (TransitionSequence) then (present)
 | 
				
			||||||
 | 
					    :TransitionSequence;
 | 
				
			||||||
 | 
					    :Enable new device;
 | 
				
			||||||
 | 
					  else (not present)
 | 
				
			||||||
 | 
					    :Disable old device;
 | 
				
			||||||
 | 
					    :DisableSequence;
 | 
				
			||||||
 | 
					    :Enable new device;
 | 
				
			||||||
 | 
					    :EnableSequence;
 | 
				
			||||||
 | 
					  endif
 | 
				
			||||||
 | 
					end split
 | 
				
			||||||
 | 
					stop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@enduml
 | 
				
			||||||
							
								
								
									
										36
									
								
								doc/pictures/ucm-seq-device.svg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								doc/pictures/ucm-seq-device.svg
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
		 After Width: | Height: | Size: 11 KiB  | 
							
								
								
									
										30
									
								
								doc/pictures/ucm-seq-verb.puml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								doc/pictures/ucm-seq-verb.puml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,30 @@
 | 
				
			||||||
 | 
					@startuml
 | 
				
			||||||
 | 
					title "UCM verb sequence graph"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start
 | 
				
			||||||
 | 
					split
 | 
				
			||||||
 | 
					  :Enable verb;
 | 
				
			||||||
 | 
					  :SectionDefaults sequence;
 | 
				
			||||||
 | 
					  :EnableSequence;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  :Enable, use and disable verb devices;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  :Disable verb;
 | 
				
			||||||
 | 
					  :DisableSequence;
 | 
				
			||||||
 | 
					split again
 | 
				
			||||||
 | 
					  :Switch verb;
 | 
				
			||||||
 | 
					  :Disable old verb;
 | 
				
			||||||
 | 
					  if (TransitionSequence) then (present)
 | 
				
			||||||
 | 
					    :TransitionSequence;
 | 
				
			||||||
 | 
					    :Enable new verb;
 | 
				
			||||||
 | 
					  else (not present)
 | 
				
			||||||
 | 
					    :Disable old verb;
 | 
				
			||||||
 | 
					    :DisableSequence;
 | 
				
			||||||
 | 
					    :Enable new verb;
 | 
				
			||||||
 | 
					    :EnableSequence;
 | 
				
			||||||
 | 
					  endif
 | 
				
			||||||
 | 
					end split
 | 
				
			||||||
 | 
					stop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@enduml
 | 
				
			||||||
							
								
								
									
										40
									
								
								doc/pictures/ucm-seq-verb.svg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								doc/pictures/ucm-seq-verb.svg
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
		 After Width: | Height: | Size: 11 KiB  | 
							
								
								
									
										19
									
								
								doc/pictures/ucm-volume.puml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								doc/pictures/ucm-volume.puml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					@startuml
 | 
				
			||||||
 | 
					title "UCM volume"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					start
 | 
				
			||||||
 | 
					if (Card state (/var/lib/alsa/asound.state)) then (not present)
 | 
				
			||||||
 | 
					  :UCM: BootSequence;
 | 
				
			||||||
 | 
					else (present)
 | 
				
			||||||
 | 
					  :alsactl: Restore state (from asound.state);
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					:UCM application:set device volume;
 | 
				
			||||||
 | 
					note right
 | 
				
			||||||
 | 
					  The application uses (Playback|Capture)MixerElem or
 | 
				
			||||||
 | 
					  (Playback/Capture)(Volume/Switch) values to get
 | 
				
			||||||
 | 
					  the controls.
 | 
				
			||||||
 | 
					end note
 | 
				
			||||||
 | 
					:alsactl: Store state (to asound.state);
 | 
				
			||||||
 | 
					stop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@enduml
 | 
				
			||||||
							
								
								
									
										29
									
								
								doc/pictures/ucm-volume.svg
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								doc/pictures/ucm-volume.svg
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
		 After Width: | Height: | Size: 6.6 KiB  | 
							
								
								
									
										19
									
								
								gitcompile
									
										
									
									
									
								
							
							
						
						
									
										19
									
								
								gitcompile
									
										
									
									
									
								
							| 
						 | 
					@ -5,7 +5,6 @@ set -e
 | 
				
			||||||
bits32=
 | 
					bits32=
 | 
				
			||||||
cbits32=
 | 
					cbits32=
 | 
				
			||||||
modules=
 | 
					modules=
 | 
				
			||||||
alisp=
 | 
					 | 
				
			||||||
lto=
 | 
					lto=
 | 
				
			||||||
if [ $# -ne 0 ]; then
 | 
					if [ $# -ne 0 ]; then
 | 
				
			||||||
  endloop=
 | 
					  endloop=
 | 
				
			||||||
| 
						 | 
					@ -20,10 +19,6 @@ if [ $# -ne 0 ]; then
 | 
				
			||||||
      modules=yes
 | 
					      modules=yes
 | 
				
			||||||
      echo "Forced mixer modules build..."
 | 
					      echo "Forced mixer modules build..."
 | 
				
			||||||
      shift ;;
 | 
					      shift ;;
 | 
				
			||||||
    alisp)
 | 
					 | 
				
			||||||
      alisp=yes
 | 
					 | 
				
			||||||
      echo "Forced alisp code build..."
 | 
					 | 
				
			||||||
      shift ;;
 | 
					 | 
				
			||||||
    python2)
 | 
					    python2)
 | 
				
			||||||
      python2=yes
 | 
					      python2=yes
 | 
				
			||||||
      echo "Forced python2 interpreter build..."
 | 
					      echo "Forced python2 interpreter build..."
 | 
				
			||||||
| 
						 | 
					@ -32,6 +27,10 @@ if [ $# -ne 0 ]; then
 | 
				
			||||||
      lto="-flto -flto-partition=none"
 | 
					      lto="-flto -flto-partition=none"
 | 
				
			||||||
      echo "Forced lto build..."
 | 
					      echo "Forced lto build..."
 | 
				
			||||||
      shift ;;
 | 
					      shift ;;
 | 
				
			||||||
 | 
					    static)
 | 
				
			||||||
 | 
					      static=yes
 | 
				
			||||||
 | 
					      echo "Selected static build..."
 | 
				
			||||||
 | 
					      shift ;;
 | 
				
			||||||
    *)
 | 
					    *)
 | 
				
			||||||
      endloop=yes
 | 
					      endloop=yes
 | 
				
			||||||
      ;;
 | 
					      ;;
 | 
				
			||||||
| 
						 | 
					@ -67,14 +66,16 @@ if [ "$modules" = "yes" ]; then
 | 
				
			||||||
  args="$args --enable-mixer-pymods"
 | 
					  args="$args --enable-mixer-pymods"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$alisp" = "yes" ]; then
 | 
					 | 
				
			||||||
  args="$args --enable-alisp"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ "$python2" = "yes" ]; then
 | 
					if [ "$python2" = "yes" ]; then
 | 
				
			||||||
  args="$args --enable-python2"
 | 
					  args="$args --enable-python2"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$static" = "yes" ]; then
 | 
				
			||||||
 | 
					  #args="$args --enable-shared=no --enable-static=yes"
 | 
				
			||||||
 | 
					  args="$args --disable-shared"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
touch ltconfig
 | 
					touch ltconfig
 | 
				
			||||||
libtoolize --force --copy --automake
 | 
					libtoolize --force --copy --automake
 | 
				
			||||||
aclocal $ACLOCAL_FLAGS
 | 
					aclocal $ACLOCAL_FLAGS
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,19 +22,20 @@ endif
 | 
				
			||||||
if BUILD_PCM_PLUGIN_RATE
 | 
					if BUILD_PCM_PLUGIN_RATE
 | 
				
			||||||
alsainclude_HEADERS += pcm_rate.h
 | 
					alsainclude_HEADERS += pcm_rate.h
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
if BUILD_PCM_PLUGIN_EXTPLUG
 | 
					if BUILD_PCM_PLUGIN_EXTERNAL
 | 
				
			||||||
alsainclude_HEADERS += pcm_external.h pcm_extplug.h
 | 
					# FIXME: pcm_external.h includes both pcm_extplug.h and pcm_ioplug.h
 | 
				
			||||||
endif
 | 
					alsainclude_HEADERS += pcm_external.h pcm_extplug.h pcm_ioplug.h
 | 
				
			||||||
if BUILD_PCM_PLUGIN_IOPLUG
 | 
					 | 
				
			||||||
if !BUILD_PCM_PLUGIN_EXTPLUG
 | 
					 | 
				
			||||||
alsainclude_HEADERS += pcm_external.h
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
alsainclude_HEADERS += pcm_ioplug.h
 | 
					 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					#if BUILD_PCM_PLUGIN_EXTPLUG
 | 
				
			||||||
 | 
					#alsainclude_HEADERS += pcm_extplug.h
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#if BUILD_PCM_PLUGIN_IOPLUG
 | 
				
			||||||
 | 
					#alsainclude_HEADERS += pcm_ioplug.h
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if BUILD_RAWMIDI
 | 
					if BUILD_RAWMIDI
 | 
				
			||||||
alsainclude_HEADERS += rawmidi.h
 | 
					alsainclude_HEADERS += rawmidi.h ump.h ump_msg.h
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if BUILD_HWDEP
 | 
					if BUILD_HWDEP
 | 
				
			||||||
| 
						 | 
					@ -57,10 +58,6 @@ if BUILD_TOPOLOGY
 | 
				
			||||||
alsainclude_HEADERS += topology.h
 | 
					alsainclude_HEADERS += topology.h
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if BUILD_ALISP
 | 
					 | 
				
			||||||
alsainclude_HEADERS += alisp.h
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
noinst_HEADERS = alsa sys.h search.h list.h aserver.h local.h alsa-symbols.h \
 | 
					noinst_HEADERS = alsa sys.h search.h list.h aserver.h local.h alsa-symbols.h \
 | 
				
			||||||
	asoundlib-head.h asoundlib-tail.h bswap.h type_compat.h
 | 
						asoundlib-head.h asoundlib-tail.h bswap.h type_compat.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,55 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *  ALSA lisp implementation
 | 
					 | 
				
			||||||
 *  Copyright (c) 2003 by Jaroslav Kysela <perex@perex.cz>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This library is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *   it under the terms of the GNU Lesser General Public License as
 | 
					 | 
				
			||||||
 *   published by the Free Software Foundation; either version 2.1 of
 | 
					 | 
				
			||||||
 *   the License, or (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *   GNU Lesser General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   You should have received a copy of the GNU Lesser General Public
 | 
					 | 
				
			||||||
 *   License along with this library; if not, write to the Free Software
 | 
					 | 
				
			||||||
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct alisp_cfg {
 | 
					 | 
				
			||||||
	int verbose: 1,
 | 
					 | 
				
			||||||
	    warning: 1,
 | 
					 | 
				
			||||||
	    debug: 1;
 | 
					 | 
				
			||||||
	snd_input_t *in;	/* program code */
 | 
					 | 
				
			||||||
	snd_output_t *out;	/* program output */
 | 
					 | 
				
			||||||
	snd_output_t *eout;	/* error output */
 | 
					 | 
				
			||||||
	snd_output_t *vout;	/* verbose output */
 | 
					 | 
				
			||||||
	snd_output_t *wout;	/* warning output */
 | 
					 | 
				
			||||||
	snd_output_t *dout;	/* debug output */
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct alisp_instance;
 | 
					 | 
				
			||||||
struct alisp_object;
 | 
					 | 
				
			||||||
struct alisp_seq_iterator;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct alisp_cfg *alsa_lisp_default_cfg(snd_input_t *input);
 | 
					 | 
				
			||||||
void alsa_lisp_default_cfg_free(struct alisp_cfg *cfg);
 | 
					 | 
				
			||||||
int alsa_lisp(struct alisp_cfg *cfg, struct alisp_instance **instance);
 | 
					 | 
				
			||||||
void alsa_lisp_free(struct alisp_instance *instance);
 | 
					 | 
				
			||||||
int alsa_lisp_function(struct alisp_instance *instance, struct alisp_seq_iterator **result,
 | 
					 | 
				
			||||||
		       const char *id, const char *args, ...)
 | 
					 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					 | 
				
			||||||
		       __attribute__ ((format (printf, 4, 5)))
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
		       ;
 | 
					 | 
				
			||||||
void alsa_lisp_result_free(struct alisp_instance *instance,
 | 
					 | 
				
			||||||
			   struct alisp_seq_iterator *result);
 | 
					 | 
				
			||||||
int alsa_lisp_seq_first(struct alisp_instance *instance, const char *id,
 | 
					 | 
				
			||||||
			struct alisp_seq_iterator **seq);
 | 
					 | 
				
			||||||
int alsa_lisp_seq_next(struct alisp_seq_iterator **seq);
 | 
					 | 
				
			||||||
int alsa_lisp_seq_count(struct alisp_seq_iterator *seq);
 | 
					 | 
				
			||||||
int alsa_lisp_seq_integer(struct alisp_seq_iterator *seq, long *val);
 | 
					 | 
				
			||||||
int alsa_lisp_seq_pointer(struct alisp_seq_iterator *seq, const char *ptr_id, void **ptr);
 | 
					 | 
				
			||||||
| 
						 | 
					@ -29,10 +29,17 @@
 | 
				
			||||||
#define INTERNAL_CONCAT2_2(Pre, Post) Pre##Post
 | 
					#define INTERNAL_CONCAT2_2(Pre, Post) Pre##Post
 | 
				
			||||||
#define INTERNAL(Name) INTERNAL_CONCAT2_2(__, Name)
 | 
					#define INTERNAL(Name) INTERNAL_CONCAT2_2(__, Name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if HAVE_ATTRIBUTE_SYMVER && __GNUC__ > 10
 | 
				
			||||||
 | 
					#define symbol_version(real, name, version) \
 | 
				
			||||||
 | 
						extern __typeof (real) real __attribute__((symver (#name "@" #version)))
 | 
				
			||||||
 | 
					#define default_symbol_version(real, name, version) \
 | 
				
			||||||
 | 
						extern __typeof (real) real __attribute__((symver (#name "@@" #version)))
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
#define symbol_version(real, name, version) \
 | 
					#define symbol_version(real, name, version) \
 | 
				
			||||||
	__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version)
 | 
						__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version)
 | 
				
			||||||
#define default_symbol_version(real, name, version) \
 | 
					#define default_symbol_version(real, name, version) \
 | 
				
			||||||
	__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version)
 | 
						__asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version)
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __clang__
 | 
					#ifdef __clang__
 | 
				
			||||||
#define EXPORT_SYMBOL __attribute__((visibility("default")))
 | 
					#define EXPORT_SYMBOL __attribute__((visibility("default")))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,9 +18,9 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
#include <netdb.h>
 | 
					 | 
				
			||||||
#include "../src/pcm/pcm_local.h"
 | 
					#include "../src/pcm/pcm_local.h"
 | 
				
			||||||
#include "../src/control/control_local.h"
 | 
					#include "../src/control/control_local.h"
 | 
				
			||||||
 | 
					#include <netdb.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_receive_fd(int sock, void *data, size_t len, int *fd);
 | 
					int snd_receive_fd(int sock, void *data, size_t len, int *fd);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/asoundef.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_ASOUNDEF_H
 | 
					#ifndef __ALSA_ASOUNDEF_H
 | 
				
			||||||
#define __ALSA_ASOUNDEF_H
 | 
					#define __ALSA_ASOUNDEF_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -215,6 +221,8 @@ extern "C" {
 | 
				
			||||||
#define CEA861_AUDIO_INFOFRAME_DB5_DM_INH_PROHIBITED (1<<7) /**< stereo downmis prohibited */
 | 
					#define CEA861_AUDIO_INFOFRAME_DB5_DM_INH_PROHIBITED (1<<7) /**< stereo downmis prohibited */
 | 
				
			||||||
#define CEA861_AUDIO_INFOFRAME_DB5_LSV		(0xf<<3) /**< mask - level-shift values */
 | 
					#define CEA861_AUDIO_INFOFRAME_DB5_LSV		(0xf<<3) /**< mask - level-shift values */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \defgroup MIDI_Interface Constants for MIDI v1.0
 | 
					 * \defgroup MIDI_Interface Constants for MIDI v1.0
 | 
				
			||||||
 * Constants for MIDI v1.0.
 | 
					 * Constants for MIDI v1.0.
 | 
				
			||||||
| 
						 | 
					@ -224,6 +232,8 @@ extern "C" {
 | 
				
			||||||
#define MIDI_CHANNELS			16	/**< Number of channels per port/cable. */
 | 
					#define MIDI_CHANNELS			16	/**< Number of channels per port/cable. */
 | 
				
			||||||
#define MIDI_GM_DRUM_CHANNEL		(10-1)	/**< Channel number for GM drums. */
 | 
					#define MIDI_GM_DRUM_CHANNEL		(10-1)	/**< Channel number for GM drums. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \defgroup MIDI_Commands MIDI Commands
 | 
					 * \defgroup MIDI_Commands MIDI Commands
 | 
				
			||||||
 * MIDI command codes.
 | 
					 * MIDI command codes.
 | 
				
			||||||
| 
						 | 
					@ -335,8 +345,6 @@ extern "C" {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \} */
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \} */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,3 +38,5 @@
 | 
				
			||||||
#include <poll.h>
 | 
					#include <poll.h>
 | 
				
			||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
#include <stdarg.h>
 | 
					#include <stdarg.h>
 | 
				
			||||||
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					#include <time.h>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,6 +27,11 @@
 | 
				
			||||||
#define bswap_16 bswap16
 | 
					#define bswap_16 bswap16
 | 
				
			||||||
#define bswap_32 bswap32
 | 
					#define bswap_32 bswap32
 | 
				
			||||||
#define bswap_64 bswap64
 | 
					#define bswap_64 bswap64
 | 
				
			||||||
 | 
					#elif defined(__OpenBSD__)
 | 
				
			||||||
 | 
					#include <sys/endian.h>
 | 
				
			||||||
 | 
					#define bswap_16 swap16
 | 
				
			||||||
 | 
					#define bswap_32 swap32
 | 
				
			||||||
 | 
					#define bswap_64 swap64
 | 
				
			||||||
#elif defined (__sun)
 | 
					#elif defined (__sun)
 | 
				
			||||||
#include <sys/byteorder.h>
 | 
					#include <sys/byteorder.h>
 | 
				
			||||||
#define bswap_16 BSWAP_16
 | 
					#define bswap_16 BSWAP_16
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,11 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_CONF_H
 | 
					#ifndef __ALSA_CONF_H
 | 
				
			||||||
#define __ALSA_CONF_H
 | 
					#define __ALSA_CONF_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,7 +38,7 @@ extern "C" {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 *  \defgroup Config Configuration Interface
 | 
					 *  \defgroup Configuration Configuration Interface
 | 
				
			||||||
 *  The configuration functions and types allow you to read, enumerate,
 | 
					 *  The configuration functions and types allow you to read, enumerate,
 | 
				
			||||||
 *  modify and write the contents of ALSA configuration files.
 | 
					 *  modify and write the contents of ALSA configuration files.
 | 
				
			||||||
 *  \{
 | 
					 *  \{
 | 
				
			||||||
| 
						 | 
					@ -109,6 +114,16 @@ int snd_config_search_definition(snd_config_t *config,
 | 
				
			||||||
				 const char *base, const char *key,
 | 
									 const char *base, const char *key,
 | 
				
			||||||
				 snd_config_t **result);
 | 
									 snd_config_t **result);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * \brief custom expansion callback
 | 
				
			||||||
 | 
					 * \param[out] dst The function puts the handle to the new configuration
 | 
				
			||||||
 | 
					 *                 node at the address specified by \a dst.
 | 
				
			||||||
 | 
					 * \param[in] s string the string to be expanded
 | 
				
			||||||
 | 
					 * \param[in] private_data Handle to the \c private_data node.
 | 
				
			||||||
 | 
					 * \return A non-negative value if successful, otherwise a negative error code.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Use a function of this type to define a custom expansion 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
typedef int (*snd_config_expand_fcn_t)(snd_config_t **dst, const char *s, void *private_data);
 | 
					typedef int (*snd_config_expand_fcn_t)(snd_config_t **dst, const char *s, void *private_data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_config_expand_custom(snd_config_t *config, snd_config_t *root,
 | 
					int snd_config_expand_custom(snd_config_t *config, snd_config_t *root,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/control.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_CONTROL_H
 | 
					#ifndef __ALSA_CONTROL_H
 | 
				
			||||||
#define __ALSA_CONTROL_H
 | 
					#define __ALSA_CONTROL_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -356,6 +362,9 @@ typedef enum _snd_ctl_type {
 | 
				
			||||||
/** Read only (flag for open mode) \hideinitializer */
 | 
					/** Read only (flag for open mode) \hideinitializer */
 | 
				
			||||||
#define SND_CTL_READONLY		0x0004
 | 
					#define SND_CTL_READONLY		0x0004
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** Return EINTR instead blocking (flag for open mode) \hideinitializer */
 | 
				
			||||||
 | 
					#define SND_CTL_EINTR			0x0080
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** CTL handle */
 | 
					/** CTL handle */
 | 
				
			||||||
typedef struct _snd_ctl snd_ctl_t;
 | 
					typedef struct _snd_ctl snd_ctl_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -371,10 +380,6 @@ int snd_card_get_index(const char *name);
 | 
				
			||||||
int snd_card_get_name(int card, char **name);
 | 
					int snd_card_get_name(int card, char **name);
 | 
				
			||||||
int snd_card_get_longname(int card, char **name);
 | 
					int snd_card_get_longname(int card, char **name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_device_name_hint(int card, const char *iface, void ***hints);
 | 
					 | 
				
			||||||
int snd_device_name_free_hint(void **hints);
 | 
					 | 
				
			||||||
char *snd_device_name_get_hint(const void *hint, const char *id);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int snd_ctl_open(snd_ctl_t **ctl, const char *name, int mode);
 | 
					int snd_ctl_open(snd_ctl_t **ctl, const char *name, int mode);
 | 
				
			||||||
int snd_ctl_open_lconf(snd_ctl_t **ctl, const char *name, int mode, snd_config_t *lconf);
 | 
					int snd_ctl_open_lconf(snd_ctl_t **ctl, const char *name, int mode, snd_config_t *lconf);
 | 
				
			||||||
int snd_ctl_open_fallback(snd_ctl_t **ctl, snd_config_t *root, const char *name, const char *orig_name, int mode);
 | 
					int snd_ctl_open_fallback(snd_ctl_t **ctl, snd_config_t *root, const char *name, const char *orig_name, int mode);
 | 
				
			||||||
| 
						 | 
					@ -415,6 +420,11 @@ int snd_ctl_rawmidi_next_device(snd_ctl_t *ctl, int * device);
 | 
				
			||||||
int snd_ctl_rawmidi_info(snd_ctl_t *ctl, snd_rawmidi_info_t * info);
 | 
					int snd_ctl_rawmidi_info(snd_ctl_t *ctl, snd_rawmidi_info_t * info);
 | 
				
			||||||
int snd_ctl_rawmidi_prefer_subdevice(snd_ctl_t *ctl, int subdev);
 | 
					int snd_ctl_rawmidi_prefer_subdevice(snd_ctl_t *ctl, int subdev);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#ifdef __ALSA_UMP_H
 | 
				
			||||||
 | 
					int snd_ctl_ump_next_device(snd_ctl_t *ctl, int *device);
 | 
				
			||||||
 | 
					int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
int snd_ctl_set_power_state(snd_ctl_t *ctl, unsigned int state);
 | 
					int snd_ctl_set_power_state(snd_ctl_t *ctl, unsigned int state);
 | 
				
			||||||
int snd_ctl_get_power_state(snd_ctl_t *ctl, unsigned int *state);
 | 
					int snd_ctl_get_power_state(snd_ctl_t *ctl, unsigned int *state);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -791,6 +801,20 @@ int snd_sctl_remove(snd_sctl_t *handle);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \} */
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 *  \defgroup Hint Name Hint Interface
 | 
				
			||||||
 | 
					 *  \ingroup Configuration
 | 
				
			||||||
 | 
					 *  The name hint interface - get descriptive information about a device
 | 
				
			||||||
 | 
					 *  (name, description, input/output).
 | 
				
			||||||
 | 
					 *  \{
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int snd_device_name_hint(int card, const char *iface, void ***hints);
 | 
				
			||||||
 | 
					int snd_device_name_free_hint(void **hints);
 | 
				
			||||||
 | 
					char *snd_device_name_get_hint(const void *hint, const char *id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,10 +23,13 @@
 | 
				
			||||||
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 | 
					 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_CONTROL_EXTERNAL_H
 | 
					#ifndef __ALSA_CONTROL_EXTERNAL_H
 | 
				
			||||||
#define __ALSA_CONTROL_EXTERNAL_H
 | 
					#define __ALSA_CONTROL_EXTERNAL_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "control.h"
 | 
					#ifndef __ASOUNDLIB_LOCAL
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/error.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_ERROR_H
 | 
					#ifndef __ALSA_ERROR_H
 | 
				
			||||||
#define __ALSA_ERROR_H
 | 
					#define __ALSA_ERROR_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,7 +46,6 @@ extern "C" {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SND_ERROR_BEGIN				500000			/**< Lower boundary of sound error codes. */
 | 
					#define SND_ERROR_BEGIN				500000			/**< Lower boundary of sound error codes. */
 | 
				
			||||||
#define SND_ERROR_INCOMPATIBLE_VERSION		(SND_ERROR_BEGIN+0)	/**< Kernel/library protocols are not compatible. */
 | 
					#define SND_ERROR_INCOMPATIBLE_VERSION		(SND_ERROR_BEGIN+0)	/**< Kernel/library protocols are not compatible. */
 | 
				
			||||||
#define SND_ERROR_ALISP_NIL			(SND_ERROR_BEGIN+1)	/**< Lisp encountered an error during acall. */
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const char *snd_strerror(int errnum);
 | 
					const char *snd_strerror(int errnum);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,12 +25,15 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/global.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_GLOBAL_H_
 | 
					#ifndef __ALSA_GLOBAL_H_
 | 
				
			||||||
#define __ALSA_GLOBAL_H_
 | 
					#define __ALSA_GLOBAL_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* for timeval and timespec */
 | 
					 | 
				
			||||||
#include <time.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					@ -51,6 +54,11 @@ const char *snd_asoundlib_version(void);
 | 
				
			||||||
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
 | 
					#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __STRING
 | 
				
			||||||
 | 
					/** \brief Return 'x' argument as string */
 | 
				
			||||||
 | 
					#define __STRING(x)     #x
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef PIC /* dynamic build */
 | 
					#ifdef PIC /* dynamic build */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
 | 
					/** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
 | 
				
			||||||
| 
						 | 
					@ -82,18 +90,13 @@ extern struct snd_dlsym_link *snd_dlsym_start;
 | 
				
			||||||
  void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) __attribute__ ((constructor)); \
 | 
					  void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) __attribute__ ((constructor)); \
 | 
				
			||||||
  void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) { \
 | 
					  void __SND_DLSYM_VERSION(snd_dlsym_constructor_, name, version) (void) { \
 | 
				
			||||||
    __SND_DLSYM_VERSION(snd_dlsym_, name, version).next = snd_dlsym_start; \
 | 
					    __SND_DLSYM_VERSION(snd_dlsym_, name, version).next = snd_dlsym_start; \
 | 
				
			||||||
    __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_name = # name; \
 | 
					    __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_name = __STRING(name); \
 | 
				
			||||||
    __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_ptr = (void *)&name; \
 | 
					    __SND_DLSYM_VERSION(snd_dlsym_, name, version).dlsym_ptr = (void *)&name; \
 | 
				
			||||||
    snd_dlsym_start = &__SND_DLSYM_VERSION(snd_dlsym_, name, version); \
 | 
					    snd_dlsym_start = &__SND_DLSYM_VERSION(snd_dlsym_, name, version); \
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __STRING
 | 
					 | 
				
			||||||
/** \brief Return 'x' argument as string */
 | 
					 | 
				
			||||||
#define __STRING(x)     #x
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/** \brief Returns the version of a dynamic symbol as a string. */
 | 
					/** \brief Returns the version of a dynamic symbol as a string. */
 | 
				
			||||||
#define SND_DLSYM_VERSION(version) __STRING(version)
 | 
					#define SND_DLSYM_VERSION(version) __STRING(version)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/hwdep.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_HWDEP_H
 | 
					#ifndef __ALSA_HWDEP_H
 | 
				
			||||||
#define __ALSA_HWDEP_H
 | 
					#define __ALSA_HWDEP_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,9 +25,17 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/input.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_INPUT_H
 | 
					#ifndef __ALSA_INPUT_H
 | 
				
			||||||
#define __ALSA_INPUT_H
 | 
					#define __ALSA_INPUT_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <stdarg.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,10 +30,16 @@
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <fcntl.h>
 | 
					#include <fcntl.h>
 | 
				
			||||||
#include <assert.h>
 | 
					#include <assert.h>
 | 
				
			||||||
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					/* for timeval and timespec */
 | 
				
			||||||
 | 
					#include <time.h>
 | 
				
			||||||
#ifdef HAVE_ENDIAN_H
 | 
					#ifdef HAVE_ENDIAN_H
 | 
				
			||||||
#include <endian.h>
 | 
					#include <endian.h>
 | 
				
			||||||
#elif defined(HAVE_SYS_ENDIAN_H)
 | 
					#elif defined(HAVE_SYS_ENDIAN_H)
 | 
				
			||||||
#include <sys/endian.h>
 | 
					#include <sys/endian.h>
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					#error Header defining endianness not defined
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#ifndef __BYTE_ORDER
 | 
					#ifndef __BYTE_ORDER
 | 
				
			||||||
#define __BYTE_ORDER BYTE_ORDER
 | 
					#define __BYTE_ORDER BYTE_ORDER
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					@ -43,9 +49,6 @@
 | 
				
			||||||
#ifndef __BIG_ENDIAN
 | 
					#ifndef __BIG_ENDIAN
 | 
				
			||||||
#define __BIG_ENDIAN BIG_ENDIAN
 | 
					#define __BIG_ENDIAN BIG_ENDIAN
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
#error Header defining endianness not defined
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#include <stdarg.h>
 | 
					#include <stdarg.h>
 | 
				
			||||||
#include <poll.h>
 | 
					#include <poll.h>
 | 
				
			||||||
#include <sys/types.h>
 | 
					#include <sys/types.h>
 | 
				
			||||||
| 
						 | 
					@ -69,9 +72,11 @@
 | 
				
			||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
 | 
					#if __BYTE_ORDER == __LITTLE_ENDIAN
 | 
				
			||||||
#define SND_LITTLE_ENDIAN
 | 
					#define SND_LITTLE_ENDIAN
 | 
				
			||||||
#define SNDRV_LITTLE_ENDIAN
 | 
					#define SNDRV_LITTLE_ENDIAN
 | 
				
			||||||
 | 
					#define SNDRV_LITTLE_ENDIAN_BITFIELD
 | 
				
			||||||
#elif __BYTE_ORDER == __BIG_ENDIAN
 | 
					#elif __BYTE_ORDER == __BIG_ENDIAN
 | 
				
			||||||
#define SND_BIG_ENDIAN
 | 
					#define SND_BIG_ENDIAN
 | 
				
			||||||
#define SNDRV_BIG_ENDIAN
 | 
					#define SNDRV_BIG_ENDIAN
 | 
				
			||||||
 | 
					#define SNDRV_BIG_ENDIAN_BITFIELD
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#error "Unsupported endian..."
 | 
					#error "Unsupported endian..."
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					@ -84,6 +89,9 @@
 | 
				
			||||||
#define scandir64 scandir
 | 
					#define scandir64 scandir
 | 
				
			||||||
#define versionsort64 versionsort
 | 
					#define versionsort64 versionsort
 | 
				
			||||||
#define alphasort64 alphasort
 | 
					#define alphasort64 alphasort
 | 
				
			||||||
 | 
					#define ino64_t ino_t
 | 
				
			||||||
 | 
					#define fstat64 fstat
 | 
				
			||||||
 | 
					#define stat64 stat
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define _snd_config_iterator list_head
 | 
					#define _snd_config_iterator list_head
 | 
				
			||||||
| 
						 | 
					@ -177,10 +185,12 @@
 | 
				
			||||||
#include "pcm.h"
 | 
					#include "pcm.h"
 | 
				
			||||||
#include "pcm_plugin.h"
 | 
					#include "pcm_plugin.h"
 | 
				
			||||||
#include "rawmidi.h"
 | 
					#include "rawmidi.h"
 | 
				
			||||||
 | 
					#include "ump.h"
 | 
				
			||||||
#include "timer.h"
 | 
					#include "timer.h"
 | 
				
			||||||
#include "hwdep.h"
 | 
					#include "hwdep.h"
 | 
				
			||||||
#include "control.h"
 | 
					#include "control.h"
 | 
				
			||||||
#include "mixer.h"
 | 
					#include "mixer.h"
 | 
				
			||||||
 | 
					#include "ump_msg.h"
 | 
				
			||||||
#include "seq_event.h"
 | 
					#include "seq_event.h"
 | 
				
			||||||
#include "seq.h"
 | 
					#include "seq.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -190,7 +200,9 @@
 | 
				
			||||||
#define snd_seq_real_time	sndrv_seq_real_time
 | 
					#define snd_seq_real_time	sndrv_seq_real_time
 | 
				
			||||||
#define snd_seq_timestamp	sndrv_seq_timestamp
 | 
					#define snd_seq_timestamp	sndrv_seq_timestamp
 | 
				
			||||||
#define snd_seq_event_type_t	sndrv_seq_event_type_t
 | 
					#define snd_seq_event_type_t	sndrv_seq_event_type_t
 | 
				
			||||||
 | 
					#define snd_seq_event_data	sndrv_seq_event_data
 | 
				
			||||||
#define snd_seq_event		sndrv_seq_event
 | 
					#define snd_seq_event		sndrv_seq_event
 | 
				
			||||||
 | 
					#define snd_seq_ump_event	sndrv_seq_ump_event
 | 
				
			||||||
#define snd_seq_connect		sndrv_seq_connect
 | 
					#define snd_seq_connect		sndrv_seq_connect
 | 
				
			||||||
#define snd_seq_ev_note		sndrv_seq_ev_note
 | 
					#define snd_seq_ev_note		sndrv_seq_ev_note
 | 
				
			||||||
#define snd_seq_ev_ctrl		sndrv_seq_ev_ctrl
 | 
					#define snd_seq_ev_ctrl		sndrv_seq_ev_ctrl
 | 
				
			||||||
| 
						 | 
					@ -200,6 +212,7 @@
 | 
				
			||||||
#define snd_seq_result		sndrv_seq_result
 | 
					#define snd_seq_result		sndrv_seq_result
 | 
				
			||||||
#define snd_seq_queue_skew	sndrv_seq_queue_skew
 | 
					#define snd_seq_queue_skew	sndrv_seq_queue_skew
 | 
				
			||||||
#define snd_seq_ev_queue_control	sndrv_seq_ev_queue_control
 | 
					#define snd_seq_ev_queue_control	sndrv_seq_ev_queue_control
 | 
				
			||||||
 | 
					#define snd_seq_ev_ump_notify	sndrv_seq_ev_ump_notify
 | 
				
			||||||
#define snd_seq_client_t	sndrv_seq_client_t
 | 
					#define snd_seq_client_t	sndrv_seq_client_t
 | 
				
			||||||
#define snd_seq_client_type_t	sndrv_seq_client_type_t
 | 
					#define snd_seq_client_type_t	sndrv_seq_client_type_t
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -254,6 +267,7 @@ int _snd_safe_strtod(const char *str, double *val);
 | 
				
			||||||
int snd_send_fd(int sock, void *data, size_t len, int fd);
 | 
					int snd_send_fd(int sock, void *data, size_t len, int fd);
 | 
				
			||||||
int snd_receive_fd(int sock, void *data, size_t len, int *fd);
 | 
					int snd_receive_fd(int sock, void *data, size_t len, int *fd);
 | 
				
			||||||
size_t snd_strlcpy(char *dst, const char *src, size_t size);
 | 
					size_t snd_strlcpy(char *dst, const char *src, size_t size);
 | 
				
			||||||
 | 
					size_t snd_strlcat(char *dst, const char *src, size_t size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * error messages
 | 
					 * error messages
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/mixer.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_MIXER_H
 | 
					#ifndef __ALSA_MIXER_H
 | 
				
			||||||
#define __ALSA_MIXER_H
 | 
					#define __ALSA_MIXER_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,7 +53,7 @@ typedef struct _snd_mixer_elem snd_mixer_elem_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** 
 | 
					/** 
 | 
				
			||||||
 * \brief Mixer callback function
 | 
					 * \brief Mixer callback function
 | 
				
			||||||
 * \param mixer Mixer handle
 | 
					 * \param ctl Mixer handle
 | 
				
			||||||
 * \param mask event mask
 | 
					 * \param mask event mask
 | 
				
			||||||
 * \param elem related mixer element (if any)
 | 
					 * \param elem related mixer element (if any)
 | 
				
			||||||
 * \return 0 on success otherwise a negative error code
 | 
					 * \return 0 on success otherwise a negative error code
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,10 +97,10 @@ struct sm_elem_ops {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_mixer_selem_compare(const snd_mixer_elem_t *c1, const snd_mixer_elem_t *c2);
 | 
					int snd_mixer_selem_compare(const snd_mixer_elem_t *c1, const snd_mixer_elem_t *c2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_mixer_sbasic_info(const snd_mixer_class_t *class, sm_class_basic_t *info);
 | 
					int snd_mixer_sbasic_info(const snd_mixer_class_t *mixer_class, sm_class_basic_t *info);
 | 
				
			||||||
void *snd_mixer_sbasic_get_private(const snd_mixer_class_t *class);
 | 
					void *snd_mixer_sbasic_get_private(const snd_mixer_class_t *mixer_class);
 | 
				
			||||||
void snd_mixer_sbasic_set_private(const snd_mixer_class_t *class, void *private_data);
 | 
					void snd_mixer_sbasic_set_private(const snd_mixer_class_t *mixer_class, void *private_data);
 | 
				
			||||||
void snd_mixer_sbasic_set_private_free(const snd_mixer_class_t *class, void (*private_free)(snd_mixer_class_t *class));
 | 
					void snd_mixer_sbasic_set_private_free(const snd_mixer_class_t *mixer_class, void (*private_free)(snd_mixer_class_t *mixer_class));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \} */
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/input.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_OUTPUT_H
 | 
					#ifndef __ALSA_OUTPUT_H
 | 
				
			||||||
#define __ALSA_OUTPUT_H
 | 
					#define __ALSA_OUTPUT_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,6 +26,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/pcm.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_PCM_H
 | 
					#ifndef __ALSA_PCM_H
 | 
				
			||||||
#define __ALSA_PCM_H
 | 
					#define __ALSA_PCM_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,8 +39,6 @@
 | 
				
			||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <stdint.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 *  \defgroup PCM PCM Interface
 | 
					 *  \defgroup PCM PCM Interface
 | 
				
			||||||
 *  See the \ref pcm page for more details.
 | 
					 *  See the \ref pcm page for more details.
 | 
				
			||||||
| 
						 | 
					@ -282,9 +286,17 @@ typedef enum _snd_pcm_format {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** PCM sample subformat */
 | 
					/** PCM sample subformat */
 | 
				
			||||||
typedef enum _snd_pcm_subformat {
 | 
					typedef enum _snd_pcm_subformat {
 | 
				
			||||||
 | 
						/** Unknown */
 | 
				
			||||||
 | 
						SND_PCM_SUBFORMAT_UNKNOWN = -1,
 | 
				
			||||||
	/** Standard */
 | 
						/** Standard */
 | 
				
			||||||
	SND_PCM_SUBFORMAT_STD = 0,
 | 
						SND_PCM_SUBFORMAT_STD = 0,
 | 
				
			||||||
	SND_PCM_SUBFORMAT_LAST = SND_PCM_SUBFORMAT_STD
 | 
						/** Maximum bits based on PCM format */
 | 
				
			||||||
 | 
						SND_PCM_SUBFORMAT_MSBITS_MAX = 1,
 | 
				
			||||||
 | 
						/** 20 most significant bits */
 | 
				
			||||||
 | 
						SND_PCM_SUBFORMAT_MSBITS_20 = 2,
 | 
				
			||||||
 | 
						/** 24 most significant bits */
 | 
				
			||||||
 | 
						SND_PCM_SUBFORMAT_MSBITS_24 = 3,
 | 
				
			||||||
 | 
						SND_PCM_SUBFORMAT_LAST = SND_PCM_SUBFORMAT_MSBITS_24
 | 
				
			||||||
} snd_pcm_subformat_t;
 | 
					} snd_pcm_subformat_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** PCM state */
 | 
					/** PCM state */
 | 
				
			||||||
| 
						 | 
					@ -343,6 +355,7 @@ typedef enum _snd_pcm_tstamp {
 | 
				
			||||||
	SND_PCM_TSTAMP_LAST = SND_PCM_TSTAMP_ENABLE
 | 
						SND_PCM_TSTAMP_LAST = SND_PCM_TSTAMP_ENABLE
 | 
				
			||||||
} snd_pcm_tstamp_t;
 | 
					} snd_pcm_tstamp_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** PCM timestamp type */
 | 
				
			||||||
typedef enum _snd_pcm_tstamp_type {
 | 
					typedef enum _snd_pcm_tstamp_type {
 | 
				
			||||||
	SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0,	/**< gettimeofday equivalent */
 | 
						SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0,	/**< gettimeofday equivalent */
 | 
				
			||||||
	SND_PCM_TSTAMP_TYPE_MONOTONIC,	/**< posix_clock_monotonic equivalent */
 | 
						SND_PCM_TSTAMP_TYPE_MONOTONIC,	/**< posix_clock_monotonic equivalent */
 | 
				
			||||||
| 
						 | 
					@ -350,6 +363,7 @@ typedef enum _snd_pcm_tstamp_type {
 | 
				
			||||||
	SND_PCM_TSTAMP_TYPE_LAST = SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
 | 
						SND_PCM_TSTAMP_TYPE_LAST = SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
 | 
				
			||||||
} snd_pcm_tstamp_type_t;
 | 
					} snd_pcm_tstamp_type_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** PCM audio timestamp type */
 | 
				
			||||||
typedef enum _snd_pcm_audio_tstamp_type {
 | 
					typedef enum _snd_pcm_audio_tstamp_type {
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
	 * first definition for backwards compatibility only,
 | 
						 * first definition for backwards compatibility only,
 | 
				
			||||||
| 
						 | 
					@ -364,24 +378,22 @@ typedef enum _snd_pcm_audio_tstamp_type {
 | 
				
			||||||
	SND_PCM_AUDIO_TSTAMP_TYPE_LAST = SND_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
 | 
						SND_PCM_AUDIO_TSTAMP_TYPE_LAST = SND_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
 | 
				
			||||||
} snd_pcm_audio_tstamp_type_t;
 | 
					} snd_pcm_audio_tstamp_type_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** PCM audio timestamp config */
 | 
				
			||||||
typedef struct _snd_pcm_audio_tstamp_config {
 | 
					typedef struct _snd_pcm_audio_tstamp_config {
 | 
				
			||||||
	/* 5 of max 16 bits used */
 | 
						/* 5 of max 16 bits used */
 | 
				
			||||||
	unsigned int type_requested:4;
 | 
						unsigned int type_requested:4; /**< requested audio tstamp type */
 | 
				
			||||||
	unsigned int report_delay:1; /* add total delay to A/D or D/A */
 | 
						unsigned int report_delay:1; /**< add total delay to A/D or D/A */
 | 
				
			||||||
} snd_pcm_audio_tstamp_config_t;
 | 
					} snd_pcm_audio_tstamp_config_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** PCM audio timestamp report */
 | 
				
			||||||
typedef struct _snd_pcm_audio_tstamp_report {
 | 
					typedef struct _snd_pcm_audio_tstamp_report {
 | 
				
			||||||
	/* 6 of max 16 bits used for bit-fields */
 | 
						/* 6 of max 16 bits used for bit-fields */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* for backwards compatibility */
 | 
						unsigned int valid:1; /**< for backwards compatibility */
 | 
				
			||||||
	unsigned int valid:1;
 | 
						unsigned int actual_type:4; /**< actual type if hardware could not support requested timestamp */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* actual type if hardware could not support requested timestamp */
 | 
						unsigned int accuracy_report:1; /**< 0 if accuracy unknown, 1 if accuracy field is valid */
 | 
				
			||||||
	unsigned int actual_type:4;
 | 
						unsigned int accuracy; /**< up to 4.29s in ns units, will be packed in separate field  */
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* accuracy represented in ns units */
 | 
					 | 
				
			||||||
	unsigned int accuracy_report:1; /* 0 if accuracy unknown, 1 if accuracy field is valid */
 | 
					 | 
				
			||||||
	unsigned int accuracy; /* up to 4.29s, will be packed in separate field  */
 | 
					 | 
				
			||||||
} snd_pcm_audio_tstamp_report_t;
 | 
					} snd_pcm_audio_tstamp_report_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Unsigned frames quantity */
 | 
					/** Unsigned frames quantity */
 | 
				
			||||||
| 
						 | 
					@ -393,6 +405,8 @@ typedef long snd_pcm_sframes_t;
 | 
				
			||||||
#define SND_PCM_NONBLOCK		0x00000001
 | 
					#define SND_PCM_NONBLOCK		0x00000001
 | 
				
			||||||
/** Async notification (flag for open mode) \hideinitializer */
 | 
					/** Async notification (flag for open mode) \hideinitializer */
 | 
				
			||||||
#define SND_PCM_ASYNC			0x00000002
 | 
					#define SND_PCM_ASYNC			0x00000002
 | 
				
			||||||
 | 
					/** Return EINTR instead blocking (wait operation) */
 | 
				
			||||||
 | 
					#define SND_PCM_EINTR			0x00000080
 | 
				
			||||||
/** In an abort state (internal, not allowed for open) */
 | 
					/** In an abort state (internal, not allowed for open) */
 | 
				
			||||||
#define SND_PCM_ABORT			0x00008000
 | 
					#define SND_PCM_ABORT			0x00008000
 | 
				
			||||||
/** Disable automatic (but not forced!) rate resamplinig */
 | 
					/** Disable automatic (but not forced!) rate resamplinig */
 | 
				
			||||||
| 
						 | 
					@ -498,6 +512,16 @@ typedef union _snd_pcm_sync_id {
 | 
				
			||||||
	unsigned int id32[4];
 | 
						unsigned int id32[4];
 | 
				
			||||||
} snd_pcm_sync_id_t;
 | 
					} snd_pcm_sync_id_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** synchronization ID size (see snd_pcm_hw_params_get_sync) */
 | 
				
			||||||
 | 
					#define SND_PCM_HW_PARAMS_SYNC_SIZE	16
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** Infinite wait for snd_pcm_wait() */
 | 
				
			||||||
 | 
					#define SND_PCM_WAIT_INFINITE		(-1)
 | 
				
			||||||
 | 
					/** Wait for next i/o in snd_pcm_wait() */
 | 
				
			||||||
 | 
					#define SND_PCM_WAIT_IO			(-10001)
 | 
				
			||||||
 | 
					/** Wait for drain in snd_pcm_wait() */
 | 
				
			||||||
 | 
					#define SND_PCM_WAIT_DRAIN		(-10002)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** #SND_PCM_TYPE_METER scope handle */
 | 
					/** #SND_PCM_TYPE_METER scope handle */
 | 
				
			||||||
typedef struct _snd_pcm_scope snd_pcm_scope_t;
 | 
					typedef struct _snd_pcm_scope snd_pcm_scope_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -722,6 +746,7 @@ int snd_pcm_hw_params_is_half_duplex(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
int snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
int snd_pcm_hw_params_can_disable_period_wakeup(const snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_can_disable_period_wakeup(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
 | 
					int snd_pcm_hw_params_is_perfect_drain(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
int snd_pcm_hw_params_supports_audio_wallclock_ts(const snd_pcm_hw_params_t *params); /* deprecated, use audio_ts_type */
 | 
					int snd_pcm_hw_params_supports_audio_wallclock_ts(const snd_pcm_hw_params_t *params); /* deprecated, use audio_ts_type */
 | 
				
			||||||
int snd_pcm_hw_params_supports_audio_ts_type(const snd_pcm_hw_params_t *params, int type);
 | 
					int snd_pcm_hw_params_supports_audio_ts_type(const snd_pcm_hw_params_t *params, int type);
 | 
				
			||||||
int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params,
 | 
					int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params,
 | 
				
			||||||
| 
						 | 
					@ -729,6 +754,7 @@ int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t *params,
 | 
				
			||||||
				      unsigned int *rate_den);
 | 
									      unsigned int *rate_den);
 | 
				
			||||||
int snd_pcm_hw_params_get_sbits(const snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_get_sbits(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
int snd_pcm_hw_params_get_fifo_size(const snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_get_fifo_size(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
 | 
					const unsigned char * snd_pcm_hw_params_get_sync(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if 0
 | 
					#if 0
 | 
				
			||||||
typedef struct _snd_pcm_hw_strategy snd_pcm_hw_strategy_t;
 | 
					typedef struct _snd_pcm_hw_strategy snd_pcm_hw_strategy_t;
 | 
				
			||||||
| 
						 | 
					@ -821,6 +847,8 @@ int snd_pcm_hw_params_set_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *par
 | 
				
			||||||
int snd_pcm_hw_params_get_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
 | 
					int snd_pcm_hw_params_get_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
 | 
				
			||||||
int snd_pcm_hw_params_set_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
 | 
					int snd_pcm_hw_params_set_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
 | 
				
			||||||
int snd_pcm_hw_params_get_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
 | 
					int snd_pcm_hw_params_get_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
 | 
				
			||||||
 | 
					int snd_pcm_hw_params_set_drain_silence(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
 | 
				
			||||||
 | 
					int snd_pcm_hw_params_get_drain_silence(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
 | 
					int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
 | 
				
			||||||
int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
 | 
					int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
 | 
				
			||||||
| 
						 | 
					@ -1080,6 +1108,7 @@ const char *snd_pcm_format_name(const snd_pcm_format_t format);
 | 
				
			||||||
const char *snd_pcm_format_description(const snd_pcm_format_t format);
 | 
					const char *snd_pcm_format_description(const snd_pcm_format_t format);
 | 
				
			||||||
const char *snd_pcm_subformat_name(const snd_pcm_subformat_t subformat);
 | 
					const char *snd_pcm_subformat_name(const snd_pcm_subformat_t subformat);
 | 
				
			||||||
const char *snd_pcm_subformat_description(const snd_pcm_subformat_t subformat);
 | 
					const char *snd_pcm_subformat_description(const snd_pcm_subformat_t subformat);
 | 
				
			||||||
 | 
					snd_pcm_subformat_t snd_pcm_subformat_value(const char* name);
 | 
				
			||||||
snd_pcm_format_t snd_pcm_format_value(const char* name);
 | 
					snd_pcm_format_t snd_pcm_format_value(const char* name);
 | 
				
			||||||
const char *snd_pcm_tstamp_mode_name(const snd_pcm_tstamp_t mode);
 | 
					const char *snd_pcm_tstamp_mode_name(const snd_pcm_tstamp_t mode);
 | 
				
			||||||
const char *snd_pcm_state_name(const snd_pcm_state_t state);
 | 
					const char *snd_pcm_state_name(const snd_pcm_state_t state);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,7 +26,9 @@
 | 
				
			||||||
#ifndef __ALSA_PCM_EXTERNAL_H
 | 
					#ifndef __ALSA_PCM_EXTERNAL_H
 | 
				
			||||||
#define __ALSA_PCM_EXTERNAL_H
 | 
					#define __ALSA_PCM_EXTERNAL_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "pcm.h"
 | 
					#ifndef __ASOUNDLIB_LOCAL
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,6 +28,11 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ALSA_PCM_EXTERNAL_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					#warning "use #include <alsa/pcm_external.h>, <alsa/pcm_extplug.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/pcm_external.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_PCM_EXTPLUG_H
 | 
					#ifndef __ALSA_PCM_EXTPLUG_H
 | 
				
			||||||
#define __ALSA_PCM_EXTPLUG_H
 | 
					#define __ALSA_PCM_EXTPLUG_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,6 +28,11 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ALSA_PCM_EXTERNAL_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					#warning "use #include <alsa/pcm_external.h>, <alsa/pcm_ioplug.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/pcm_external.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_PCM_IOPLUG_H
 | 
					#ifndef __ALSA_PCM_IOPLUG_H
 | 
				
			||||||
#define __ALSA_PCM_IOPLUG_H
 | 
					#define __ALSA_PCM_IOPLUG_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,20 @@
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#error "use #include <alsa/asoundlib.h>, <alsa/pcm_old.h> should not be used directly"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Old ALSA 0.9.x API
 | 
					 * Old ALSA 0.9.x API
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define ___symbol_version(name, version) \
 | 
				
			||||||
 | 
						__asm__ (".symver " #name "," #name "@" version)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef ALSA_PCM_OLD_HW_PARAMS_API
 | 
					#ifdef ALSA_PCM_OLD_HW_PARAMS_API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_access,snd_pcm_hw_params_get_access@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_access, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_access_first,snd_pcm_hw_params_set_access_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_access_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_access_last,snd_pcm_hw_params_set_access_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_access_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_get_access(const snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_get_access(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
int snd_pcm_hw_params_test_access(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t val);
 | 
					int snd_pcm_hw_params_test_access(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t val);
 | 
				
			||||||
| 
						 | 
					@ -16,9 +24,9 @@ snd_pcm_access_t snd_pcm_hw_params_set_access_last(snd_pcm_t *pcm, snd_pcm_hw_pa
 | 
				
			||||||
int snd_pcm_hw_params_set_access_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask);
 | 
					int snd_pcm_hw_params_set_access_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask);
 | 
				
			||||||
void snd_pcm_hw_params_get_access_mask(snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask);
 | 
					void snd_pcm_hw_params_get_access_mask(snd_pcm_hw_params_t *params, snd_pcm_access_mask_t *mask);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_format,snd_pcm_hw_params_get_format@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_format, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_format_first,snd_pcm_hw_params_set_format_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_format_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_format_last,snd_pcm_hw_params_set_format_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_format_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_get_format(const snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_get_format(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
int snd_pcm_hw_params_test_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val);
 | 
					int snd_pcm_hw_params_test_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val);
 | 
				
			||||||
| 
						 | 
					@ -28,9 +36,9 @@ snd_pcm_format_t snd_pcm_hw_params_set_format_last(snd_pcm_t *pcm, snd_pcm_hw_pa
 | 
				
			||||||
int snd_pcm_hw_params_set_format_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask);
 | 
					int snd_pcm_hw_params_set_format_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask);
 | 
				
			||||||
void snd_pcm_hw_params_get_format_mask(snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask);
 | 
					void snd_pcm_hw_params_get_format_mask(snd_pcm_hw_params_t *params, snd_pcm_format_mask_t *mask);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_subformat,snd_pcm_hw_params_get_subformat@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_subformat, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_subformat_first,snd_pcm_hw_params_set_subformat_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_subformat_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_subformat_last,snd_pcm_hw_params_set_subformat_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_subformat_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_test_subformat(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t val);
 | 
					int snd_pcm_hw_params_test_subformat(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_t val);
 | 
				
			||||||
int snd_pcm_hw_params_get_subformat(const snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_get_subformat(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
| 
						 | 
					@ -40,12 +48,12 @@ snd_pcm_subformat_t snd_pcm_hw_params_set_subformat_last(snd_pcm_t *pcm, snd_pcm
 | 
				
			||||||
int snd_pcm_hw_params_set_subformat_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask);
 | 
					int snd_pcm_hw_params_set_subformat_mask(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask);
 | 
				
			||||||
void snd_pcm_hw_params_get_subformat_mask(snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask);
 | 
					void snd_pcm_hw_params_get_subformat_mask(snd_pcm_hw_params_t *params, snd_pcm_subformat_mask_t *mask);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_channels,snd_pcm_hw_params_get_channels@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_channels, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_channels_min,snd_pcm_hw_params_get_channels_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_channels_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_channels_max,snd_pcm_hw_params_get_channels_max@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_channels_max, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_channels_near,snd_pcm_hw_params_set_channels_near@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_channels_near, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_channels_first,snd_pcm_hw_params_set_channels_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_channels_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_channels_last,snd_pcm_hw_params_set_channels_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_channels_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_get_channels(const snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_get_channels(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
unsigned int snd_pcm_hw_params_get_channels_min(const snd_pcm_hw_params_t *params);
 | 
					unsigned int snd_pcm_hw_params_get_channels_min(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
| 
						 | 
					@ -59,12 +67,12 @@ unsigned int snd_pcm_hw_params_set_channels_near(snd_pcm_t *pcm, snd_pcm_hw_para
 | 
				
			||||||
unsigned int snd_pcm_hw_params_set_channels_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
					unsigned int snd_pcm_hw_params_set_channels_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
				
			||||||
unsigned int snd_pcm_hw_params_set_channels_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
					unsigned int snd_pcm_hw_params_set_channels_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_rate,snd_pcm_hw_params_get_rate@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_rate, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_rate_min,snd_pcm_hw_params_get_rate_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_rate_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_rate_max,snd_pcm_hw_params_get_rate_max@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_rate_max, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_rate_near,snd_pcm_hw_params_set_rate_near@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_rate_near, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_rate_first,snd_pcm_hw_params_set_rate_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_rate_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_rate_last,snd_pcm_hw_params_set_rate_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_rate_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_get_rate(const snd_pcm_hw_params_t *params, int *dir);
 | 
					int snd_pcm_hw_params_get_rate(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
unsigned int snd_pcm_hw_params_get_rate_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_get_rate_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
| 
						 | 
					@ -80,12 +88,12 @@ unsigned int snd_pcm_hw_params_set_rate_last(snd_pcm_t *pcm, snd_pcm_hw_params_t
 | 
				
			||||||
int snd_pcm_hw_params_set_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
 | 
					int snd_pcm_hw_params_set_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
 | 
				
			||||||
int snd_pcm_hw_params_get_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
 | 
					int snd_pcm_hw_params_get_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_period_time,snd_pcm_hw_params_get_period_time@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_period_time, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_period_time_min,snd_pcm_hw_params_get_period_time_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_period_time_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_period_time_max,snd_pcm_hw_params_get_period_time_max@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_period_time_max, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_period_time_near,snd_pcm_hw_params_set_period_time_near@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_period_time_near, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_period_time_first,snd_pcm_hw_params_set_period_time_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_period_time_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_period_time_last,snd_pcm_hw_params_set_period_time_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_period_time_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, int *dir);
 | 
					int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
unsigned int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
| 
						 | 
					@ -99,12 +107,12 @@ unsigned int snd_pcm_hw_params_set_period_time_near(snd_pcm_t *pcm, snd_pcm_hw_p
 | 
				
			||||||
unsigned int snd_pcm_hw_params_set_period_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_set_period_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
unsigned int snd_pcm_hw_params_set_period_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_set_period_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_period_size,snd_pcm_hw_params_get_period_size@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_period_size, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_period_size_min,snd_pcm_hw_params_get_period_size_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_period_size_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_period_size_max,snd_pcm_hw_params_get_period_size_max@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_period_size_max, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_period_size_near,snd_pcm_hw_params_set_period_size_near@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_period_size_near, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_period_size_first,snd_pcm_hw_params_set_period_size_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_period_size_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_period_size_last,snd_pcm_hw_params_set_period_size_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_period_size_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
snd_pcm_sframes_t snd_pcm_hw_params_get_period_size(const snd_pcm_hw_params_t *params, int *dir);
 | 
					snd_pcm_sframes_t snd_pcm_hw_params_get_period_size(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
snd_pcm_uframes_t snd_pcm_hw_params_get_period_size_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
					snd_pcm_uframes_t snd_pcm_hw_params_get_period_size_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
| 
						 | 
					@ -119,12 +127,12 @@ snd_pcm_uframes_t snd_pcm_hw_params_set_period_size_first(snd_pcm_t *pcm, snd_pc
 | 
				
			||||||
snd_pcm_uframes_t snd_pcm_hw_params_set_period_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
					snd_pcm_uframes_t snd_pcm_hw_params_set_period_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
int snd_pcm_hw_params_set_period_size_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_set_period_size_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_periods,snd_pcm_hw_params_get_periods@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_periods, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_periods_min,snd_pcm_hw_params_get_periods_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_periods_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_periods_max,snd_pcm_hw_params_get_periods_max@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_periods_max, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_periods_near,snd_pcm_hw_params_set_periods_near@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_periods_near, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_periods_first,snd_pcm_hw_params_set_periods_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_periods_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_periods_last,snd_pcm_hw_params_set_periods_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_periods_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_get_periods(const snd_pcm_hw_params_t *params, int *dir);
 | 
					int snd_pcm_hw_params_get_periods(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
unsigned int snd_pcm_hw_params_get_periods_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_get_periods_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
| 
						 | 
					@ -139,12 +147,12 @@ unsigned int snd_pcm_hw_params_set_periods_first(snd_pcm_t *pcm, snd_pcm_hw_para
 | 
				
			||||||
unsigned int snd_pcm_hw_params_set_periods_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_set_periods_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
int snd_pcm_hw_params_set_periods_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
					int snd_pcm_hw_params_set_periods_integer(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_buffer_time,snd_pcm_hw_params_get_buffer_time@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_buffer_time, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_buffer_time_min,snd_pcm_hw_params_get_buffer_time_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_buffer_time_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_buffer_time_max,snd_pcm_hw_params_get_buffer_time_max@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_buffer_time_max, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_buffer_time_near,snd_pcm_hw_params_set_buffer_time_near@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_buffer_time_near, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_buffer_time_first,snd_pcm_hw_params_set_buffer_time_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_buffer_time_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_buffer_time_last,snd_pcm_hw_params_set_buffer_time_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_buffer_time_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_get_buffer_time(const snd_pcm_hw_params_t *params, int *dir);
 | 
					int snd_pcm_hw_params_get_buffer_time(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
unsigned int snd_pcm_hw_params_get_buffer_time_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_get_buffer_time_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
| 
						 | 
					@ -158,12 +166,12 @@ unsigned int snd_pcm_hw_params_set_buffer_time_near(snd_pcm_t *pcm, snd_pcm_hw_p
 | 
				
			||||||
unsigned int snd_pcm_hw_params_set_buffer_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_set_buffer_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
unsigned int snd_pcm_hw_params_set_buffer_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_set_buffer_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_buffer_size,snd_pcm_hw_params_get_buffer_size@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_buffer_size, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_buffer_size_min,snd_pcm_hw_params_get_buffer_size_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_buffer_size_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_buffer_size_max,snd_pcm_hw_params_get_buffer_size_max@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_buffer_size_max, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_buffer_size_near,snd_pcm_hw_params_set_buffer_size_near@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_buffer_size_near, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_buffer_size_first,snd_pcm_hw_params_set_buffer_size_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_buffer_size_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_buffer_size_last,snd_pcm_hw_params_set_buffer_size_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_buffer_size_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
snd_pcm_sframes_t snd_pcm_hw_params_get_buffer_size(const snd_pcm_hw_params_t *params);
 | 
					snd_pcm_sframes_t snd_pcm_hw_params_get_buffer_size(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
snd_pcm_uframes_t snd_pcm_hw_params_get_buffer_size_min(const snd_pcm_hw_params_t *params);
 | 
					snd_pcm_uframes_t snd_pcm_hw_params_get_buffer_size_min(const snd_pcm_hw_params_t *params);
 | 
				
			||||||
| 
						 | 
					@ -177,12 +185,12 @@ snd_pcm_uframes_t snd_pcm_hw_params_set_buffer_size_near(snd_pcm_t *pcm, snd_pcm
 | 
				
			||||||
snd_pcm_uframes_t snd_pcm_hw_params_set_buffer_size_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
					snd_pcm_uframes_t snd_pcm_hw_params_set_buffer_size_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
				
			||||||
snd_pcm_uframes_t snd_pcm_hw_params_set_buffer_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
					snd_pcm_uframes_t snd_pcm_hw_params_set_buffer_size_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_tick_time,snd_pcm_hw_params_get_tick_time@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_tick_time, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_tick_time_min,snd_pcm_hw_params_get_tick_time_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_tick_time_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_get_tick_time_max,snd_pcm_hw_params_get_tick_time_max@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_get_tick_time_max, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_tick_time_near,snd_pcm_hw_params_set_tick_time_near@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_tick_time_near, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_tick_time_first,snd_pcm_hw_params_set_tick_time_first@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_tick_time_first, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_hw_params_set_tick_time_last,snd_pcm_hw_params_set_tick_time_last@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_hw_params_set_tick_time_last, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_hw_params_get_tick_time(const snd_pcm_hw_params_t *params, int *dir);
 | 
					int snd_pcm_hw_params_get_tick_time(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
unsigned int snd_pcm_hw_params_get_tick_time_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
					unsigned int snd_pcm_hw_params_get_tick_time_min(const snd_pcm_hw_params_t *params, int *dir);
 | 
				
			||||||
| 
						 | 
					@ -201,14 +209,14 @@ unsigned int snd_pcm_hw_params_set_tick_time_last(snd_pcm_t *pcm, snd_pcm_hw_par
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef ALSA_PCM_OLD_SW_PARAMS_API
 | 
					#ifdef ALSA_PCM_OLD_SW_PARAMS_API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
asm(".symver snd_pcm_sw_params_get_tstamp_mode,snd_pcm_sw_params_get_tstamp_mode@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_sw_params_get_tstamp_mode, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_sw_params_get_sleep_min,snd_pcm_sw_params_get_sleep_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_sw_params_get_sleep_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_sw_params_get_avail_min,snd_pcm_sw_params_get_avail_min@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_sw_params_get_avail_min, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_sw_params_get_xfer_align,snd_pcm_sw_params_get_xfer_align@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_sw_params_get_xfer_align, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_sw_params_get_start_threshold,snd_pcm_sw_params_get_start_threshold@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_sw_params_get_start_threshold, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_sw_params_get_stop_threshold,snd_pcm_sw_params_get_stop_threshold@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_sw_params_get_stop_threshold, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_sw_params_get_silence_threshold,snd_pcm_sw_params_get_silence_threshold@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_sw_params_get_silence_threshold, "ALSA_0.9");
 | 
				
			||||||
asm(".symver snd_pcm_sw_params_get_silence_size,snd_pcm_sw_params_get_silence_size@ALSA_0.9");
 | 
					___symbol_version(snd_pcm_sw_params_get_silence_size, "ALSA_0.9");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_pcm_sw_params_set_tstamp_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_tstamp_t val);
 | 
					int snd_pcm_sw_params_set_tstamp_mode(snd_pcm_t *pcm, snd_pcm_sw_params_t *params, snd_pcm_tstamp_t val);
 | 
				
			||||||
snd_pcm_tstamp_t snd_pcm_sw_params_get_tstamp_mode(const snd_pcm_sw_params_t *params);
 | 
					snd_pcm_tstamp_t snd_pcm_sw_params_get_tstamp_mode(const snd_pcm_sw_params_t *params);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -133,6 +133,19 @@ int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, const char *name,
 | 
				
			||||||
			snd_config_t *root, snd_config_t *conf,
 | 
								snd_config_t *root, snd_config_t *conf,
 | 
				
			||||||
			snd_pcm_stream_t stream, int mode);
 | 
								snd_pcm_stream_t stream, int mode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 *  IEC958 subframe conversion plugin
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					int snd_pcm_iec958_open(snd_pcm_t **pcmp, const char *name,
 | 
				
			||||||
 | 
								snd_pcm_format_t sformat, snd_pcm_t *slave,
 | 
				
			||||||
 | 
								int close_slave,
 | 
				
			||||||
 | 
								const unsigned char *status_bits,
 | 
				
			||||||
 | 
								const unsigned char *preamble_vals,
 | 
				
			||||||
 | 
								int hdmi_mode);
 | 
				
			||||||
 | 
					int _snd_pcm_iec958_open(snd_pcm_t **pcmp, const char *name,
 | 
				
			||||||
 | 
								 snd_config_t *root, snd_config_t *conf,
 | 
				
			||||||
 | 
								 snd_pcm_stream_t stream, int mode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Route plugin for linear formats
 | 
					 *  Route plugin for linear formats
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,6 +31,10 @@
 | 
				
			||||||
#ifndef __ALSA_PCM_RATE_H
 | 
					#ifndef __ALSA_PCM_RATE_H
 | 
				
			||||||
#define __ALSA_PCM_RATE_H
 | 
					#define __ALSA_PCM_RATE_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __ASOUNDLIB_LOCAL
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
extern "C" {
 | 
					extern "C" {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/rawmidi.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_RAWMIDI_H
 | 
					#ifndef __ALSA_RAWMIDI_H
 | 
				
			||||||
#define __ALSA_RAWMIDI_H
 | 
					#define __ALSA_RAWMIDI_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -93,6 +99,11 @@ typedef enum _snd_rawmidi_read_mode {
 | 
				
			||||||
	SND_RAWMIDI_READ_TSTAMP = 1,
 | 
						SND_RAWMIDI_READ_TSTAMP = 1,
 | 
				
			||||||
} snd_rawmidi_read_mode_t;
 | 
					} snd_rawmidi_read_mode_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** rawmidi info bit flags */
 | 
				
			||||||
 | 
					#define SND_RAWMIDI_INFO_UMP			0x00000008	/**< rawmidi is UMP */
 | 
				
			||||||
 | 
					#define SND_RAWMIDI_INFO_STREAM_INACTIVE	0x00000010	/**< the selected substream is inactive */
 | 
				
			||||||
 | 
					#define SNDRV_RAWMIDI_INFO_STREAM_INACTIVE	SND_RAWMIDI_INFO_STREAM_INACTIVE /* only for compatibility */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_rawmidi_open(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
 | 
					int snd_rawmidi_open(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
 | 
				
			||||||
		     const char *name, int mode);
 | 
							     const char *name, int mode);
 | 
				
			||||||
int snd_rawmidi_open_lconf(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
 | 
					int snd_rawmidi_open_lconf(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi,
 | 
				
			||||||
| 
						 | 
					@ -121,6 +132,7 @@ const char *snd_rawmidi_info_get_name(const snd_rawmidi_info_t *obj);
 | 
				
			||||||
const char *snd_rawmidi_info_get_subdevice_name(const snd_rawmidi_info_t *obj);
 | 
					const char *snd_rawmidi_info_get_subdevice_name(const snd_rawmidi_info_t *obj);
 | 
				
			||||||
unsigned int snd_rawmidi_info_get_subdevices_count(const snd_rawmidi_info_t *obj);
 | 
					unsigned int snd_rawmidi_info_get_subdevices_count(const snd_rawmidi_info_t *obj);
 | 
				
			||||||
unsigned int snd_rawmidi_info_get_subdevices_avail(const snd_rawmidi_info_t *obj);
 | 
					unsigned int snd_rawmidi_info_get_subdevices_avail(const snd_rawmidi_info_t *obj);
 | 
				
			||||||
 | 
					int snd_rawmidi_info_get_tied_device(const snd_rawmidi_info_t *obj);
 | 
				
			||||||
void snd_rawmidi_info_set_device(snd_rawmidi_info_t *obj, unsigned int val);
 | 
					void snd_rawmidi_info_set_device(snd_rawmidi_info_t *obj, unsigned int val);
 | 
				
			||||||
void snd_rawmidi_info_set_subdevice(snd_rawmidi_info_t *obj, unsigned int val);
 | 
					void snd_rawmidi_info_set_subdevice(snd_rawmidi_info_t *obj, unsigned int val);
 | 
				
			||||||
void snd_rawmidi_info_set_stream(snd_rawmidi_info_t *obj, snd_rawmidi_stream_t val);
 | 
					void snd_rawmidi_info_set_stream(snd_rawmidi_info_t *obj, snd_rawmidi_stream_t val);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,6 +26,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/seq.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_SEQ_H
 | 
					#ifndef __ALSA_SEQ_H
 | 
				
			||||||
#define __ALSA_SEQ_H
 | 
					#define __ALSA_SEQ_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -130,6 +136,13 @@ typedef enum snd_seq_client_type {
 | 
				
			||||||
	SND_SEQ_KERNEL_CLIENT   = 2	/**< kernel client */
 | 
						SND_SEQ_KERNEL_CLIENT   = 2	/**< kernel client */
 | 
				
			||||||
} snd_seq_client_type_t;
 | 
					} snd_seq_client_type_t;
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
 | 
					/** client MIDI version */
 | 
				
			||||||
 | 
					enum {
 | 
				
			||||||
 | 
						SND_SEQ_CLIENT_LEGACY_MIDI = 0,		/**< Legacy client */
 | 
				
			||||||
 | 
						SND_SEQ_CLIENT_UMP_MIDI_1_0 = 1,	/**< UMP MIDI 1.0 */
 | 
				
			||||||
 | 
						SND_SEQ_CLIENT_UMP_MIDI_2_0 = 2		/**< UMP MIDI 2.0 */
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
size_t snd_seq_client_info_sizeof(void);
 | 
					size_t snd_seq_client_info_sizeof(void);
 | 
				
			||||||
/** allocate a #snd_seq_client_info_t container on stack */
 | 
					/** allocate a #snd_seq_client_info_t container on stack */
 | 
				
			||||||
#define snd_seq_client_info_alloca(ptr) \
 | 
					#define snd_seq_client_info_alloca(ptr) \
 | 
				
			||||||
| 
						 | 
					@ -149,11 +162,22 @@ const unsigned char *snd_seq_client_info_get_event_filter(const snd_seq_client_i
 | 
				
			||||||
int snd_seq_client_info_get_num_ports(const snd_seq_client_info_t *info);
 | 
					int snd_seq_client_info_get_num_ports(const snd_seq_client_info_t *info);
 | 
				
			||||||
int snd_seq_client_info_get_event_lost(const snd_seq_client_info_t *info);
 | 
					int snd_seq_client_info_get_event_lost(const snd_seq_client_info_t *info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int snd_seq_client_info_get_midi_version(const snd_seq_client_info_t *info);
 | 
				
			||||||
 | 
					int snd_seq_client_info_get_ump_group_enabled(const snd_seq_client_info_t *info,
 | 
				
			||||||
 | 
										      int group);
 | 
				
			||||||
 | 
					int snd_seq_client_info_get_ump_groupless_enabled(const snd_seq_client_info_t *info);
 | 
				
			||||||
 | 
					int snd_seq_client_info_get_ump_conversion(const snd_seq_client_info_t *info);
 | 
				
			||||||
void snd_seq_client_info_set_client(snd_seq_client_info_t *info, int client);
 | 
					void snd_seq_client_info_set_client(snd_seq_client_info_t *info, int client);
 | 
				
			||||||
void snd_seq_client_info_set_name(snd_seq_client_info_t *info, const char *name);
 | 
					void snd_seq_client_info_set_name(snd_seq_client_info_t *info, const char *name);
 | 
				
			||||||
void snd_seq_client_info_set_broadcast_filter(snd_seq_client_info_t *info, int val);
 | 
					void snd_seq_client_info_set_broadcast_filter(snd_seq_client_info_t *info, int val);
 | 
				
			||||||
void snd_seq_client_info_set_error_bounce(snd_seq_client_info_t *info, int val);
 | 
					void snd_seq_client_info_set_error_bounce(snd_seq_client_info_t *info, int val);
 | 
				
			||||||
void snd_seq_client_info_set_event_filter(snd_seq_client_info_t *info, unsigned char *filter);
 | 
					void snd_seq_client_info_set_event_filter(snd_seq_client_info_t *info, unsigned char *filter);
 | 
				
			||||||
 | 
					void snd_seq_client_info_set_midi_version(snd_seq_client_info_t *info, int midi_version);
 | 
				
			||||||
 | 
					void snd_seq_client_info_set_ump_group_enabled(snd_seq_client_info_t *info,
 | 
				
			||||||
 | 
										       int group, int enable);
 | 
				
			||||||
 | 
					void snd_seq_client_info_set_ump_groupless_enabled(snd_seq_client_info_t *info,
 | 
				
			||||||
 | 
											   int enable);
 | 
				
			||||||
 | 
					void snd_seq_client_info_set_ump_conversion(snd_seq_client_info_t *info, int enable);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void snd_seq_client_info_event_filter_clear(snd_seq_client_info_t *info);
 | 
					void snd_seq_client_info_event_filter_clear(snd_seq_client_info_t *info);
 | 
				
			||||||
void snd_seq_client_info_event_filter_add(snd_seq_client_info_t *info, int event_type);
 | 
					void snd_seq_client_info_event_filter_add(snd_seq_client_info_t *info, int event_type);
 | 
				
			||||||
| 
						 | 
					@ -165,6 +189,11 @@ int snd_seq_get_any_client_info(snd_seq_t *handle, int client, snd_seq_client_in
 | 
				
			||||||
int snd_seq_set_client_info(snd_seq_t *handle, snd_seq_client_info_t *info);
 | 
					int snd_seq_set_client_info(snd_seq_t *handle, snd_seq_client_info_t *info);
 | 
				
			||||||
int snd_seq_query_next_client(snd_seq_t *handle, snd_seq_client_info_t *info);
 | 
					int snd_seq_query_next_client(snd_seq_t *handle, snd_seq_client_info_t *info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int snd_seq_get_ump_endpoint_info(snd_seq_t *seq, int client, void *info);
 | 
				
			||||||
 | 
					int snd_seq_get_ump_block_info(snd_seq_t *seq, int client, int blk, void *info);
 | 
				
			||||||
 | 
					int snd_seq_set_ump_endpoint_info(snd_seq_t *seq, const void *info);
 | 
				
			||||||
 | 
					int snd_seq_set_ump_block_info(snd_seq_t *seq, int blk, const void *info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -222,6 +251,14 @@ typedef struct _snd_seq_port_info snd_seq_port_info_t;
 | 
				
			||||||
#define SND_SEQ_PORT_CAP_SUBS_READ	(1<<5)	/**< allow read subscription */
 | 
					#define SND_SEQ_PORT_CAP_SUBS_READ	(1<<5)	/**< allow read subscription */
 | 
				
			||||||
#define SND_SEQ_PORT_CAP_SUBS_WRITE	(1<<6)	/**< allow write subscription */
 | 
					#define SND_SEQ_PORT_CAP_SUBS_WRITE	(1<<6)	/**< allow write subscription */
 | 
				
			||||||
#define SND_SEQ_PORT_CAP_NO_EXPORT	(1<<7)	/**< routing not allowed */
 | 
					#define SND_SEQ_PORT_CAP_NO_EXPORT	(1<<7)	/**< routing not allowed */
 | 
				
			||||||
 | 
					#define SND_SEQ_PORT_CAP_INACTIVE	(1<<8)	/**< inactive port */
 | 
				
			||||||
 | 
					#define SND_SEQ_PORT_CAP_UMP_ENDPOINT	(1<<9)	/**< UMP Endpoint port */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** port direction */
 | 
				
			||||||
 | 
					#define SND_SEQ_PORT_DIR_UNKNOWN	0	/**< Unknown */
 | 
				
			||||||
 | 
					#define SND_SEQ_PORT_DIR_INPUT		1	/**< Input only; sink, receiver */
 | 
				
			||||||
 | 
					#define SND_SEQ_PORT_DIR_OUTPUT		2	/**< Output only; source, transmitter */
 | 
				
			||||||
 | 
					#define SND_SEQ_PORT_DIR_BIDIRECTION	3	/**< Input/output bidirectional */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* port type */
 | 
					/* port type */
 | 
				
			||||||
/** Messages sent from/to this port have device-specific semantics. */
 | 
					/** Messages sent from/to this port have device-specific semantics. */
 | 
				
			||||||
| 
						 | 
					@ -238,6 +275,8 @@ typedef struct _snd_seq_port_info snd_seq_port_info_t;
 | 
				
			||||||
#define SND_SEQ_PORT_TYPE_MIDI_MT32	(1<<5)
 | 
					#define SND_SEQ_PORT_TYPE_MIDI_MT32	(1<<5)
 | 
				
			||||||
/** This port is compatible with the General MIDI 2 specification. */
 | 
					/** This port is compatible with the General MIDI 2 specification. */
 | 
				
			||||||
#define SND_SEQ_PORT_TYPE_MIDI_GM2	(1<<6)
 | 
					#define SND_SEQ_PORT_TYPE_MIDI_GM2	(1<<6)
 | 
				
			||||||
 | 
					/** This port is a UMP port. */
 | 
				
			||||||
 | 
					#define SND_SEQ_PORT_TYPE_MIDI_UMP	(1<<7)
 | 
				
			||||||
/** This port understands SND_SEQ_EVENT_SAMPLE_xxx messages
 | 
					/** This port understands SND_SEQ_EVENT_SAMPLE_xxx messages
 | 
				
			||||||
    (these are not MIDI messages). */
 | 
					    (these are not MIDI messages). */
 | 
				
			||||||
#define SND_SEQ_PORT_TYPE_SYNTH		(1<<10)
 | 
					#define SND_SEQ_PORT_TYPE_SYNTH		(1<<10)
 | 
				
			||||||
| 
						 | 
					@ -283,6 +322,9 @@ int snd_seq_port_info_get_port_specified(const snd_seq_port_info_t *info);
 | 
				
			||||||
int snd_seq_port_info_get_timestamping(const snd_seq_port_info_t *info);
 | 
					int snd_seq_port_info_get_timestamping(const snd_seq_port_info_t *info);
 | 
				
			||||||
int snd_seq_port_info_get_timestamp_real(const snd_seq_port_info_t *info);
 | 
					int snd_seq_port_info_get_timestamp_real(const snd_seq_port_info_t *info);
 | 
				
			||||||
int snd_seq_port_info_get_timestamp_queue(const snd_seq_port_info_t *info);
 | 
					int snd_seq_port_info_get_timestamp_queue(const snd_seq_port_info_t *info);
 | 
				
			||||||
 | 
					int snd_seq_port_info_get_direction(const snd_seq_port_info_t *info);
 | 
				
			||||||
 | 
					int snd_seq_port_info_get_ump_group(const snd_seq_port_info_t *info);
 | 
				
			||||||
 | 
					int snd_seq_port_info_get_ump_is_midi1(const snd_seq_port_info_t *info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void snd_seq_port_info_set_client(snd_seq_port_info_t *info, int client);
 | 
					void snd_seq_port_info_set_client(snd_seq_port_info_t *info, int client);
 | 
				
			||||||
void snd_seq_port_info_set_port(snd_seq_port_info_t *info, int port);
 | 
					void snd_seq_port_info_set_port(snd_seq_port_info_t *info, int port);
 | 
				
			||||||
| 
						 | 
					@ -297,6 +339,9 @@ void snd_seq_port_info_set_port_specified(snd_seq_port_info_t *info, int val);
 | 
				
			||||||
void snd_seq_port_info_set_timestamping(snd_seq_port_info_t *info, int enable);
 | 
					void snd_seq_port_info_set_timestamping(snd_seq_port_info_t *info, int enable);
 | 
				
			||||||
void snd_seq_port_info_set_timestamp_real(snd_seq_port_info_t *info, int realtime);
 | 
					void snd_seq_port_info_set_timestamp_real(snd_seq_port_info_t *info, int realtime);
 | 
				
			||||||
void snd_seq_port_info_set_timestamp_queue(snd_seq_port_info_t *info, int queue);
 | 
					void snd_seq_port_info_set_timestamp_queue(snd_seq_port_info_t *info, int queue);
 | 
				
			||||||
 | 
					void snd_seq_port_info_set_direction(snd_seq_port_info_t *info, int direction);
 | 
				
			||||||
 | 
					void snd_seq_port_info_set_ump_group(snd_seq_port_info_t *info, int ump_group);
 | 
				
			||||||
 | 
					void snd_seq_port_info_set_ump_is_midi1(snd_seq_port_info_t *info, int is_midi1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_seq_create_port(snd_seq_t *handle, snd_seq_port_info_t *info);
 | 
					int snd_seq_create_port(snd_seq_t *handle, snd_seq_port_info_t *info);
 | 
				
			||||||
int snd_seq_delete_port(snd_seq_t *handle, int port);
 | 
					int snd_seq_delete_port(snd_seq_t *handle, int port);
 | 
				
			||||||
| 
						 | 
					@ -469,13 +514,16 @@ unsigned int snd_seq_queue_tempo_get_tempo(const snd_seq_queue_tempo_t *info);
 | 
				
			||||||
int snd_seq_queue_tempo_get_ppq(const snd_seq_queue_tempo_t *info);
 | 
					int snd_seq_queue_tempo_get_ppq(const snd_seq_queue_tempo_t *info);
 | 
				
			||||||
unsigned int snd_seq_queue_tempo_get_skew(const snd_seq_queue_tempo_t *info);
 | 
					unsigned int snd_seq_queue_tempo_get_skew(const snd_seq_queue_tempo_t *info);
 | 
				
			||||||
unsigned int snd_seq_queue_tempo_get_skew_base(const snd_seq_queue_tempo_t *info);
 | 
					unsigned int snd_seq_queue_tempo_get_skew_base(const snd_seq_queue_tempo_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_seq_queue_tempo_get_tempo_base(const snd_seq_queue_tempo_t *info);
 | 
				
			||||||
void snd_seq_queue_tempo_set_tempo(snd_seq_queue_tempo_t *info, unsigned int tempo);
 | 
					void snd_seq_queue_tempo_set_tempo(snd_seq_queue_tempo_t *info, unsigned int tempo);
 | 
				
			||||||
void snd_seq_queue_tempo_set_ppq(snd_seq_queue_tempo_t *info, int ppq);
 | 
					void snd_seq_queue_tempo_set_ppq(snd_seq_queue_tempo_t *info, int ppq);
 | 
				
			||||||
void snd_seq_queue_tempo_set_skew(snd_seq_queue_tempo_t *info, unsigned int skew);
 | 
					void snd_seq_queue_tempo_set_skew(snd_seq_queue_tempo_t *info, unsigned int skew);
 | 
				
			||||||
void snd_seq_queue_tempo_set_skew_base(snd_seq_queue_tempo_t *info, unsigned int base);
 | 
					void snd_seq_queue_tempo_set_skew_base(snd_seq_queue_tempo_t *info, unsigned int base);
 | 
				
			||||||
 | 
					void snd_seq_queue_tempo_set_tempo_base(snd_seq_queue_tempo_t *info, unsigned int tempo_base);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_seq_get_queue_tempo(snd_seq_t *handle, int q, snd_seq_queue_tempo_t *tempo);
 | 
					int snd_seq_get_queue_tempo(snd_seq_t *handle, int q, snd_seq_queue_tempo_t *tempo);
 | 
				
			||||||
int snd_seq_set_queue_tempo(snd_seq_t *handle, int q, snd_seq_queue_tempo_t *tempo);
 | 
					int snd_seq_set_queue_tempo(snd_seq_t *handle, int q, snd_seq_queue_tempo_t *tempo);
 | 
				
			||||||
 | 
					int snd_seq_has_queue_tempo_base(snd_seq_t *handle);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
| 
						 | 
					@ -572,6 +620,12 @@ void snd_seq_remove_events_set_tag(snd_seq_remove_events_t *info, int tag);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_seq_remove_events(snd_seq_t *handle, snd_seq_remove_events_t *info);
 | 
					int snd_seq_remove_events(snd_seq_t *handle, snd_seq_remove_events_t *info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int snd_seq_ump_event_output(snd_seq_t *seq, snd_seq_ump_event_t *ev);
 | 
				
			||||||
 | 
					int snd_seq_ump_event_output_buffer(snd_seq_t *seq, snd_seq_ump_event_t *ev);
 | 
				
			||||||
 | 
					int snd_seq_ump_extract_output(snd_seq_t *seq, snd_seq_ump_event_t **ev_res);
 | 
				
			||||||
 | 
					int snd_seq_ump_event_output_direct(snd_seq_t *seq, snd_seq_ump_event_t *ev);
 | 
				
			||||||
 | 
					int snd_seq_ump_event_input(snd_seq_t *seq, snd_seq_ump_event_t **ev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \} */
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -729,6 +783,10 @@ extern const unsigned int snd_seq_event_types[];
 | 
				
			||||||
#define snd_seq_ev_is_direct(ev) \
 | 
					#define snd_seq_ev_is_direct(ev) \
 | 
				
			||||||
	((ev)->queue == SND_SEQ_QUEUE_DIRECT)
 | 
						((ev)->queue == SND_SEQ_QUEUE_DIRECT)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** UMP events */
 | 
				
			||||||
 | 
					#define snd_seq_ev_is_ump(ev) \
 | 
				
			||||||
 | 
						((ev)->flags & SND_SEQ_EVENT_UMP)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \} */
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/seq_event.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_SEQ_EVENT_H
 | 
					#ifndef __ALSA_SEQ_EVENT_H
 | 
				
			||||||
#define __ALSA_SEQ_EVENT_H
 | 
					#define __ALSA_SEQ_EVENT_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -133,6 +139,11 @@ enum snd_seq_event_type {
 | 
				
			||||||
	/** Ports disconnected; event data type = #snd_seq_connect_t */
 | 
						/** Ports disconnected; event data type = #snd_seq_connect_t */
 | 
				
			||||||
	SND_SEQ_EVENT_PORT_UNSUBSCRIBED,
 | 
						SND_SEQ_EVENT_PORT_UNSUBSCRIBED,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/** UMP Endpoint info has changed; event data type = #snd_seq_ev_ump_notify_t */
 | 
				
			||||||
 | 
						SND_SEQ_EVENT_UMP_EP_CHANGE,
 | 
				
			||||||
 | 
						/** UMP Block info has changed; event data type = #snd_seq_ev_ump_notify_t */
 | 
				
			||||||
 | 
						SND_SEQ_EVENT_UMP_BLOCK_CHANGE,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/** user-defined event; event data type = any (fixed size) */
 | 
						/** user-defined event; event data type = any (fixed size) */
 | 
				
			||||||
	SND_SEQ_EVENT_USR0 = 90,
 | 
						SND_SEQ_EVENT_USR0 = 90,
 | 
				
			||||||
	/** user-defined event; event data type = any (fixed size) */
 | 
						/** user-defined event; event data type = any (fixed size) */
 | 
				
			||||||
| 
						 | 
					@ -225,6 +236,7 @@ typedef union snd_seq_timestamp {
 | 
				
			||||||
#define SND_SEQ_PRIORITY_HIGH		(1<<4)	/**< event should be processed before others */
 | 
					#define SND_SEQ_PRIORITY_HIGH		(1<<4)	/**< event should be processed before others */
 | 
				
			||||||
#define SND_SEQ_PRIORITY_MASK		(1<<4)	/**< mask for priority bits */
 | 
					#define SND_SEQ_PRIORITY_MASK		(1<<4)	/**< mask for priority bits */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define SND_SEQ_EVENT_UMP		(1<<5)	/**< UMP packet event */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Note event */
 | 
					/** Note event */
 | 
				
			||||||
typedef struct snd_seq_ev_note {
 | 
					typedef struct snd_seq_ev_note {
 | 
				
			||||||
| 
						 | 
					@ -291,6 +303,26 @@ typedef struct snd_seq_ev_queue_control {
 | 
				
			||||||
	} param;				/**< data value union */
 | 
						} param;				/**< data value union */
 | 
				
			||||||
} snd_seq_ev_queue_control_t;
 | 
					} snd_seq_ev_queue_control_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** UMP info change notify */
 | 
				
			||||||
 | 
					typedef struct snd_seq_ev_ump_notify {
 | 
				
			||||||
 | 
						unsigned char client;	/**< Client number */
 | 
				
			||||||
 | 
						unsigned char block;	/**< Block number (optional) */
 | 
				
			||||||
 | 
					} snd_seq_ev_ump_notify_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** Sequencer event data */
 | 
				
			||||||
 | 
					typedef union snd_seq_event_data {
 | 
				
			||||||
 | 
						snd_seq_ev_note_t note;		/**< note information */
 | 
				
			||||||
 | 
						snd_seq_ev_ctrl_t control;	/**< MIDI control information */
 | 
				
			||||||
 | 
						snd_seq_ev_raw8_t raw8;		/**< raw8 data */
 | 
				
			||||||
 | 
						snd_seq_ev_raw32_t raw32;	/**< raw32 data */
 | 
				
			||||||
 | 
						snd_seq_ev_ext_t ext;		/**< external data */
 | 
				
			||||||
 | 
						snd_seq_ev_queue_control_t queue; /**< queue control */
 | 
				
			||||||
 | 
						snd_seq_timestamp_t time;	/**< timestamp */
 | 
				
			||||||
 | 
						snd_seq_addr_t addr;		/**< address */
 | 
				
			||||||
 | 
						snd_seq_connect_t connect;	/**< connect information */
 | 
				
			||||||
 | 
						snd_seq_result_t result;	/**< operation result code */
 | 
				
			||||||
 | 
						snd_seq_ev_ump_notify_t ump_notify; /**< UMP info change notification */
 | 
				
			||||||
 | 
					} snd_seq_event_data_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Sequencer event */
 | 
					/** Sequencer event */
 | 
				
			||||||
typedef struct snd_seq_event {
 | 
					typedef struct snd_seq_event {
 | 
				
			||||||
| 
						 | 
					@ -304,20 +336,24 @@ typedef struct snd_seq_event {
 | 
				
			||||||
	snd_seq_addr_t source;		/**< source address */
 | 
						snd_seq_addr_t source;		/**< source address */
 | 
				
			||||||
	snd_seq_addr_t dest;		/**< destination address */
 | 
						snd_seq_addr_t dest;		/**< destination address */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	union {
 | 
						snd_seq_event_data_t data;	/**< event data... */
 | 
				
			||||||
		snd_seq_ev_note_t note;		/**< note information */
 | 
					 | 
				
			||||||
		snd_seq_ev_ctrl_t control;	/**< MIDI control information */
 | 
					 | 
				
			||||||
		snd_seq_ev_raw8_t raw8;		/**< raw8 data */
 | 
					 | 
				
			||||||
		snd_seq_ev_raw32_t raw32;	/**< raw32 data */
 | 
					 | 
				
			||||||
		snd_seq_ev_ext_t ext;		/**< external data */
 | 
					 | 
				
			||||||
		snd_seq_ev_queue_control_t queue; /**< queue control */
 | 
					 | 
				
			||||||
		snd_seq_timestamp_t time;	/**< timestamp */
 | 
					 | 
				
			||||||
		snd_seq_addr_t addr;		/**< address */
 | 
					 | 
				
			||||||
		snd_seq_connect_t connect;	/**< connect information */
 | 
					 | 
				
			||||||
		snd_seq_result_t result;	/**< operation result code */
 | 
					 | 
				
			||||||
	} data;				/**< event data... */
 | 
					 | 
				
			||||||
} snd_seq_event_t;
 | 
					} snd_seq_event_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** UMP sequencer event; compatible with legacy sequencer event */
 | 
				
			||||||
 | 
					typedef struct snd_seq_ump_event {
 | 
				
			||||||
 | 
						snd_seq_event_type_t type;	/**< event type */
 | 
				
			||||||
 | 
						unsigned char flags;		/**< event flags */
 | 
				
			||||||
 | 
						unsigned char tag;		/**< tag */
 | 
				
			||||||
 | 
						unsigned char queue;		/**< schedule queue */
 | 
				
			||||||
 | 
						snd_seq_timestamp_t time;	/**< schedule time */
 | 
				
			||||||
 | 
						snd_seq_addr_t source;		/**< source address */
 | 
				
			||||||
 | 
						snd_seq_addr_t dest;		/**< destination address */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						union {
 | 
				
			||||||
 | 
							snd_seq_event_data_t data;	/**< (shared) legacy data */
 | 
				
			||||||
 | 
							unsigned int ump[4];		/**< UMP data bytes */
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					} snd_seq_ump_event_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \} */
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/seq_midi_event.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_SEQ_MIDI_EVENT_H
 | 
					#ifndef __ALSA_SEQ_MIDI_EVENT_H
 | 
				
			||||||
#define __ALSA_SEQ_MIDI_EVENT_H
 | 
					#define __ALSA_SEQ_MIDI_EVENT_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/seqmid.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_SEQMID_H
 | 
					#ifndef __ALSA_SEQMID_H
 | 
				
			||||||
#define __ALSA_SEQMID_H
 | 
					#define __ALSA_SEQMID_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -45,8 +51,21 @@ extern "C" {
 | 
				
			||||||
 * 
 | 
					 * 
 | 
				
			||||||
 * This macro clears the given event record pointer to the default status.
 | 
					 * This macro clears the given event record pointer to the default status.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#define snd_seq_ev_clear(ev) \
 | 
					static inline void snd_seq_ev_clear(snd_seq_event_t *ev)
 | 
				
			||||||
	memset(ev, 0, sizeof(snd_seq_event_t))
 | 
					{
 | 
				
			||||||
 | 
						memset(ev, 0, sizeof(*ev));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * \brief initialize event record for UMP
 | 
				
			||||||
 | 
					 * \param ev event record pointer
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This macro clears the given UMP event record pointer to the default status.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					static inline void snd_seq_ump_ev_clear(snd_seq_ump_event_t *ev)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						memset(ev, 0, sizeof(*ev));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief set the tag for given event
 | 
					 * \brief set the tag for given event
 | 
				
			||||||
| 
						 | 
					@ -284,6 +303,31 @@ extern "C" {
 | 
				
			||||||
	 (ev)->data.queue.queue = (q),\
 | 
						 (ev)->data.queue.queue = (q),\
 | 
				
			||||||
	 (ev)->data.queue.param.time.tick = (ttime))
 | 
						 (ev)->data.queue.param.time.tick = (ttime))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * \brief set the event UMP flag
 | 
				
			||||||
 | 
					 * \param ev event record
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					static inline void snd_seq_ev_set_ump(snd_seq_ump_event_t *ev)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						ev->flags |= SND_SEQ_EVENT_UMP;
 | 
				
			||||||
 | 
						ev->type = 0; /* unused for UMP */
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * \brief set the event UMP flag and fill UMP raw bytes
 | 
				
			||||||
 | 
					 * \param ev event record
 | 
				
			||||||
 | 
					 * \param data UMP packet data
 | 
				
			||||||
 | 
					 * \param bytes UMP packet size in bytes
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					static inline int snd_seq_ev_set_ump_data(snd_seq_ump_event_t *ev, void *data, size_t bytes)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (bytes > 16)
 | 
				
			||||||
 | 
							return -EINVAL;
 | 
				
			||||||
 | 
						snd_seq_ev_set_ump(ev);
 | 
				
			||||||
 | 
						memcpy(ev->ump, data, bytes);
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* set and send a queue control event */
 | 
					/* set and send a queue control event */
 | 
				
			||||||
int snd_seq_control_queue(snd_seq_t *seq, int q, int type, int value, snd_seq_event_t *ev);
 | 
					int snd_seq_control_queue(snd_seq_t *seq, int q, int type, int value, snd_seq_event_t *ev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -343,6 +387,8 @@ int snd_seq_disconnect_to(snd_seq_t *seq, int my_port, int dest_client, int dest
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int snd_seq_set_client_name(snd_seq_t *seq, const char *name);
 | 
					int snd_seq_set_client_name(snd_seq_t *seq, const char *name);
 | 
				
			||||||
int snd_seq_set_client_event_filter(snd_seq_t *seq, int event_type);
 | 
					int snd_seq_set_client_event_filter(snd_seq_t *seq, int event_type);
 | 
				
			||||||
 | 
					int snd_seq_set_client_midi_version(snd_seq_t *seq, int midi_version);
 | 
				
			||||||
 | 
					int snd_seq_set_client_ump_conversion(snd_seq_t *seq, int enable);
 | 
				
			||||||
int snd_seq_set_client_pool_output(snd_seq_t *seq, size_t size);
 | 
					int snd_seq_set_client_pool_output(snd_seq_t *seq, size_t size);
 | 
				
			||||||
int snd_seq_set_client_pool_output_room(snd_seq_t *seq, size_t size);
 | 
					int snd_seq_set_client_pool_output_room(snd_seq_t *seq, size_t size);
 | 
				
			||||||
int snd_seq_set_client_pool_input(snd_seq_t *seq, size_t size);
 | 
					int snd_seq_set_client_pool_input(snd_seq_t *seq, size_t size);
 | 
				
			||||||
| 
						 | 
					@ -480,6 +526,13 @@ int snd_seq_reset_pool_input(snd_seq_t *seq);
 | 
				
			||||||
	((ev)->type = SND_SEQ_EVENT_SYSEX,\
 | 
						((ev)->type = SND_SEQ_EVENT_SYSEX,\
 | 
				
			||||||
	 snd_seq_ev_set_variable(ev, datalen, dataptr))
 | 
						 snd_seq_ev_set_variable(ev, datalen, dataptr))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Helper API functions for UMP endpoint and block creations */
 | 
				
			||||||
 | 
					int snd_seq_create_ump_endpoint(snd_seq_t *seq,
 | 
				
			||||||
 | 
									const snd_ump_endpoint_info_t *info,
 | 
				
			||||||
 | 
									unsigned int num_groups);
 | 
				
			||||||
 | 
					int snd_seq_create_ump_block(snd_seq_t *seq, int blkid,
 | 
				
			||||||
 | 
								     const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \} */
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,9 @@
 | 
				
			||||||
#ifndef __TYPE_COMPAT_H
 | 
					#ifndef __SOUND_TYPE_COMPAT_H
 | 
				
			||||||
#define __TYPE_COMPAT_H
 | 
					#define __SOUND_TYPE_COMPAT_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
#ifdef __linux__
 | 
					#if defined(__linux__)
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
typedef uint8_t __u8;
 | 
					typedef uint8_t __u8;
 | 
				
			||||||
| 
						 | 
					@ -15,8 +15,14 @@ typedef int16_t __s16;
 | 
				
			||||||
typedef int32_t __s32;
 | 
					typedef int32_t __s32;
 | 
				
			||||||
typedef int64_t __s64;
 | 
					typedef int64_t __s64;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <endian.h>
 | 
					#if defined(__sun)
 | 
				
			||||||
#include <byteswap.h>
 | 
					#include <sys/byteorder.h>
 | 
				
			||||||
 | 
					#define __cpu_to_le32 LE_32(x)
 | 
				
			||||||
 | 
					#define __cpu_to_be32 BE_32(x)
 | 
				
			||||||
 | 
					#define __cpu_to_le16 LE_16(x)
 | 
				
			||||||
 | 
					#define __cpu_to_be16 BE_16(x)
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					#include <sys/endian.h>
 | 
				
			||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
 | 
					#if __BYTE_ORDER == __LITTLE_ENDIAN
 | 
				
			||||||
#define __cpu_to_le32(x) (x)
 | 
					#define __cpu_to_le32(x) (x)
 | 
				
			||||||
#define __cpu_to_be32(x) bswap_32(x)
 | 
					#define __cpu_to_be32(x) bswap_32(x)
 | 
				
			||||||
| 
						 | 
					@ -28,20 +34,12 @@ typedef int64_t __s64;
 | 
				
			||||||
#define __cpu_to_le16(x) bswap_16(x)
 | 
					#define __cpu_to_le16(x) bswap_16(x)
 | 
				
			||||||
#define __cpu_to_be16(x) (x)
 | 
					#define __cpu_to_be16(x) (x)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define __le32_to_cpu __cpu_to_le32
 | 
					#define __le32_to_cpu __cpu_to_le32
 | 
				
			||||||
#define __be32_to_cpu __cpu_to_be32
 | 
					#define __be32_to_cpu __cpu_to_be32
 | 
				
			||||||
#define __le16_to_cpu __cpu_to_le16
 | 
					#define __le16_to_cpu __cpu_to_le16
 | 
				
			||||||
#define __be16_to_cpu __cpu_to_be16
 | 
					#define __be16_to_cpu __cpu_to_be16
 | 
				
			||||||
 | 
					 | 
				
			||||||
#define __le64 __u64
 | 
					 | 
				
			||||||
#define __le32 __u32
 | 
					 | 
				
			||||||
#define __le16 __u16
 | 
					 | 
				
			||||||
#define __le8  __u8
 | 
					 | 
				
			||||||
#define __be64 __u64
 | 
					 | 
				
			||||||
#define __be32 __u32
 | 
					 | 
				
			||||||
#define __be16 __u16
 | 
					 | 
				
			||||||
#define __be8  __u8
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __kernel_long_t
 | 
					#ifndef __kernel_long_t
 | 
				
			||||||
| 
						 | 
					@ -58,4 +56,4 @@ typedef int64_t __s64;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* DOC_HIDDEN */
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* __TYPE_COMPAT_H */
 | 
					#endif /* __SOUND_TYPE_COMPAT_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,22 +3,6 @@
 | 
				
			||||||
 *  Main header file for the ALSA sequencer
 | 
					 *  Main header file for the ALSA sequencer
 | 
				
			||||||
 *  Copyright (c) 1998-1999 by Frank van de Pol <fvdpol@coil.demon.nl>
 | 
					 *  Copyright (c) 1998-1999 by Frank van de Pol <fvdpol@coil.demon.nl>
 | 
				
			||||||
 *            (c) 1998-1999 by Jaroslav Kysela <perex@perex.cz>
 | 
					 *            (c) 1998-1999 by Jaroslav Kysela <perex@perex.cz>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *   it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 *   the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 *   (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *   GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 *   along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#ifndef __SOUND_ASEQUENCER_H
 | 
					#ifndef __SOUND_ASEQUENCER_H
 | 
				
			||||||
#define __SOUND_ASEQUENCER_H
 | 
					#define __SOUND_ASEQUENCER_H
 | 
				
			||||||
| 
						 | 
					@ -26,7 +10,7 @@
 | 
				
			||||||
#include <sound/asound.h>
 | 
					#include <sound/asound.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** version of the sequencer */
 | 
					/** version of the sequencer */
 | 
				
			||||||
#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2)
 | 
					#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * definition of sequencer event types
 | 
					 * definition of sequencer event types
 | 
				
			||||||
| 
						 | 
					@ -108,6 +92,9 @@
 | 
				
			||||||
#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED	66	/* ports connected */
 | 
					#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED	66	/* ports connected */
 | 
				
			||||||
#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67	/* ports disconnected */
 | 
					#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67	/* ports disconnected */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_EVENT_UMP_EP_CHANGE	68	/* UMP EP info has changed */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_EVENT_UMP_BLOCK_CHANGE 69	/* UMP block info has changed */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* 70-89:  synthesizer events - obsoleted */
 | 
					/* 70-89:  synthesizer events - obsoleted */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** user-defined events with fixed length
 | 
					/** user-defined events with fixed length
 | 
				
			||||||
| 
						 | 
					@ -190,6 +177,7 @@ struct snd_seq_connect {
 | 
				
			||||||
#define SNDRV_SEQ_PRIORITY_HIGH		(1<<4)	/* event should be processed before others */
 | 
					#define SNDRV_SEQ_PRIORITY_HIGH		(1<<4)	/* event should be processed before others */
 | 
				
			||||||
#define SNDRV_SEQ_PRIORITY_MASK		(1<<4)
 | 
					#define SNDRV_SEQ_PRIORITY_MASK		(1<<4)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_EVENT_UMP		(1<<5)	/* event holds a UMP packet */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* note event */
 | 
						/* note event */
 | 
				
			||||||
struct snd_seq_ev_note {
 | 
					struct snd_seq_ev_note {
 | 
				
			||||||
| 
						 | 
					@ -268,6 +256,26 @@ struct snd_seq_ev_quote {
 | 
				
			||||||
	struct snd_seq_event *event;		/* quoted event */
 | 
						struct snd_seq_event *event;		/* quoted event */
 | 
				
			||||||
} __attribute__((packed));
 | 
					} __attribute__((packed));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* UMP info change notify */
 | 
				
			||||||
 | 
					struct snd_seq_ev_ump_notify {
 | 
				
			||||||
 | 
						unsigned char client;	/* Client number */
 | 
				
			||||||
 | 
						unsigned char block;	/* Block number (optional) */
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					union snd_seq_event_data { /* event data... */
 | 
				
			||||||
 | 
						struct snd_seq_ev_note note;
 | 
				
			||||||
 | 
						struct snd_seq_ev_ctrl control;
 | 
				
			||||||
 | 
						struct snd_seq_ev_raw8 raw8;
 | 
				
			||||||
 | 
						struct snd_seq_ev_raw32 raw32;
 | 
				
			||||||
 | 
						struct snd_seq_ev_ext ext;
 | 
				
			||||||
 | 
						struct snd_seq_ev_queue_control queue;
 | 
				
			||||||
 | 
						union snd_seq_timestamp time;
 | 
				
			||||||
 | 
						struct snd_seq_addr addr;
 | 
				
			||||||
 | 
						struct snd_seq_connect connect;
 | 
				
			||||||
 | 
						struct snd_seq_result result;
 | 
				
			||||||
 | 
						struct snd_seq_ev_quote quote;
 | 
				
			||||||
 | 
						struct snd_seq_ev_ump_notify ump_notify;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* sequencer event */
 | 
						/* sequencer event */
 | 
				
			||||||
struct snd_seq_event {
 | 
					struct snd_seq_event {
 | 
				
			||||||
| 
						 | 
					@ -278,25 +286,27 @@ struct snd_seq_event {
 | 
				
			||||||
	unsigned char queue;		/* schedule queue */
 | 
						unsigned char queue;		/* schedule queue */
 | 
				
			||||||
	union snd_seq_timestamp time;	/* schedule time */
 | 
						union snd_seq_timestamp time;	/* schedule time */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
	struct snd_seq_addr source;	/* source address */
 | 
						struct snd_seq_addr source;	/* source address */
 | 
				
			||||||
	struct snd_seq_addr dest;	/* destination address */
 | 
						struct snd_seq_addr dest;	/* destination address */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	union {				/* event data... */
 | 
						union snd_seq_event_data data;
 | 
				
			||||||
		struct snd_seq_ev_note note;
 | 
					 | 
				
			||||||
		struct snd_seq_ev_ctrl control;
 | 
					 | 
				
			||||||
		struct snd_seq_ev_raw8 raw8;
 | 
					 | 
				
			||||||
		struct snd_seq_ev_raw32 raw32;
 | 
					 | 
				
			||||||
		struct snd_seq_ev_ext ext;
 | 
					 | 
				
			||||||
		struct snd_seq_ev_queue_control queue;
 | 
					 | 
				
			||||||
		union snd_seq_timestamp time;
 | 
					 | 
				
			||||||
		struct snd_seq_addr addr;
 | 
					 | 
				
			||||||
		struct snd_seq_connect connect;
 | 
					 | 
				
			||||||
		struct snd_seq_result result;
 | 
					 | 
				
			||||||
		struct snd_seq_ev_quote quote;
 | 
					 | 
				
			||||||
	} data;
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* (compatible) event for UMP-capable clients */
 | 
				
			||||||
 | 
					struct snd_seq_ump_event {
 | 
				
			||||||
 | 
						snd_seq_event_type_t type;	/* event type */
 | 
				
			||||||
 | 
						unsigned char flags;		/* event flags */
 | 
				
			||||||
 | 
						char tag;
 | 
				
			||||||
 | 
						unsigned char queue;		/* schedule queue */
 | 
				
			||||||
 | 
						union snd_seq_timestamp time;	/* schedule time */
 | 
				
			||||||
 | 
						struct snd_seq_addr source;	/* source address */
 | 
				
			||||||
 | 
						struct snd_seq_addr dest;	/* destination address */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						union {
 | 
				
			||||||
 | 
							union snd_seq_event_data data;
 | 
				
			||||||
 | 
							unsigned int ump[4];
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * bounce event - stored as variable size data
 | 
					 * bounce event - stored as variable size data
 | 
				
			||||||
| 
						 | 
					@ -344,10 +354,11 @@ typedef int __bitwise snd_seq_client_type_t;
 | 
				
			||||||
#define	KERNEL_CLIENT	((snd_seq_client_type_t) 2)
 | 
					#define	KERNEL_CLIENT	((snd_seq_client_type_t) 2)
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
	/* event filter flags */
 | 
						/* event filter flags */
 | 
				
			||||||
#define SNDRV_SEQ_FILTER_BROADCAST	(1<<0)	/* accept broadcast messages */
 | 
					#define SNDRV_SEQ_FILTER_BROADCAST	(1U<<0)	/* accept broadcast messages */
 | 
				
			||||||
#define SNDRV_SEQ_FILTER_MULTICAST	(1<<1)	/* accept multicast messages */
 | 
					#define SNDRV_SEQ_FILTER_MULTICAST	(1U<<1)	/* accept multicast messages */
 | 
				
			||||||
#define SNDRV_SEQ_FILTER_BOUNCE		(1<<2)	/* accept bounce event in error */
 | 
					#define SNDRV_SEQ_FILTER_BOUNCE		(1U<<2)	/* accept bounce event in error */
 | 
				
			||||||
#define SNDRV_SEQ_FILTER_USE_EVENT	(1<<31)	/* use event filter */
 | 
					#define SNDRV_SEQ_FILTER_NO_CONVERT	(1U<<30) /* don't convert UMP events */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_FILTER_USE_EVENT	(1U<<31)	/* use event filter */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct snd_seq_client_info {
 | 
					struct snd_seq_client_info {
 | 
				
			||||||
	int client;			/* client number to inquire */
 | 
						int client;			/* client number to inquire */
 | 
				
			||||||
| 
						 | 
					@ -360,9 +371,18 @@ struct snd_seq_client_info {
 | 
				
			||||||
	int event_lost;			/* number of lost events */
 | 
						int event_lost;			/* number of lost events */
 | 
				
			||||||
	int card;			/* RO: card number[kernel] */
 | 
						int card;			/* RO: card number[kernel] */
 | 
				
			||||||
	int pid;			/* RO: pid[user] */
 | 
						int pid;			/* RO: pid[user] */
 | 
				
			||||||
	char reserved[56];		/* for future use */
 | 
						unsigned int midi_version;	/* MIDI version */
 | 
				
			||||||
 | 
						unsigned int group_filter;	/* UMP group filter bitmap
 | 
				
			||||||
 | 
										 * (bit 0 = groupless messages,
 | 
				
			||||||
 | 
										 *  bit 1-16 = messages for groups 1-16)
 | 
				
			||||||
 | 
										 */
 | 
				
			||||||
 | 
						char reserved[48];		/* for future use */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* MIDI version numbers in client info */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_CLIENT_LEGACY_MIDI		0	/* Legacy client */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_CLIENT_UMP_MIDI_1_0		1	/* UMP MIDI 1.0 */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_CLIENT_UMP_MIDI_2_0		2	/* UMP MIDI 2.0 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* client pool size */
 | 
					/* client pool size */
 | 
				
			||||||
struct snd_seq_client_pool {
 | 
					struct snd_seq_client_pool {
 | 
				
			||||||
| 
						 | 
					@ -422,6 +442,8 @@ struct snd_seq_remove_events {
 | 
				
			||||||
#define SNDRV_SEQ_PORT_CAP_SUBS_READ	(1<<5)	/* allow read subscription */
 | 
					#define SNDRV_SEQ_PORT_CAP_SUBS_READ	(1<<5)	/* allow read subscription */
 | 
				
			||||||
#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE	(1<<6)	/* allow write subscription */
 | 
					#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE	(1<<6)	/* allow write subscription */
 | 
				
			||||||
#define SNDRV_SEQ_PORT_CAP_NO_EXPORT	(1<<7)	/* routing not allowed */
 | 
					#define SNDRV_SEQ_PORT_CAP_NO_EXPORT	(1<<7)	/* routing not allowed */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_PORT_CAP_INACTIVE	(1<<8)	/* inactive port */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_PORT_CAP_UMP_ENDPOINT	(1<<9)	/* MIDI 2.0 UMP Endpoint port */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* port type */
 | 
						/* port type */
 | 
				
			||||||
#define SNDRV_SEQ_PORT_TYPE_SPECIFIC	(1<<0)	/* hardware specific */
 | 
					#define SNDRV_SEQ_PORT_TYPE_SPECIFIC	(1<<0)	/* hardware specific */
 | 
				
			||||||
| 
						 | 
					@ -431,6 +453,7 @@ struct snd_seq_remove_events {
 | 
				
			||||||
#define SNDRV_SEQ_PORT_TYPE_MIDI_XG	(1<<4)	/* XG compatible device */
 | 
					#define SNDRV_SEQ_PORT_TYPE_MIDI_XG	(1<<4)	/* XG compatible device */
 | 
				
			||||||
#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32	(1<<5)	/* MT-32 compatible device */
 | 
					#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32	(1<<5)	/* MT-32 compatible device */
 | 
				
			||||||
#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2	(1<<6)	/* General MIDI 2 compatible device */
 | 
					#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2	(1<<6)	/* General MIDI 2 compatible device */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_PORT_TYPE_MIDI_UMP	(1<<7)	/* UMP */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* other standards...*/
 | 
					/* other standards...*/
 | 
				
			||||||
#define SNDRV_SEQ_PORT_TYPE_SYNTH	(1<<10)	/* Synth device (no MIDI compatible - direct wavetable) */
 | 
					#define SNDRV_SEQ_PORT_TYPE_SYNTH	(1<<10)	/* Synth device (no MIDI compatible - direct wavetable) */
 | 
				
			||||||
| 
						 | 
					@ -448,6 +471,14 @@ struct snd_seq_remove_events {
 | 
				
			||||||
#define SNDRV_SEQ_PORT_FLG_TIMESTAMP	(1<<1)
 | 
					#define SNDRV_SEQ_PORT_FLG_TIMESTAMP	(1<<1)
 | 
				
			||||||
#define SNDRV_SEQ_PORT_FLG_TIME_REAL	(1<<2)
 | 
					#define SNDRV_SEQ_PORT_FLG_TIME_REAL	(1<<2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_PORT_FLG_IS_MIDI1	(1<<3)	/* Keep MIDI 1.0 protocol */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* port direction */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_PORT_DIR_UNKNOWN	0
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_PORT_DIR_INPUT	1
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_PORT_DIR_OUTPUT	2
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_PORT_DIR_BIDIRECTION	3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct snd_seq_port_info {
 | 
					struct snd_seq_port_info {
 | 
				
			||||||
	struct snd_seq_addr addr;	/* client/port numbers */
 | 
						struct snd_seq_addr addr;	/* client/port numbers */
 | 
				
			||||||
	char name[64];			/* port name */
 | 
						char name[64];			/* port name */
 | 
				
			||||||
| 
						 | 
					@ -464,7 +495,9 @@ struct snd_seq_port_info {
 | 
				
			||||||
	void *kernel;			/* reserved for kernel use (must be NULL) */
 | 
						void *kernel;			/* reserved for kernel use (must be NULL) */
 | 
				
			||||||
	unsigned int flags;		/* misc. conditioning */
 | 
						unsigned int flags;		/* misc. conditioning */
 | 
				
			||||||
	unsigned char time_queue;	/* queue # for timestamping */
 | 
						unsigned char time_queue;	/* queue # for timestamping */
 | 
				
			||||||
	char reserved[59];		/* for future use */
 | 
						unsigned char direction;	/* port usage direction (r/w/bidir) */
 | 
				
			||||||
 | 
						unsigned char ump_group;	/* 0 = UMP EP (no conversion), 1-16 = UMP group number */
 | 
				
			||||||
 | 
						char reserved[57];		/* for future use */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -502,11 +535,12 @@ struct snd_seq_queue_status {
 | 
				
			||||||
/* queue tempo */
 | 
					/* queue tempo */
 | 
				
			||||||
struct snd_seq_queue_tempo {
 | 
					struct snd_seq_queue_tempo {
 | 
				
			||||||
	int queue;			/* sequencer queue */
 | 
						int queue;			/* sequencer queue */
 | 
				
			||||||
	unsigned int tempo;		/* current tempo, us/tick */
 | 
						unsigned int tempo;		/* current tempo, us/tick (or different time-base below) */
 | 
				
			||||||
	int ppq;			/* time resolution, ticks/quarter */
 | 
						int ppq;			/* time resolution, ticks/quarter */
 | 
				
			||||||
	unsigned int skew_value;	/* queue skew */
 | 
						unsigned int skew_value;	/* queue skew */
 | 
				
			||||||
	unsigned int skew_base;		/* queue skew base */
 | 
						unsigned int skew_base;		/* queue skew base */
 | 
				
			||||||
	char reserved[24];		/* for the future */
 | 
						unsigned short tempo_base;	/* tempo base in nsec unit; either 10 or 1000 */
 | 
				
			||||||
 | 
						char reserved[22];		/* for the future */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -568,6 +602,18 @@ struct snd_seq_query_subs {
 | 
				
			||||||
	char reserved[64];	/* for future use */
 | 
						char reserved[64];	/* for future use */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * UMP-specific information
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					/* type of UMP info query */
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_CLIENT_UMP_INFO_ENDPOINT	0
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_CLIENT_UMP_INFO_BLOCK		1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct snd_seq_client_ump_info {
 | 
				
			||||||
 | 
						int client;			/* client number to inquire/set */
 | 
				
			||||||
 | 
						int type;			/* type to inquire/set */
 | 
				
			||||||
 | 
						unsigned char info[512];	/* info (either UMP ep or block info) */
 | 
				
			||||||
 | 
					} __attribute__((packed));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  IOCTL commands
 | 
					 *  IOCTL commands
 | 
				
			||||||
| 
						 | 
					@ -577,9 +623,12 @@ struct snd_seq_query_subs {
 | 
				
			||||||
#define SNDRV_SEQ_IOCTL_CLIENT_ID	_IOR ('S', 0x01, int)
 | 
					#define SNDRV_SEQ_IOCTL_CLIENT_ID	_IOR ('S', 0x01, int)
 | 
				
			||||||
#define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct snd_seq_system_info)
 | 
					#define SNDRV_SEQ_IOCTL_SYSTEM_INFO	_IOWR('S', 0x02, struct snd_seq_system_info)
 | 
				
			||||||
#define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct snd_seq_running_info)
 | 
					#define SNDRV_SEQ_IOCTL_RUNNING_MODE	_IOWR('S', 0x03, struct snd_seq_running_info)
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_IOCTL_USER_PVERSION	_IOW('S', 0x04, int)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct snd_seq_client_info)
 | 
					#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO	_IOWR('S', 0x10, struct snd_seq_client_info)
 | 
				
			||||||
#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct snd_seq_client_info)
 | 
					#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO	_IOW ('S', 0x11, struct snd_seq_client_info)
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_IOCTL_GET_CLIENT_UMP_INFO	_IOWR('S', 0x12, struct snd_seq_client_ump_info)
 | 
				
			||||||
 | 
					#define SNDRV_SEQ_IOCTL_SET_CLIENT_UMP_INFO	_IOWR('S', 0x13, struct snd_seq_client_ump_info)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct snd_seq_port_info)
 | 
					#define SNDRV_SEQ_IOCTL_CREATE_PORT	_IOWR('S', 0x20, struct snd_seq_port_info)
 | 
				
			||||||
#define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct snd_seq_port_info)
 | 
					#define SNDRV_SEQ_IOCTL_DELETE_PORT	_IOW ('S', 0x21, struct snd_seq_port_info)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,9 @@
 | 
				
			||||||
#ifndef __LINUX_UAPI_SND_ASOC_H
 | 
					#ifndef __LINUX_UAPI_SND_ASOC_H
 | 
				
			||||||
#define __LINUX_UAPI_SND_ASOC_H
 | 
					#define __LINUX_UAPI_SND_ASOC_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if defined(__linux__)
 | 
				
			||||||
#include <linux/types.h>
 | 
					#include <linux/types.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Maximum number of channels topology kcontrol can represent.
 | 
					 * Maximum number of channels topology kcontrol can represent.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,22 +3,6 @@
 | 
				
			||||||
 *  Advanced Linux Sound Architecture - ALSA - Driver
 | 
					 *  Advanced Linux Sound Architecture - ALSA - Driver
 | 
				
			||||||
 *  Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
 | 
					 *  Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
 | 
				
			||||||
 *                             Abramo Bagnara <abramo@alsa-project.org>
 | 
					 *                             Abramo Bagnara <abramo@alsa-project.org>
 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This program is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *   it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
 *   the Free Software Foundation; either version 2 of the License, or
 | 
					 | 
				
			||||||
 *   (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *   GNU General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
 *   along with this program; if not, write to the Free Software
 | 
					 | 
				
			||||||
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __SOUND_ASOUND_H
 | 
					#ifndef __SOUND_ASOUND_H
 | 
				
			||||||
| 
						 | 
					@ -54,8 +38,10 @@
 | 
				
			||||||
 *                                                                          *
 | 
					 *                                                                          *
 | 
				
			||||||
 ****************************************************************************/
 | 
					 ****************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define AES_IEC958_STATUS_SIZE		24
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct snd_aes_iec958 {
 | 
					struct snd_aes_iec958 {
 | 
				
			||||||
	unsigned char status[24];	/* AES/IEC958 channel status bits */
 | 
						unsigned char status[AES_IEC958_STATUS_SIZE]; /* AES/IEC958 channel status bits */
 | 
				
			||||||
	unsigned char subcode[147];	/* AES/IEC958 subcode bits */
 | 
						unsigned char subcode[147];	/* AES/IEC958 subcode bits */
 | 
				
			||||||
	unsigned char pad;		/* nothing */
 | 
						unsigned char pad;		/* nothing */
 | 
				
			||||||
	unsigned char dig_subframe[4];	/* AES/IEC958 subframe bits */
 | 
						unsigned char dig_subframe[4];	/* AES/IEC958 subframe bits */
 | 
				
			||||||
| 
						 | 
					@ -154,7 +140,7 @@ struct snd_hwdep_dsp_image {
 | 
				
			||||||
 *                                                                           *
 | 
					 *                                                                           *
 | 
				
			||||||
 *****************************************************************************/
 | 
					 *****************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_PCM_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 15)
 | 
					#define SNDRV_PCM_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 18)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef unsigned long snd_pcm_uframes_t;
 | 
					typedef unsigned long snd_pcm_uframes_t;
 | 
				
			||||||
typedef signed long snd_pcm_sframes_t;
 | 
					typedef signed long snd_pcm_sframes_t;
 | 
				
			||||||
| 
						 | 
					@ -200,6 +186,11 @@ typedef int __bitwise snd_pcm_format_t;
 | 
				
			||||||
#define	SNDRV_PCM_FORMAT_S24_BE	((snd_pcm_format_t) 7) /* low three bytes */
 | 
					#define	SNDRV_PCM_FORMAT_S24_BE	((snd_pcm_format_t) 7) /* low three bytes */
 | 
				
			||||||
#define	SNDRV_PCM_FORMAT_U24_LE	((snd_pcm_format_t) 8) /* low three bytes */
 | 
					#define	SNDRV_PCM_FORMAT_U24_LE	((snd_pcm_format_t) 8) /* low three bytes */
 | 
				
			||||||
#define	SNDRV_PCM_FORMAT_U24_BE	((snd_pcm_format_t) 9) /* low three bytes */
 | 
					#define	SNDRV_PCM_FORMAT_U24_BE	((snd_pcm_format_t) 9) /* low three bytes */
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * For S32/U32 formats, 'msbits' hardware parameter is often used to deliver information about the
 | 
				
			||||||
 | 
					 * available bit count in most significant bit. It's for the case of so-called 'left-justified' or
 | 
				
			||||||
 | 
					 * `right-padding` sample which has less width than 32 bit.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
#define	SNDRV_PCM_FORMAT_S32_LE	((snd_pcm_format_t) 10)
 | 
					#define	SNDRV_PCM_FORMAT_S32_LE	((snd_pcm_format_t) 10)
 | 
				
			||||||
#define	SNDRV_PCM_FORMAT_S32_BE	((snd_pcm_format_t) 11)
 | 
					#define	SNDRV_PCM_FORMAT_S32_BE	((snd_pcm_format_t) 11)
 | 
				
			||||||
#define	SNDRV_PCM_FORMAT_U32_LE	((snd_pcm_format_t) 12)
 | 
					#define	SNDRV_PCM_FORMAT_U32_LE	((snd_pcm_format_t) 12)
 | 
				
			||||||
| 
						 | 
					@ -274,13 +265,17 @@ typedef int __bitwise snd_pcm_format_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef int __bitwise snd_pcm_subformat_t;
 | 
					typedef int __bitwise snd_pcm_subformat_t;
 | 
				
			||||||
#define	SNDRV_PCM_SUBFORMAT_STD		((snd_pcm_subformat_t) 0)
 | 
					#define	SNDRV_PCM_SUBFORMAT_STD		((snd_pcm_subformat_t) 0)
 | 
				
			||||||
#define	SNDRV_PCM_SUBFORMAT_LAST	SNDRV_PCM_SUBFORMAT_STD
 | 
					#define	SNDRV_PCM_SUBFORMAT_MSBITS_MAX	((snd_pcm_subformat_t) 1)
 | 
				
			||||||
 | 
					#define	SNDRV_PCM_SUBFORMAT_MSBITS_20	((snd_pcm_subformat_t) 2)
 | 
				
			||||||
 | 
					#define	SNDRV_PCM_SUBFORMAT_MSBITS_24	((snd_pcm_subformat_t) 3)
 | 
				
			||||||
 | 
					#define	SNDRV_PCM_SUBFORMAT_LAST	SNDRV_PCM_SUBFORMAT_MSBITS_24
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_PCM_INFO_MMAP		0x00000001	/* hardware supports mmap */
 | 
					#define SNDRV_PCM_INFO_MMAP		0x00000001	/* hardware supports mmap */
 | 
				
			||||||
#define SNDRV_PCM_INFO_MMAP_VALID	0x00000002	/* period data are valid during transfer */
 | 
					#define SNDRV_PCM_INFO_MMAP_VALID	0x00000002	/* period data are valid during transfer */
 | 
				
			||||||
#define SNDRV_PCM_INFO_DOUBLE		0x00000004	/* Double buffering needed for PCM start/stop */
 | 
					#define SNDRV_PCM_INFO_DOUBLE		0x00000004	/* Double buffering needed for PCM start/stop */
 | 
				
			||||||
#define SNDRV_PCM_INFO_BATCH		0x00000010	/* double buffering */
 | 
					#define SNDRV_PCM_INFO_BATCH		0x00000010	/* double buffering */
 | 
				
			||||||
#define SNDRV_PCM_INFO_SYNC_APPLPTR	0x00000020	/* need the explicit sync of appl_ptr update */
 | 
					#define SNDRV_PCM_INFO_SYNC_APPLPTR	0x00000020	/* need the explicit sync of appl_ptr update */
 | 
				
			||||||
 | 
					#define SNDRV_PCM_INFO_PERFECT_DRAIN	0x00000040	/* silencing at the end of stream is not required */
 | 
				
			||||||
#define SNDRV_PCM_INFO_INTERLEAVED	0x00000100	/* channels are interleaved */
 | 
					#define SNDRV_PCM_INFO_INTERLEAVED	0x00000100	/* channels are interleaved */
 | 
				
			||||||
#define SNDRV_PCM_INFO_NONINTERLEAVED	0x00000200	/* channels are not interleaved */
 | 
					#define SNDRV_PCM_INFO_NONINTERLEAVED	0x00000200	/* channels are not interleaved */
 | 
				
			||||||
#define SNDRV_PCM_INFO_COMPLEX		0x00000400	/* complex frame organization (mmap only) */
 | 
					#define SNDRV_PCM_INFO_COMPLEX		0x00000400	/* complex frame organization (mmap only) */
 | 
				
			||||||
| 
						 | 
					@ -297,7 +292,8 @@ typedef int __bitwise snd_pcm_subformat_t;
 | 
				
			||||||
#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME     0x02000000  /* report absolute hardware link audio time, not reset on startup */
 | 
					#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME     0x02000000  /* report absolute hardware link audio time, not reset on startup */
 | 
				
			||||||
#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME    0x04000000  /* report estimated link audio time */
 | 
					#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME    0x04000000  /* report estimated link audio time */
 | 
				
			||||||
#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000  /* report synchronized audio/system time */
 | 
					#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000  /* report synchronized audio/system time */
 | 
				
			||||||
 | 
					#define SNDRV_PCM_INFO_EXPLICIT_SYNC	0x10000000	/* needs explicit sync of pointers and data */
 | 
				
			||||||
 | 
					#define SNDRV_PCM_INFO_NO_REWINDS	0x20000000	/* hardware can only support monotonic changes of appl_ptr */
 | 
				
			||||||
#define SNDRV_PCM_INFO_DRAIN_TRIGGER	0x40000000		/* internal kernel flag - trigger in drain */
 | 
					#define SNDRV_PCM_INFO_DRAIN_TRIGGER	0x40000000		/* internal kernel flag - trigger in drain */
 | 
				
			||||||
#define SNDRV_PCM_INFO_FIFO_IN_FRAMES	0x80000000	/* internal kernel flag - FIFO size is in frames */
 | 
					#define SNDRV_PCM_INFO_FIFO_IN_FRAMES	0x80000000	/* internal kernel flag - FIFO size is in frames */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -336,7 +332,7 @@ union snd_pcm_sync_id {
 | 
				
			||||||
	unsigned char id[16];
 | 
						unsigned char id[16];
 | 
				
			||||||
	unsigned short id16[8];
 | 
						unsigned short id16[8];
 | 
				
			||||||
	unsigned int id32[4];
 | 
						unsigned int id32[4];
 | 
				
			||||||
};
 | 
					} __attribute__((deprecated));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct snd_pcm_info {
 | 
					struct snd_pcm_info {
 | 
				
			||||||
	unsigned int device;		/* RO/WR (control): device number */
 | 
						unsigned int device;		/* RO/WR (control): device number */
 | 
				
			||||||
| 
						 | 
					@ -350,7 +346,7 @@ struct snd_pcm_info {
 | 
				
			||||||
	int dev_subclass;		/* SNDRV_PCM_SUBCLASS_* */
 | 
						int dev_subclass;		/* SNDRV_PCM_SUBCLASS_* */
 | 
				
			||||||
	unsigned int subdevices_count;
 | 
						unsigned int subdevices_count;
 | 
				
			||||||
	unsigned int subdevices_avail;
 | 
						unsigned int subdevices_avail;
 | 
				
			||||||
	union snd_pcm_sync_id sync;	/* hardware synchronization ID */
 | 
						unsigned char pad1[16];		/* was: hardware synchronization ID */
 | 
				
			||||||
	unsigned char reserved[64];	/* reserved for future... */
 | 
						unsigned char reserved[64];	/* reserved for future... */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -389,6 +385,9 @@ typedef int snd_pcm_hw_param_t;
 | 
				
			||||||
#define SNDRV_PCM_HW_PARAMS_NORESAMPLE	(1<<0)	/* avoid rate resampling */
 | 
					#define SNDRV_PCM_HW_PARAMS_NORESAMPLE	(1<<0)	/* avoid rate resampling */
 | 
				
			||||||
#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER	(1<<1)	/* export buffer */
 | 
					#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER	(1<<1)	/* export buffer */
 | 
				
			||||||
#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP	(1<<2)	/* disable period wakeups */
 | 
					#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP	(1<<2)	/* disable period wakeups */
 | 
				
			||||||
 | 
					#define SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE	(1<<3)	/* suppress drain with the filling
 | 
				
			||||||
 | 
												 * of the silence samples
 | 
				
			||||||
 | 
												 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct snd_interval {
 | 
					struct snd_interval {
 | 
				
			||||||
	unsigned int min, max;
 | 
						unsigned int min, max;
 | 
				
			||||||
| 
						 | 
					@ -415,11 +414,12 @@ struct snd_pcm_hw_params {
 | 
				
			||||||
	unsigned int rmask;		/* W: requested masks */
 | 
						unsigned int rmask;		/* W: requested masks */
 | 
				
			||||||
	unsigned int cmask;		/* R: changed masks */
 | 
						unsigned int cmask;		/* R: changed masks */
 | 
				
			||||||
	unsigned int info;		/* R: Info flags for returned setup */
 | 
						unsigned int info;		/* R: Info flags for returned setup */
 | 
				
			||||||
	unsigned int msbits;		/* R: used most significant bits */
 | 
						unsigned int msbits;		/* R: used most significant bits (in sample bit-width) */
 | 
				
			||||||
	unsigned int rate_num;		/* R: rate numerator */
 | 
						unsigned int rate_num;		/* R: rate numerator */
 | 
				
			||||||
	unsigned int rate_den;		/* R: rate denominator */
 | 
						unsigned int rate_den;		/* R: rate denominator */
 | 
				
			||||||
	snd_pcm_uframes_t fifo_size;	/* R: chip FIFO size in frames */
 | 
						snd_pcm_uframes_t fifo_size;	/* R: chip FIFO size in frames */
 | 
				
			||||||
	unsigned char reserved[64];	/* reserved for future */
 | 
						unsigned char sync[16];         /* R: synchronization ID (perfect sync - one clock source) */
 | 
				
			||||||
 | 
						unsigned char reserved[48];	/* reserved for future */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum {
 | 
					enum {
 | 
				
			||||||
| 
						 | 
					@ -435,9 +435,14 @@ struct snd_pcm_sw_params {
 | 
				
			||||||
	snd_pcm_uframes_t avail_min;		/* min avail frames for wakeup */
 | 
						snd_pcm_uframes_t avail_min;		/* min avail frames for wakeup */
 | 
				
			||||||
	snd_pcm_uframes_t xfer_align;		/* obsolete: xfer size need to be a multiple */
 | 
						snd_pcm_uframes_t xfer_align;		/* obsolete: xfer size need to be a multiple */
 | 
				
			||||||
	snd_pcm_uframes_t start_threshold;	/* min hw_avail frames for automatic start */
 | 
						snd_pcm_uframes_t start_threshold;	/* min hw_avail frames for automatic start */
 | 
				
			||||||
	snd_pcm_uframes_t stop_threshold;	/* min avail frames for automatic stop */
 | 
						/*
 | 
				
			||||||
	snd_pcm_uframes_t silence_threshold;	/* min distance from noise for silence filling */
 | 
						 * The following two thresholds alleviate playback buffer underruns; when
 | 
				
			||||||
	snd_pcm_uframes_t silence_size;		/* silence block size */
 | 
						 * hw_avail drops below the threshold, the respective action is triggered:
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						snd_pcm_uframes_t stop_threshold;	/* - stop playback */
 | 
				
			||||||
 | 
						snd_pcm_uframes_t silence_threshold;	/* - pre-fill buffer with silence */
 | 
				
			||||||
 | 
						snd_pcm_uframes_t silence_size;		/* max size of silence pre-fill; when >= boundary,
 | 
				
			||||||
 | 
											 * fill played area with silence immediately */
 | 
				
			||||||
	snd_pcm_uframes_t boundary;		/* pointers wrap point */
 | 
						snd_pcm_uframes_t boundary;		/* pointers wrap point */
 | 
				
			||||||
	unsigned int proto;			/* protocol version */
 | 
						unsigned int proto;			/* protocol version */
 | 
				
			||||||
	unsigned int tstamp_type;		/* timestamp type (req. proto >= 2.0.12) */
 | 
						unsigned int tstamp_type;		/* timestamp type (req. proto >= 2.0.12) */
 | 
				
			||||||
| 
						 | 
					@ -570,7 +575,8 @@ struct __snd_pcm_mmap_status64 {
 | 
				
			||||||
struct __snd_pcm_mmap_control64 {
 | 
					struct __snd_pcm_mmap_control64 {
 | 
				
			||||||
	__pad_before_uframe __pad1;
 | 
						__pad_before_uframe __pad1;
 | 
				
			||||||
	snd_pcm_uframes_t appl_ptr;	 /* RW: appl ptr (0...boundary-1) */
 | 
						snd_pcm_uframes_t appl_ptr;	 /* RW: appl ptr (0...boundary-1) */
 | 
				
			||||||
	__pad_before_uframe __pad2;
 | 
						__pad_before_uframe __pad2;	 // This should be __pad_after_uframe, but binary
 | 
				
			||||||
 | 
										 // backwards compatibility constraints prevent a fix.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__pad_before_uframe __pad3;
 | 
						__pad_before_uframe __pad3;
 | 
				
			||||||
	snd_pcm_uframes_t  avail_min;	 /* RW: min available frames for wakeup */
 | 
						snd_pcm_uframes_t  avail_min;	 /* RW: min available frames for wakeup */
 | 
				
			||||||
| 
						 | 
					@ -702,7 +708,7 @@ enum {
 | 
				
			||||||
 *  Raw MIDI section - /dev/snd/midi??
 | 
					 *  Raw MIDI section - /dev/snd/midi??
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_RAWMIDI_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 2)
 | 
					#define SNDRV_RAWMIDI_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum {
 | 
					enum {
 | 
				
			||||||
	SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
 | 
						SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
 | 
				
			||||||
| 
						 | 
					@ -713,6 +719,10 @@ enum {
 | 
				
			||||||
#define SNDRV_RAWMIDI_INFO_OUTPUT		0x00000001
 | 
					#define SNDRV_RAWMIDI_INFO_OUTPUT		0x00000001
 | 
				
			||||||
#define SNDRV_RAWMIDI_INFO_INPUT		0x00000002
 | 
					#define SNDRV_RAWMIDI_INFO_INPUT		0x00000002
 | 
				
			||||||
#define SNDRV_RAWMIDI_INFO_DUPLEX		0x00000004
 | 
					#define SNDRV_RAWMIDI_INFO_DUPLEX		0x00000004
 | 
				
			||||||
 | 
					#define SNDRV_RAWMIDI_INFO_UMP			0x00000008
 | 
				
			||||||
 | 
					#define SNDRV_RAWMIDI_INFO_STREAM_INACTIVE	0x00000010
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define SNDRV_RAWMIDI_DEVICE_UNKNOWN		0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct snd_rawmidi_info {
 | 
					struct snd_rawmidi_info {
 | 
				
			||||||
	unsigned int device;		/* RO/WR (control): device number */
 | 
						unsigned int device;		/* RO/WR (control): device number */
 | 
				
			||||||
| 
						 | 
					@ -725,7 +735,8 @@ struct snd_rawmidi_info {
 | 
				
			||||||
	unsigned char subname[32];	/* name of active or selected subdevice */
 | 
						unsigned char subname[32];	/* name of active or selected subdevice */
 | 
				
			||||||
	unsigned int subdevices_count;
 | 
						unsigned int subdevices_count;
 | 
				
			||||||
	unsigned int subdevices_avail;
 | 
						unsigned int subdevices_avail;
 | 
				
			||||||
	unsigned char reserved[64];	/* reserved for future use */
 | 
						int tied_device;		/* R: tied rawmidi device (UMP/legacy) */
 | 
				
			||||||
 | 
						unsigned char reserved[60];	/* reserved for future use */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_RAWMIDI_MODE_FRAMING_MASK		(7<<0)
 | 
					#define SNDRV_RAWMIDI_MODE_FRAMING_MASK		(7<<0)
 | 
				
			||||||
| 
						 | 
					@ -751,7 +762,7 @@ struct snd_rawmidi_framing_tstamp {
 | 
				
			||||||
	__u32 tv_nsec;		/* nanoseconds */
 | 
						__u32 tv_nsec;		/* nanoseconds */
 | 
				
			||||||
	__u64 tv_sec;		/* seconds */
 | 
						__u64 tv_sec;		/* seconds */
 | 
				
			||||||
	__u8 data[SNDRV_RAWMIDI_FRAMING_DATA_LENGTH];
 | 
						__u8 data[SNDRV_RAWMIDI_FRAMING_DATA_LENGTH];
 | 
				
			||||||
} __packed;
 | 
					} __attribute__((packed));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct snd_rawmidi_params {
 | 
					struct snd_rawmidi_params {
 | 
				
			||||||
	int stream;
 | 
						int stream;
 | 
				
			||||||
| 
						 | 
					@ -771,6 +782,72 @@ struct snd_rawmidi_status {
 | 
				
			||||||
	unsigned char reserved[16];	/* reserved for future use */
 | 
						unsigned char reserved[16];	/* reserved for future use */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* UMP EP info flags */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_EP_INFO_STATIC_BLOCKS		0x01
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* UMP EP Protocol / JRTS capability bits */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_EP_INFO_PROTO_MIDI_MASK	0x0300
 | 
				
			||||||
 | 
					#define SNDRV_UMP_EP_INFO_PROTO_MIDI1		0x0100 /* MIDI 1.0 */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_EP_INFO_PROTO_MIDI2		0x0200 /* MIDI 2.0 */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_EP_INFO_PROTO_JRTS_MASK	0x0003
 | 
				
			||||||
 | 
					#define SNDRV_UMP_EP_INFO_PROTO_JRTS_TX		0x0001 /* JRTS Transmit */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_EP_INFO_PROTO_JRTS_RX		0x0002 /* JRTS Receive */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* UMP Endpoint information */
 | 
				
			||||||
 | 
					struct snd_ump_endpoint_info {
 | 
				
			||||||
 | 
						int card;			/* card number */
 | 
				
			||||||
 | 
						int device;			/* device number */
 | 
				
			||||||
 | 
						unsigned int flags;		/* additional info */
 | 
				
			||||||
 | 
						unsigned int protocol_caps;	/* protocol capabilities */
 | 
				
			||||||
 | 
						unsigned int protocol;		/* current protocol */
 | 
				
			||||||
 | 
						unsigned int num_blocks;	/* # of function blocks */
 | 
				
			||||||
 | 
						unsigned short version;		/* UMP major/minor version */
 | 
				
			||||||
 | 
						unsigned short family_id;	/* MIDI device family ID */
 | 
				
			||||||
 | 
						unsigned short model_id;	/* MIDI family model ID */
 | 
				
			||||||
 | 
						unsigned int manufacturer_id;	/* MIDI manufacturer ID */
 | 
				
			||||||
 | 
						unsigned char sw_revision[4];	/* software revision */
 | 
				
			||||||
 | 
						unsigned short padding;
 | 
				
			||||||
 | 
						unsigned char name[128];	/* endpoint name string */
 | 
				
			||||||
 | 
						unsigned char product_id[128];	/* unique product id string */
 | 
				
			||||||
 | 
						unsigned char reserved[32];
 | 
				
			||||||
 | 
					} __attribute__((packed));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* UMP direction */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_DIR_INPUT		0x01
 | 
				
			||||||
 | 
					#define SNDRV_UMP_DIR_OUTPUT		0x02
 | 
				
			||||||
 | 
					#define SNDRV_UMP_DIR_BIDIRECTION	0x03
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* UMP block info flags */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_BLOCK_IS_MIDI1	(1U << 0) /* MIDI 1.0 port w/o restrict */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_BLOCK_IS_LOWSPEED	(1U << 1) /* 31.25Kbps B/W MIDI1 port */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* UMP block user-interface hint */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_BLOCK_UI_HINT_UNKNOWN		0x00
 | 
				
			||||||
 | 
					#define SNDRV_UMP_BLOCK_UI_HINT_RECEIVER	0x01
 | 
				
			||||||
 | 
					#define SNDRV_UMP_BLOCK_UI_HINT_SENDER		0x02
 | 
				
			||||||
 | 
					#define SNDRV_UMP_BLOCK_UI_HINT_BOTH		0x03
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* UMP groups and blocks */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_MAX_GROUPS		16
 | 
				
			||||||
 | 
					#define SNDRV_UMP_MAX_BLOCKS		32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* UMP Block information */
 | 
				
			||||||
 | 
					struct snd_ump_block_info {
 | 
				
			||||||
 | 
						int card;			/* card number */
 | 
				
			||||||
 | 
						int device;			/* device number */
 | 
				
			||||||
 | 
						unsigned char block_id;		/* block ID (R/W) */
 | 
				
			||||||
 | 
						unsigned char direction;	/* UMP direction */
 | 
				
			||||||
 | 
						unsigned char active;		/* Activeness */
 | 
				
			||||||
 | 
						unsigned char first_group;	/* first group ID */
 | 
				
			||||||
 | 
						unsigned char num_groups;	/* number of groups */
 | 
				
			||||||
 | 
						unsigned char midi_ci_version;	/* MIDI-CI support version */
 | 
				
			||||||
 | 
						unsigned char sysex8_streams;	/* max number of sysex8 streams */
 | 
				
			||||||
 | 
						unsigned char ui_hint;		/* user interface hint */
 | 
				
			||||||
 | 
						unsigned int flags;		/* various info flags */
 | 
				
			||||||
 | 
						unsigned char name[128];	/* block name string */
 | 
				
			||||||
 | 
						unsigned char reserved[32];
 | 
				
			||||||
 | 
					} __attribute__((packed));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_RAWMIDI_IOCTL_PVERSION	_IOR('W', 0x00, int)
 | 
					#define SNDRV_RAWMIDI_IOCTL_PVERSION	_IOR('W', 0x00, int)
 | 
				
			||||||
#define SNDRV_RAWMIDI_IOCTL_INFO	_IOR('W', 0x01, struct snd_rawmidi_info)
 | 
					#define SNDRV_RAWMIDI_IOCTL_INFO	_IOR('W', 0x01, struct snd_rawmidi_info)
 | 
				
			||||||
#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int)
 | 
					#define SNDRV_RAWMIDI_IOCTL_USER_PVERSION _IOW('W', 0x02, int)
 | 
				
			||||||
| 
						 | 
					@ -778,12 +855,15 @@ struct snd_rawmidi_status {
 | 
				
			||||||
#define SNDRV_RAWMIDI_IOCTL_STATUS	_IOWR('W', 0x20, struct snd_rawmidi_status)
 | 
					#define SNDRV_RAWMIDI_IOCTL_STATUS	_IOWR('W', 0x20, struct snd_rawmidi_status)
 | 
				
			||||||
#define SNDRV_RAWMIDI_IOCTL_DROP	_IOW('W', 0x30, int)
 | 
					#define SNDRV_RAWMIDI_IOCTL_DROP	_IOW('W', 0x30, int)
 | 
				
			||||||
#define SNDRV_RAWMIDI_IOCTL_DRAIN	_IOW('W', 0x31, int)
 | 
					#define SNDRV_RAWMIDI_IOCTL_DRAIN	_IOW('W', 0x31, int)
 | 
				
			||||||
 | 
					/* Additional ioctls for UMP rawmidi devices */
 | 
				
			||||||
 | 
					#define SNDRV_UMP_IOCTL_ENDPOINT_INFO	_IOR('W', 0x40, struct snd_ump_endpoint_info)
 | 
				
			||||||
 | 
					#define SNDRV_UMP_IOCTL_BLOCK_INFO	_IOR('W', 0x41, struct snd_ump_block_info)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Timer section - /dev/snd/timer
 | 
					 *  Timer section - /dev/snd/timer
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_TIMER_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 7)
 | 
					#define SNDRV_TIMER_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 8)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum {
 | 
					enum {
 | 
				
			||||||
	SNDRV_TIMER_CLASS_NONE = -1,
 | 
						SNDRV_TIMER_CLASS_NONE = -1,
 | 
				
			||||||
| 
						 | 
					@ -808,6 +888,7 @@ enum {
 | 
				
			||||||
#define SNDRV_TIMER_GLOBAL_RTC		1	/* unused */
 | 
					#define SNDRV_TIMER_GLOBAL_RTC		1	/* unused */
 | 
				
			||||||
#define SNDRV_TIMER_GLOBAL_HPET		2
 | 
					#define SNDRV_TIMER_GLOBAL_HPET		2
 | 
				
			||||||
#define SNDRV_TIMER_GLOBAL_HRTIMER	3
 | 
					#define SNDRV_TIMER_GLOBAL_HRTIMER	3
 | 
				
			||||||
 | 
					#define SNDRV_TIMER_GLOBAL_UDRIVEN	4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* info flags */
 | 
					/* info flags */
 | 
				
			||||||
#define SNDRV_TIMER_FLG_SLAVE		(1<<0)	/* cannot be controlled */
 | 
					#define SNDRV_TIMER_FLG_SLAVE		(1<<0)	/* cannot be controlled */
 | 
				
			||||||
| 
						 | 
					@ -886,6 +967,18 @@ struct snd_timer_status {
 | 
				
			||||||
	unsigned char reserved[64];	/* reserved */
 | 
						unsigned char reserved[64];	/* reserved */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * This structure describes the userspace-driven timer. Such timers are purely virtual,
 | 
				
			||||||
 | 
					 * and can only be triggered from software (for instance, by userspace application).
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					struct snd_timer_uinfo {
 | 
				
			||||||
 | 
						/* To pretend being a normal timer, we need to know the resolution in ns. */
 | 
				
			||||||
 | 
						__u64 resolution;
 | 
				
			||||||
 | 
						int fd;
 | 
				
			||||||
 | 
						unsigned int id;
 | 
				
			||||||
 | 
						unsigned char reserved[16];
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_TIMER_IOCTL_PVERSION	_IOR('T', 0x00, int)
 | 
					#define SNDRV_TIMER_IOCTL_PVERSION	_IOR('T', 0x00, int)
 | 
				
			||||||
#define SNDRV_TIMER_IOCTL_NEXT_DEVICE	_IOWR('T', 0x01, struct snd_timer_id)
 | 
					#define SNDRV_TIMER_IOCTL_NEXT_DEVICE	_IOWR('T', 0x01, struct snd_timer_id)
 | 
				
			||||||
#define SNDRV_TIMER_IOCTL_TREAD_OLD	_IOW('T', 0x02, int)
 | 
					#define SNDRV_TIMER_IOCTL_TREAD_OLD	_IOW('T', 0x02, int)
 | 
				
			||||||
| 
						 | 
					@ -902,6 +995,8 @@ struct snd_timer_status {
 | 
				
			||||||
#define SNDRV_TIMER_IOCTL_CONTINUE	_IO('T', 0xa2)
 | 
					#define SNDRV_TIMER_IOCTL_CONTINUE	_IO('T', 0xa2)
 | 
				
			||||||
#define SNDRV_TIMER_IOCTL_PAUSE		_IO('T', 0xa3)
 | 
					#define SNDRV_TIMER_IOCTL_PAUSE		_IO('T', 0xa3)
 | 
				
			||||||
#define SNDRV_TIMER_IOCTL_TREAD64	_IOW('T', 0xa4, int)
 | 
					#define SNDRV_TIMER_IOCTL_TREAD64	_IOW('T', 0xa4, int)
 | 
				
			||||||
 | 
					#define SNDRV_TIMER_IOCTL_CREATE	_IOWR('T', 0xa5, struct snd_timer_uinfo)
 | 
				
			||||||
 | 
					#define SNDRV_TIMER_IOCTL_TRIGGER	_IO('T', 0xa6)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if __BITS_PER_LONG == 64
 | 
					#if __BITS_PER_LONG == 64
 | 
				
			||||||
#define SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_TREAD_OLD
 | 
					#define SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_TREAD_OLD
 | 
				
			||||||
| 
						 | 
					@ -949,7 +1044,7 @@ struct snd_timer_tread {
 | 
				
			||||||
 *                                                                          *
 | 
					 *                                                                          *
 | 
				
			||||||
 ****************************************************************************/
 | 
					 ****************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_CTL_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 8)
 | 
					#define SNDRV_CTL_VERSION		SNDRV_PROTOCOL_VERSION(2, 0, 9)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct snd_ctl_card_info {
 | 
					struct snd_ctl_card_info {
 | 
				
			||||||
	int card;			/* card number */
 | 
						int card;			/* card number */
 | 
				
			||||||
| 
						 | 
					@ -987,7 +1082,7 @@ typedef int __bitwise snd_ctl_elem_iface_t;
 | 
				
			||||||
#define SNDRV_CTL_ELEM_ACCESS_WRITE		(1<<1)
 | 
					#define SNDRV_CTL_ELEM_ACCESS_WRITE		(1<<1)
 | 
				
			||||||
#define SNDRV_CTL_ELEM_ACCESS_READWRITE		(SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE)
 | 
					#define SNDRV_CTL_ELEM_ACCESS_READWRITE		(SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE)
 | 
				
			||||||
#define SNDRV_CTL_ELEM_ACCESS_VOLATILE		(1<<2)	/* control value may be changed without a notification */
 | 
					#define SNDRV_CTL_ELEM_ACCESS_VOLATILE		(1<<2)	/* control value may be changed without a notification */
 | 
				
			||||||
// (1 << 3) is unused.
 | 
					/* (1 << 3) is unused. */
 | 
				
			||||||
#define SNDRV_CTL_ELEM_ACCESS_TLV_READ		(1<<4)	/* TLV read is possible */
 | 
					#define SNDRV_CTL_ELEM_ACCESS_TLV_READ		(1<<4)	/* TLV read is possible */
 | 
				
			||||||
#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE		(1<<5)	/* TLV write is possible */
 | 
					#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE		(1<<5)	/* TLV write is possible */
 | 
				
			||||||
#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE	(SNDRV_CTL_ELEM_ACCESS_TLV_READ|SNDRV_CTL_ELEM_ACCESS_TLV_WRITE)
 | 
					#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE	(SNDRV_CTL_ELEM_ACCESS_TLV_READ|SNDRV_CTL_ELEM_ACCESS_TLV_WRITE)
 | 
				
			||||||
| 
						 | 
					@ -1084,7 +1179,7 @@ struct snd_ctl_elem_value {
 | 
				
			||||||
struct snd_ctl_tlv {
 | 
					struct snd_ctl_tlv {
 | 
				
			||||||
	unsigned int numid;	/* control element numeric identification */
 | 
						unsigned int numid;	/* control element numeric identification */
 | 
				
			||||||
	unsigned int length;	/* in bytes aligned to 4 */
 | 
						unsigned int length;	/* in bytes aligned to 4 */
 | 
				
			||||||
	unsigned int tlv[0];	/* first TLV */
 | 
						unsigned int tlv[];	/* first TLV */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define SNDRV_CTL_IOCTL_PVERSION	_IOR('U', 0x00, int)
 | 
					#define SNDRV_CTL_IOCTL_PVERSION	_IOR('U', 0x00, int)
 | 
				
			||||||
| 
						 | 
					@ -1110,6 +1205,9 @@ struct snd_ctl_tlv {
 | 
				
			||||||
#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
 | 
					#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
 | 
				
			||||||
#define SNDRV_CTL_IOCTL_RAWMIDI_INFO	_IOWR('U', 0x41, struct snd_rawmidi_info)
 | 
					#define SNDRV_CTL_IOCTL_RAWMIDI_INFO	_IOWR('U', 0x41, struct snd_rawmidi_info)
 | 
				
			||||||
#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
 | 
					#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
 | 
				
			||||||
 | 
					#define SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE	_IOWR('U', 0x43, int)
 | 
				
			||||||
 | 
					#define SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO _IOWR('U', 0x44, struct snd_ump_endpoint_info)
 | 
				
			||||||
 | 
					#define SNDRV_CTL_IOCTL_UMP_BLOCK_INFO	_IOWR('U', 0x45, struct snd_ump_block_info)
 | 
				
			||||||
#define SNDRV_CTL_IOCTL_POWER		_IOWR('U', 0xd0, int)
 | 
					#define SNDRV_CTL_IOCTL_POWER		_IOWR('U', 0xd0, int)
 | 
				
			||||||
#define SNDRV_CTL_IOCTL_POWER_STATE	_IOR('U', 0xd1, int)
 | 
					#define SNDRV_CTL_IOCTL_POWER_STATE	_IOR('U', 0xd1, int)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/timer.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __ALSA_TIMER_H
 | 
					#ifndef __ALSA_TIMER_H
 | 
				
			||||||
#define __ALSA_TIMER_H
 | 
					#define __ALSA_TIMER_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -219,7 +219,7 @@ extern "C" {
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * <pre>
 | 
					 * <pre>
 | 
				
			||||||
 * SectionData."data element name" {
 | 
					 * SectionData."data element name" {
 | 
				
			||||||
 *	index "1"	#Index number
 | 
					 *	index "1"	# Index number
 | 
				
			||||||
 *	tuples [
 | 
					 *	tuples [
 | 
				
			||||||
 *		"id of the 1st vendor tuples section"
 | 
					 *		"id of the 1st vendor tuples section"
 | 
				
			||||||
 *		"id of the 2nd vendor tuples section"
 | 
					 *		"id of the 2nd vendor tuples section"
 | 
				
			||||||
| 
						 | 
					@ -254,8 +254,6 @@ extern "C" {
 | 
				
			||||||
 * And data of these sections will be merged in the same order as they are
 | 
					 * And data of these sections will be merged in the same order as they are
 | 
				
			||||||
 * in the list, as the element's private data for kernel.
 | 
					 * in the list, as the element's private data for kernel.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * </pre>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  <h6>Vendor Tokens</h6>
 | 
					 *  <h6>Vendor Tokens</h6>
 | 
				
			||||||
 * A vendor token list is defined as a new section. Each token element is
 | 
					 * A vendor token list is defined as a new section. Each token element is
 | 
				
			||||||
 * a pair of string ID and integer value. And both the ID and value are
 | 
					 * a pair of string ID and integer value. And both the ID and value are
 | 
				
			||||||
| 
						 | 
					@ -419,7 +417,7 @@ extern "C" {
 | 
				
			||||||
 *		Values [
 | 
					 *		Values [
 | 
				
			||||||
 *			"value1"
 | 
					 *			"value1"
 | 
				
			||||||
 *			"value2"
 | 
					 *			"value2"
 | 
				
			||||||
			"value3"
 | 
					 *			"value3"
 | 
				
			||||||
 *		]
 | 
					 *		]
 | 
				
			||||||
 * }
 | 
					 * }
 | 
				
			||||||
 * </pre>
 | 
					 * </pre>
 | 
				
			||||||
| 
						 | 
					@ -504,7 +502,7 @@ extern "C" {
 | 
				
			||||||
 *	no_pm "true"			# No PM control bit.
 | 
					 *	no_pm "true"			# No PM control bit.
 | 
				
			||||||
 *	reg "20"			# PM bit register offset
 | 
					 *	reg "20"			# PM bit register offset
 | 
				
			||||||
 *	shift "0"			# PM bit register shift
 | 
					 *	shift "0"			# PM bit register shift
 | 
				
			||||||
 *	invert "1			# PM bit is inverted
 | 
					 *	invert "1"			# PM bit is inverted
 | 
				
			||||||
 *	subseq "8"			# subsequence number
 | 
					 *	subseq "8"			# subsequence number
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *	event_type "1"			# DAPM widget event type
 | 
					 *	event_type "1"			# DAPM widget event type
 | 
				
			||||||
| 
						 | 
					@ -639,7 +637,7 @@ extern "C" {
 | 
				
			||||||
 *		...
 | 
					 *		...
 | 
				
			||||||
 *	]
 | 
					 *	]
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *	default_hw_conf_id "1"		#default HW config ID for init
 | 
					 *	default_hw_conf_id "1"		# default HW config ID for init
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *	# Optional boolean flags
 | 
					 *	# Optional boolean flags
 | 
				
			||||||
 *	symmetric_rates			"true"
 | 
					 *	symmetric_rates			"true"
 | 
				
			||||||
| 
						 | 
					@ -842,7 +840,7 @@ struct snd_tplg_tlv_dbscale_template {
 | 
				
			||||||
	int mute;			/*!< is min dB value mute ? */
 | 
						int mute;			/*!< is min dB value mute ? */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \struct snd_tplg_channel_template
 | 
					/** \struct snd_tplg_channel_elem
 | 
				
			||||||
 * \brief Template type for single channel mapping.
 | 
					 * \brief Template type for single channel mapping.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
struct snd_tplg_channel_elem {
 | 
					struct snd_tplg_channel_elem {
 | 
				
			||||||
| 
						 | 
					@ -1023,26 +1021,26 @@ struct snd_tplg_pcm_template {
 | 
				
			||||||
 * hardware config, i.e. hardware audio formats.
 | 
					 * hardware config, i.e. hardware audio formats.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
struct snd_tplg_hw_config_template {
 | 
					struct snd_tplg_hw_config_template {
 | 
				
			||||||
	int id;                         /* unique ID - - used to match */
 | 
						int id;                         /*!< unique ID - - used to match */
 | 
				
			||||||
	unsigned int fmt;               /* SND_SOC_DAI_FORMAT_ format value */
 | 
						unsigned int fmt;               /*!< SND_SOC_DAI_FORMAT_ format value */
 | 
				
			||||||
	unsigned char clock_gated;      /* SND_SOC_TPLG_DAI_CLK_GATE_ value */
 | 
						unsigned char clock_gated;      /*!< SND_SOC_TPLG_DAI_CLK_GATE_ value */
 | 
				
			||||||
	unsigned char  invert_bclk;     /* 1 for inverted BCLK, 0 for normal */
 | 
						unsigned char  invert_bclk;     /*!< 1 for inverted BCLK, 0 for normal */
 | 
				
			||||||
	unsigned char  invert_fsync;    /* 1 for inverted frame clock, 0 for normal */
 | 
						unsigned char  invert_fsync;    /*!< 1 for inverted frame clock, 0 for normal */
 | 
				
			||||||
	unsigned char  bclk_provider;   /* SND_SOC_TPLG_BCLK_ value */
 | 
						unsigned char  bclk_provider;   /*!< SND_SOC_TPLG_BCLK_ value */
 | 
				
			||||||
	unsigned char  fsync_provider;  /* SND_SOC_TPLG_FSYNC_ value */
 | 
						unsigned char  fsync_provider;  /*!< SND_SOC_TPLG_FSYNC_ value */
 | 
				
			||||||
	unsigned char  mclk_direction;  /* SND_SOC_TPLG_MCLK_ value */
 | 
						unsigned char  mclk_direction;  /*!< SND_SOC_TPLG_MCLK_ value */
 | 
				
			||||||
	unsigned short reserved;        /* for 32bit alignment */
 | 
						unsigned short reserved;        /*!< for 32bit alignment */
 | 
				
			||||||
	unsigned int mclk_rate;	        /* MCLK or SYSCLK freqency in Hz */
 | 
						unsigned int mclk_rate;	        /*!< MCLK or SYSCLK freqency in Hz */
 | 
				
			||||||
	unsigned int bclk_rate;	        /* BCLK freqency in Hz */
 | 
						unsigned int bclk_rate;	        /*!< BCLK freqency in Hz */
 | 
				
			||||||
	unsigned int fsync_rate;        /* frame clock in Hz */
 | 
						unsigned int fsync_rate;        /*!< frame clock in Hz */
 | 
				
			||||||
	unsigned int tdm_slots;         /* number of TDM slots in use */
 | 
						unsigned int tdm_slots;         /*!< number of TDM slots in use */
 | 
				
			||||||
	unsigned int tdm_slot_width;    /* width in bits for each slot */
 | 
						unsigned int tdm_slot_width;    /*!< width in bits for each slot */
 | 
				
			||||||
	unsigned int tx_slots;          /* bit mask for active Tx slots */
 | 
						unsigned int tx_slots;          /*!< bit mask for active Tx slots */
 | 
				
			||||||
	unsigned int rx_slots;          /* bit mask for active Rx slots */
 | 
						unsigned int rx_slots;          /*!< bit mask for active Rx slots */
 | 
				
			||||||
	unsigned int tx_channels;       /* number of Tx channels */
 | 
						unsigned int tx_channels;       /*!< number of Tx channels */
 | 
				
			||||||
	unsigned int *tx_chanmap;       /* array of slot number */
 | 
						unsigned int *tx_chanmap;       /*!< array of slot number */
 | 
				
			||||||
	unsigned int rx_channels;       /* number of Rx channels */
 | 
						unsigned int rx_channels;       /*!< number of Rx channels */
 | 
				
			||||||
	unsigned int *rx_chanmap;       /* array of slot number */
 | 
						unsigned int *rx_chanmap;       /*!< array of slot number */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \struct snd_tplg_dai_template
 | 
					/** \struct snd_tplg_dai_template
 | 
				
			||||||
| 
						 | 
					@ -1073,15 +1071,15 @@ struct snd_tplg_link_template {
 | 
				
			||||||
	struct snd_tplg_stream_template *stream;       /*!< supported configs */
 | 
						struct snd_tplg_stream_template *stream;       /*!< supported configs */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct snd_tplg_hw_config_template *hw_config; /*!< supported HW configs */
 | 
						struct snd_tplg_hw_config_template *hw_config; /*!< supported HW configs */
 | 
				
			||||||
	int num_hw_configs;		/* number of hw configs */
 | 
						int num_hw_configs;		/*!< number of hw configs */
 | 
				
			||||||
	int default_hw_config_id;       /* default hw config ID for init */
 | 
						int default_hw_config_id;       /*!< default hw config ID for init */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	unsigned int flag_mask;         /* bitmask of flags to configure */
 | 
						unsigned int flag_mask;         /*!< bitmask of flags to configure */
 | 
				
			||||||
	unsigned int flags;             /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */
 | 
						unsigned int flags;             /*!< SND_SOC_TPLG_LNK_FLGBIT_* flag value */
 | 
				
			||||||
	struct snd_soc_tplg_private *priv; /*!< private data */
 | 
						struct snd_soc_tplg_private *priv; /*!< private data */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** \struct snd_tplg_obj_template
 | 
					/** \struct snd_tplg_obj_template_t
 | 
				
			||||||
 * \brief Generic Template Object
 | 
					 * \brief Generic Template Object
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
typedef struct snd_tplg_obj_template {
 | 
					typedef struct snd_tplg_obj_template {
 | 
				
			||||||
| 
						 | 
					@ -1154,7 +1152,13 @@ int snd_tplg_set_version(snd_tplg_t *tplg, unsigned int version);
 | 
				
			||||||
 * \brief Save the topology to the text configuration string.
 | 
					 * \brief Save the topology to the text configuration string.
 | 
				
			||||||
 * \param tplg Topology instance.
 | 
					 * \param tplg Topology instance.
 | 
				
			||||||
 * \param dst A pointer to string with result (malloc).
 | 
					 * \param dst A pointer to string with result (malloc).
 | 
				
			||||||
 | 
					 * \param flags save mode
 | 
				
			||||||
 * \return Zero on success, otherwise a negative error code
 | 
					 * \return Zero on success, otherwise a negative error code
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Valid flags are
 | 
				
			||||||
 | 
					 *    - SND_TPLG_SAVE_SORT
 | 
				
			||||||
 | 
					 *    - SND_TPLG_SAVE_GROUPS
 | 
				
			||||||
 | 
					 *    - SND_TPLG_SAVE_NOCHECK
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int snd_tplg_save(snd_tplg_t *tplg, char **dst, int flags);
 | 
					int snd_tplg_save(snd_tplg_t *tplg, char **dst, int flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1163,11 +1167,12 @@ int snd_tplg_save(snd_tplg_t *tplg, char **dst, int flags);
 | 
				
			||||||
 * \param tplg Topology instance.
 | 
					 * \param tplg Topology instance.
 | 
				
			||||||
 * \param bin Binary topology input buffer.
 | 
					 * \param bin Binary topology input buffer.
 | 
				
			||||||
 * \param size Binary topology input buffer size.
 | 
					 * \param size Binary topology input buffer size.
 | 
				
			||||||
 | 
					 * \param dflags - not used, must be set to 0.
 | 
				
			||||||
 * \return Zero on success, otherwise a negative error code
 | 
					 * \return Zero on success, otherwise a negative error code
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int snd_tplg_decode(snd_tplg_t *tplg, void *bin, size_t size, int dflags);
 | 
					int snd_tplg_decode(snd_tplg_t *tplg, void *bin, size_t size, int dflags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* \} */
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,7 +26,7 @@
 | 
				
			||||||
#define EBADFD EBADF
 | 
					#define EBADFD EBADF
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifndef ESTRPIPE
 | 
					#ifndef ESTRPIPE
 | 
				
			||||||
#define ESTRPIPE EPIPE
 | 
					#define ESTRPIPE ESPIPE
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef __u16
 | 
					#ifndef __u16
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										189
									
								
								include/ump.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										189
									
								
								include/ump.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,189 @@
 | 
				
			||||||
 | 
					/* SPDX-License-Identifier: LGPL-2.1+ */
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * \file include/ump.h
 | 
				
			||||||
 | 
					 * \brief API library for ALSA rawmidi/UMP interface
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * API library for ALSA rawmidi/UMP interface
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if !defined(__ASOUNDLIB_H) && !defined(ALSA_LIBRARY_BUILD)
 | 
				
			||||||
 | 
					/* don't use ALSA_LIBRARY_BUILD define in sources outside alsa-lib */
 | 
				
			||||||
 | 
					#warning "use #include <alsa/asoundlib.h>, <alsa/ump.h> should not be used directly"
 | 
				
			||||||
 | 
					#include <alsa/asoundlib.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __ALSA_UMP_H
 | 
				
			||||||
 | 
					#define __ALSA_UMP_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __cplusplus
 | 
				
			||||||
 | 
					extern "C" {
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 *  \defgroup RawMidi RawMidi Interface
 | 
				
			||||||
 | 
					 *  The RawMidi Interface. See \ref rawmidi page for more details.
 | 
				
			||||||
 | 
					 *  \{
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** UMP (Endpoint) RawMIDI device */
 | 
				
			||||||
 | 
					typedef struct _snd_ump snd_ump_t;
 | 
				
			||||||
 | 
					/** UMP Endpoint information container */
 | 
				
			||||||
 | 
					typedef struct snd_ump_endpoint_info snd_ump_endpoint_info_t;
 | 
				
			||||||
 | 
					/** UMP Block information container */
 | 
				
			||||||
 | 
					typedef struct snd_ump_block_info snd_ump_block_info_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int snd_ump_open(snd_ump_t **inputp, snd_ump_t **outputp, const char *name, int mode);
 | 
				
			||||||
 | 
					int snd_ump_close(snd_ump_t *ump);
 | 
				
			||||||
 | 
					snd_rawmidi_t *snd_ump_rawmidi(snd_ump_t *ump);
 | 
				
			||||||
 | 
					const char *snd_ump_name(snd_ump_t *ump);
 | 
				
			||||||
 | 
					int snd_ump_poll_descriptors_count(snd_ump_t *ump);
 | 
				
			||||||
 | 
					int snd_ump_poll_descriptors(snd_ump_t *ump, struct pollfd *pfds, unsigned int space);
 | 
				
			||||||
 | 
					int snd_ump_poll_descriptors_revents(snd_ump_t *ump, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
 | 
				
			||||||
 | 
					int snd_ump_nonblock(snd_ump_t *ump, int nonblock);
 | 
				
			||||||
 | 
					int snd_ump_rawmidi_info(snd_ump_t *ump, snd_rawmidi_info_t *info);
 | 
				
			||||||
 | 
					int snd_ump_rawmidi_params(snd_ump_t *ump, snd_rawmidi_params_t *params);
 | 
				
			||||||
 | 
					int snd_ump_rawmidi_params_current(snd_ump_t *ump, snd_rawmidi_params_t *params);
 | 
				
			||||||
 | 
					int snd_ump_rawmidi_status(snd_ump_t *ump, snd_rawmidi_status_t *status);
 | 
				
			||||||
 | 
					int snd_ump_drop(snd_ump_t *ump);
 | 
				
			||||||
 | 
					int snd_ump_drain(snd_ump_t *ump);
 | 
				
			||||||
 | 
					ssize_t snd_ump_write(snd_ump_t *ump, const void *buffer, size_t size);
 | 
				
			||||||
 | 
					ssize_t snd_ump_read(snd_ump_t *ump, void *buffer, size_t size);
 | 
				
			||||||
 | 
					ssize_t snd_ump_tread(snd_ump_t *ump, struct timespec *tstamp, void *buffer, size_t size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** Max number of UMP Groups */
 | 
				
			||||||
 | 
					#define SND_UMP_MAX_GROUPS		16
 | 
				
			||||||
 | 
					/** Max number of UMP Blocks */
 | 
				
			||||||
 | 
					#define SND_UMP_MAX_BLOCKS		32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** UMP direction */
 | 
				
			||||||
 | 
					enum _snd_ump_direction {
 | 
				
			||||||
 | 
						/** Input only */
 | 
				
			||||||
 | 
						SND_UMP_DIR_INPUT =		0x01,
 | 
				
			||||||
 | 
						/** Output only */
 | 
				
			||||||
 | 
						SND_UMP_DIR_OUTPUT =		0x02,
 | 
				
			||||||
 | 
						/** Bidirectional */
 | 
				
			||||||
 | 
						SND_UMP_DIR_BIDIRECTION	=	0x03,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** UMP EP holds only static blocks */
 | 
				
			||||||
 | 
					#define SND_UMP_EP_INFO_STATIC_BLOCKS		0x01
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** Bitmask for UMP EP MIDI protocols */
 | 
				
			||||||
 | 
					#define SND_UMP_EP_INFO_PROTO_MIDI_MASK		0x0300
 | 
				
			||||||
 | 
					/** Bit flag for MIDI 1.0 protocol */
 | 
				
			||||||
 | 
					#define SND_UMP_EP_INFO_PROTO_MIDI1		0x0100
 | 
				
			||||||
 | 
					/** Bit flag for MIDI 2.0 protocol */
 | 
				
			||||||
 | 
					#define SND_UMP_EP_INFO_PROTO_MIDI2		0x0200
 | 
				
			||||||
 | 
					/** Bitmask for UMP Jitter-reduction timestamp */
 | 
				
			||||||
 | 
					#define SND_UMP_EP_INFO_PROTO_JRTS_MASK		0x0003
 | 
				
			||||||
 | 
					/** Bit flag for JRTS in Transmit */
 | 
				
			||||||
 | 
					#define SND_UMP_EP_INFO_PROTO_JRTS_TX		0x0001
 | 
				
			||||||
 | 
					/** Bit flag for JRTS in Receive */
 | 
				
			||||||
 | 
					#define SND_UMP_EP_INFO_PROTO_JRTS_RX		0x0002
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** Default version passed to UMP Endpoint info */
 | 
				
			||||||
 | 
					#define SND_UMP_EP_INFO_DEFAULT_VERSION		0x0101
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					size_t snd_ump_endpoint_info_sizeof(void);
 | 
				
			||||||
 | 
					/** \hideinitializer
 | 
				
			||||||
 | 
					 * \brief allocate an invalid #snd_ump_endpoint_info_t using standard alloca
 | 
				
			||||||
 | 
					 * \param ptr returned pointer
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#define snd_ump_endpoint_info_alloca(ptr) __snd_alloca(ptr, snd_ump_endpoint_info)
 | 
				
			||||||
 | 
					int snd_ump_endpoint_info_malloc(snd_ump_endpoint_info_t **info);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_free(snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_clear(snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_copy(snd_ump_endpoint_info_t *dst, const snd_ump_endpoint_info_t *src);
 | 
				
			||||||
 | 
					int snd_ump_endpoint_info_get_card(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					int snd_ump_endpoint_info_get_device(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_endpoint_info_get_flags(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_endpoint_info_get_protocol_caps(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_endpoint_info_get_protocol(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_endpoint_info_get_num_blocks(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_endpoint_info_get_version(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_endpoint_info_get_manufacturer_id(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_endpoint_info_get_family_id(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_endpoint_info_get_model_id(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					const unsigned char *snd_ump_endpoint_info_get_sw_revision(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					const char *snd_ump_endpoint_info_get_name(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					const char *snd_ump_endpoint_info_get_product_id(const snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					int snd_ump_endpoint_info(snd_ump_t *ump, snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_card(snd_ump_endpoint_info_t *info, unsigned int card);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_device(snd_ump_endpoint_info_t *info, unsigned int device);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_flags(snd_ump_endpoint_info_t *info, unsigned int flags);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_protocol_caps(snd_ump_endpoint_info_t *info, unsigned int caps);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_protocol(snd_ump_endpoint_info_t *info, unsigned int protocols);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_num_blocks(snd_ump_endpoint_info_t *info, unsigned int num_blocks);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_version(snd_ump_endpoint_info_t *info, unsigned int version);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_manufacturer_id(snd_ump_endpoint_info_t *info, unsigned int id);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_family_id(snd_ump_endpoint_info_t *info, unsigned int id);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_model_id(snd_ump_endpoint_info_t *info, unsigned int id);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_sw_revision(snd_ump_endpoint_info_t *info, const unsigned char *id);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_name(snd_ump_endpoint_info_t *info, const char *name);
 | 
				
			||||||
 | 
					void snd_ump_endpoint_info_set_product_id(snd_ump_endpoint_info_t *info, const char *id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** Bit flag for MIDI 1.0 port w/o restrict in UMP Block info flags */
 | 
				
			||||||
 | 
					#define SND_UMP_BLOCK_IS_MIDI1		(1U << 0)
 | 
				
			||||||
 | 
					/** Bit flag for 31.25Kbps B/W MIDI1 port in UMP Block info flags */
 | 
				
			||||||
 | 
					#define SND_UMP_BLOCK_IS_LOWSPEED	(1U << 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** UMP block user-interface hint */
 | 
				
			||||||
 | 
					enum _snd_ump_block_ui_hint {
 | 
				
			||||||
 | 
						/** Unknown or undeclared */
 | 
				
			||||||
 | 
						SND_UMP_BLOCK_UI_HINT_UNKNOWN	=	0x00,
 | 
				
			||||||
 | 
						/** Primarily a receiver or a destination for MIDI messages */
 | 
				
			||||||
 | 
						SND_UMP_BLOCK_UI_HINT_RECEIVER =	0x01,
 | 
				
			||||||
 | 
						/** Primarily a sender or a source of MIDI messages */
 | 
				
			||||||
 | 
						SND_UMP_BLOCK_UI_HINT_SENDER =		0x02,
 | 
				
			||||||
 | 
						/** Both a sender and receiver of MIDI messages */
 | 
				
			||||||
 | 
						SND_UMP_BLOCK_UI_HINT_BOTH =		0x03,
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** Default MIDI CI version passed to UMP Block info */
 | 
				
			||||||
 | 
					#define SND_UMP_BLOCK_INFO_DEFAULT_MIDI_CI_VERSION	0x01
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					size_t snd_ump_block_info_sizeof(void);
 | 
				
			||||||
 | 
					/** \hideinitializer
 | 
				
			||||||
 | 
					 * \brief allocate an invalid #snd_ump_block_info_t using standard alloca
 | 
				
			||||||
 | 
					 * \param ptr returned pointer
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#define snd_ump_block_info_alloca(ptr) __snd_alloca(ptr, snd_ump_block_info)
 | 
				
			||||||
 | 
					int snd_ump_block_info_malloc(snd_ump_block_info_t **info);
 | 
				
			||||||
 | 
					void snd_ump_block_info_free(snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					void snd_ump_block_info_clear(snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					void snd_ump_block_info_copy(snd_ump_block_info_t *dst, const snd_ump_block_info_t *src);
 | 
				
			||||||
 | 
					int snd_ump_block_info_get_card(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					int snd_ump_block_info_get_device(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_block_info_get_block_id(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_block_info_get_active(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_block_info_get_flags(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_block_info_get_direction(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_block_info_get_first_group(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_block_info_get_num_groups(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_block_info_get_midi_ci_version(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_block_info_get_sysex8_streams(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					unsigned int snd_ump_block_info_get_ui_hint(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					const char *snd_ump_block_info_get_name(const snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					int snd_ump_block_info(snd_ump_t *ump, snd_ump_block_info_t *info);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_card(snd_ump_block_info_t *info, unsigned int card);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_device(snd_ump_block_info_t *info, unsigned int device);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_block_id(snd_ump_block_info_t *info, unsigned int id);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_active(snd_ump_block_info_t *info, unsigned int active);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_flags(snd_ump_block_info_t *info, unsigned int flags);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_direction(snd_ump_block_info_t *info, unsigned int direction);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_first_group(snd_ump_block_info_t *info, unsigned int first_group);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_num_groups(snd_ump_block_info_t *info, unsigned int num_groups);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_midi_ci_version(snd_ump_block_info_t *info, unsigned int version);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_sysex8_streams(snd_ump_block_info_t *info, unsigned int streams);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_ui_hint(snd_ump_block_info_t *info, unsigned int hint);
 | 
				
			||||||
 | 
					void snd_ump_block_info_set_name(snd_ump_block_info_t *info, const char *name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** \} */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __cplusplus
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif /* __ALSA_UMP_H */
 | 
				
			||||||
							
								
								
									
										1135
									
								
								include/ump_msg.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1135
									
								
								include/ump_msg.h
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
					@ -139,7 +139,7 @@ extern "C" {
 | 
				
			||||||
#define SND_USE_CASE_DEV_BLUETOOTH	"Bluetooth"	/**< Bluetooth Device */
 | 
					#define SND_USE_CASE_DEV_BLUETOOTH	"Bluetooth"	/**< Bluetooth Device */
 | 
				
			||||||
#define SND_USE_CASE_DEV_EARPIECE	"Earpiece"	/**< Earpiece Device */
 | 
					#define SND_USE_CASE_DEV_EARPIECE	"Earpiece"	/**< Earpiece Device */
 | 
				
			||||||
#define SND_USE_CASE_DEV_SPDIF		"SPDIF"		/**< SPDIF Device */
 | 
					#define SND_USE_CASE_DEV_SPDIF		"SPDIF"		/**< SPDIF Device */
 | 
				
			||||||
#define SND_USE_CASE_DEV_HDMI		"HDMI"		/**< HDMI Device */
 | 
					#define SND_USE_CASE_DEV_HDMI		"HDMI"		/**< HDMI / DisplayPort Device */
 | 
				
			||||||
#define SND_USE_CASE_DEV_USB		"USB"		/**< USB Device (multifunctional) */
 | 
					#define SND_USE_CASE_DEV_USB		"USB"		/**< USB Device (multifunctional) */
 | 
				
			||||||
#define SND_USE_CASE_DEV_DIRECT		"Direct"	/**< Direct Device (no channel remapping), (e.g. ProAudio usage) */
 | 
					#define SND_USE_CASE_DEV_DIRECT		"Direct"	/**< Direct Device (no channel remapping), (e.g. ProAudio usage) */
 | 
				
			||||||
/* add new devices to end of list */
 | 
					/* add new devices to end of list */
 | 
				
			||||||
| 
						 | 
					@ -325,10 +325,10 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
 *      - playback control device name
 | 
					 *      - playback control device name
 | 
				
			||||||
 *   - PlaybackVolume
 | 
					 *   - PlaybackVolume
 | 
				
			||||||
 *      - playback control volume identifier string
 | 
					 *      - playback control volume identifier string
 | 
				
			||||||
 *	- can be parsed using snd_use_case_parse_ctl_elem_id()
 | 
					 *      - can be parsed using #snd_use_case_parse_ctl_elem_id()
 | 
				
			||||||
 *   - PlaybackSwitch
 | 
					 *   - PlaybackSwitch
 | 
				
			||||||
 *      - playback control switch identifier string
 | 
					 *      - playback control switch identifier string
 | 
				
			||||||
 *	- can be parsed using snd_use_case_parse_ctl_elem_id()
 | 
					 *	    - can be parsed using #snd_use_case_parse_ctl_elem_id()
 | 
				
			||||||
 *   - PlaybackPriority
 | 
					 *   - PlaybackPriority
 | 
				
			||||||
 *      - priority value (1-10000), higher value means higher priority
 | 
					 *      - priority value (1-10000), higher value means higher priority
 | 
				
			||||||
 *   - CaptureRate
 | 
					 *   - CaptureRate
 | 
				
			||||||
| 
						 | 
					@ -345,20 +345,20 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
 *      - capture control device name
 | 
					 *      - capture control device name
 | 
				
			||||||
 *   - CaptureVolume
 | 
					 *   - CaptureVolume
 | 
				
			||||||
 *      - capture control volume identifier string
 | 
					 *      - capture control volume identifier string
 | 
				
			||||||
 *	- can be parsed using snd_use_case_parse_ctl_elem_id()
 | 
					 *	    - can be parsed using #snd_use_case_parse_ctl_elem_id()
 | 
				
			||||||
 *   - CaptureSwitch
 | 
					 *   - CaptureSwitch
 | 
				
			||||||
 *      - capture control switch identifier string
 | 
					 *      - capture control switch identifier string
 | 
				
			||||||
 *	- can be parsed using snd_use_case_parse_ctl_elem_id()
 | 
					 *	    - can be parsed using #snd_use_case_parse_ctl_elem_id()
 | 
				
			||||||
 *   - CapturePriority
 | 
					 *   - CapturePriority
 | 
				
			||||||
 *      - priority value (1-10000), higher value means higher priority
 | 
					 *      - priority value (1-10000), higher value means higher priority
 | 
				
			||||||
 *   - PlaybackMixer
 | 
					 *   - PlaybackMixer
 | 
				
			||||||
 *      - name of playback mixer
 | 
					 *      - name of playback mixer
 | 
				
			||||||
 *   - PlaybackMixerElem
 | 
					 *   - PlaybackMixerElem
 | 
				
			||||||
 *      - mixer element playback identifier
 | 
					 *      - mixer element playback identifier
 | 
				
			||||||
 *	- can be parsed using snd_use_case_parse_selem_id()
 | 
					 *	    - can be parsed using #snd_use_case_parse_selem_id()
 | 
				
			||||||
 *   - PlaybackMasterElem
 | 
					 *   - PlaybackMasterElem
 | 
				
			||||||
 *      - mixer element playback identifier for the master control
 | 
					 *      - mixer element playback identifier for the master control
 | 
				
			||||||
 *	- can be parsed using snd_use_case_parse_selem_id()
 | 
					 *	    - can be parsed using #snd_use_case_parse_selem_id()
 | 
				
			||||||
 *   - PlaybackMasterType
 | 
					 *   - PlaybackMasterType
 | 
				
			||||||
 *      - type of the master volume control
 | 
					 *      - type of the master volume control
 | 
				
			||||||
 *      - Valid values: "soft" (software attenuation)
 | 
					 *      - Valid values: "soft" (software attenuation)
 | 
				
			||||||
| 
						 | 
					@ -366,13 +366,16 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
 *      - name of capture mixer
 | 
					 *      - name of capture mixer
 | 
				
			||||||
 *   - CaptureMixerElem
 | 
					 *   - CaptureMixerElem
 | 
				
			||||||
 *      - mixer element capture identifier
 | 
					 *      - mixer element capture identifier
 | 
				
			||||||
 *	- can be parsed using snd_use_case_parse_selem_id()
 | 
					 *	    - can be parsed using #snd_use_case_parse_selem_id()
 | 
				
			||||||
 *   - CaptureMasterElem
 | 
					 *   - CaptureMasterElem
 | 
				
			||||||
 *      - mixer element playback identifier for the master control
 | 
					 *      - mixer element playback identifier for the master control
 | 
				
			||||||
 *	- can be parsed using snd_use_case_parse_selem_id()
 | 
					 *	    - can be parsed using #snd_use_case_parse_selem_id()
 | 
				
			||||||
 *   - CaptureMasterType
 | 
					 *   - CaptureMasterType
 | 
				
			||||||
 *      - type of the master volume control
 | 
					 *      - type of the master volume control
 | 
				
			||||||
 *      - Valid values: "soft" (software attenuation)
 | 
					 *      - Valid values: "soft" (software attenuation)
 | 
				
			||||||
 | 
					 *   - CaptureMicInfoFile
 | 
				
			||||||
 | 
					 *      - json file with the microphone array placement and type description
 | 
				
			||||||
 | 
					 *        (e.g. output from nhlt-dmic-info)
 | 
				
			||||||
 *   - EDIDFile
 | 
					 *   - EDIDFile
 | 
				
			||||||
 *      - Path to EDID file for HDMI devices
 | 
					 *      - Path to EDID file for HDMI devices
 | 
				
			||||||
 *   - JackCTL
 | 
					 *   - JackCTL
 | 
				
			||||||
| 
						 | 
					@ -402,9 +405,9 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
 *        but that's application policy configuration that doesn't belong
 | 
					 *        but that's application policy configuration that doesn't belong
 | 
				
			||||||
 *        to UCM configuration files.
 | 
					 *        to UCM configuration files.
 | 
				
			||||||
 *   - MinBufferLevel
 | 
					 *   - MinBufferLevel
 | 
				
			||||||
 *	- This is used on platform where reported buffer level is not accurate.
 | 
					 *	 - This is used on platform where reported buffer level is not accurate.
 | 
				
			||||||
 *	  E.g. "512", which holds 512 samples in device buffer. Note: this will
 | 
					 *	   E.g. "512", which holds 512 samples in device buffer. Note: this will
 | 
				
			||||||
 *	  increase latency.
 | 
					 *	   increase latency.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
 | 
					int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
                     const char *identifier,
 | 
					                     const char *identifier,
 | 
				
			||||||
| 
						 | 
					@ -433,24 +436,24 @@ int snd_use_case_geti(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
 * \return Zero if success, otherwise a negative error code
 | 
					 * \return Zero if success, otherwise a negative error code
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Known identifiers:
 | 
					 * Known identifiers:
 | 
				
			||||||
 *   - _fboot			- execute the fixed boot sequence (value = NULL)
 | 
					 *   - _fboot           - execute the fixed boot sequence (value = NULL)
 | 
				
			||||||
 *   - _boot			- execute the boot sequence (value = NULL)
 | 
					 *   - _boot            - execute the boot sequence (value = NULL)
 | 
				
			||||||
 *				   - only when driver controls identifiers are changed
 | 
					 *                      - only when driver controls identifiers are changed
 | 
				
			||||||
 *				     (otherwise the old control values are restored)
 | 
					 *                        (otherwise the old control values are restored)
 | 
				
			||||||
 *   - _defaults		- execute the 'defaults' sequence (value = NULL)
 | 
					 *   - _defaults        - execute the 'defaults' sequence (value = NULL)
 | 
				
			||||||
 *   - _verb			- set current verb = value
 | 
					 *   - _verb            - set current verb = value
 | 
				
			||||||
 *   - _enadev			- enable given device = value
 | 
					 *   - _enadev          - enable given device = value
 | 
				
			||||||
 *   - _disdev			- disable given device = value
 | 
					 *   - _disdev          - disable given device = value
 | 
				
			||||||
 *   - _swdev/{old_device}	- new_device = value
 | 
					 *   - _swdev/{old_device} - new_device = value
 | 
				
			||||||
 *				  - disable old_device and then enable new_device
 | 
					 *                      - disable old_device and then enable new_device
 | 
				
			||||||
 *				  - if old_device is not enabled just return
 | 
					 *                      - if old_device is not enabled just return
 | 
				
			||||||
 *				  - check transmit sequence firstly
 | 
					 *                      - check transmit sequence firstly
 | 
				
			||||||
 *   - _enamod			- enable given modifier = value
 | 
					 *   - _enamod          - enable given modifier = value
 | 
				
			||||||
 *   - _dismod			- disable given modifier = value
 | 
					 *   - _dismod          - disable given modifier = value
 | 
				
			||||||
 *   - _swmod/{old_modifier}	- new_modifier = value
 | 
					 *   - _swmod/{old_modifier}	- new_modifier = value
 | 
				
			||||||
 *				  - disable old_modifier and then enable new_modifier
 | 
					 *                      - disable old_modifier and then enable new_modifier
 | 
				
			||||||
 *				  - if old_modifier is not enabled just return
 | 
					 *                      - if old_modifier is not enabled just return
 | 
				
			||||||
 *				  - check transmit sequence firstly
 | 
					 *                      - check transmit sequence firstly
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int snd_use_case_set(snd_use_case_mgr_t *uc_mgr,
 | 
					int snd_use_case_set(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
                     const char *identifier,
 | 
					                     const char *identifier,
 | 
				
			||||||
| 
						 | 
					@ -531,7 +534,7 @@ static __inline__ int snd_use_case_verb_list(snd_use_case_mgr_t *uc_mgr,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Parse control element identifier
 | 
					 * \brief Parse control element identifier
 | 
				
			||||||
 * \param elem_id Element identifier
 | 
					 * \param dst Element identifier
 | 
				
			||||||
 * \param ucm_id Use case identifier
 | 
					 * \param ucm_id Use case identifier
 | 
				
			||||||
 * \param value String value to be parsed
 | 
					 * \param value String value to be parsed
 | 
				
			||||||
 * \return Zero if success, otherwise a negative error code
 | 
					 * \return Zero if success, otherwise a negative error code
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										24
									
								
								m4/ac_check_attribute_symver.m4
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								m4/ac_check_attribute_symver.m4
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,24 @@
 | 
				
			||||||
 | 
					dnl Check compiler support for symver function attribute
 | 
				
			||||||
 | 
					AC_DEFUN([AC_CHECK_ATTRIBUTE_SYMVER], [
 | 
				
			||||||
 | 
						saved_CFLAGS=$CFLAGS
 | 
				
			||||||
 | 
						CFLAGS="-O0 -Werror"
 | 
				
			||||||
 | 
						AC_COMPILE_IFELSE(
 | 
				
			||||||
 | 
							[AC_LANG_PROGRAM(
 | 
				
			||||||
 | 
								[[
 | 
				
			||||||
 | 
									void _test_attribute_symver(void);
 | 
				
			||||||
 | 
									__attribute__((__symver__("sym@VER_1.2.3"))) void _test_attribute_symver(void) {}
 | 
				
			||||||
 | 
								]],
 | 
				
			||||||
 | 
								[[
 | 
				
			||||||
 | 
									_test_attribute_symver()
 | 
				
			||||||
 | 
								]]
 | 
				
			||||||
 | 
							)],
 | 
				
			||||||
 | 
							[
 | 
				
			||||||
 | 
								AC_DEFINE([HAVE_ATTRIBUTE_SYMVER], 1, [Define to 1 if __attribute__((symver)) is supported])
 | 
				
			||||||
 | 
							],
 | 
				
			||||||
 | 
							[
 | 
				
			||||||
 | 
								AC_DEFINE([HAVE_ATTRIBUTE_SYMVER], 0, [Define to 0 if __attribute__((symver)) is not supported])
 | 
				
			||||||
 | 
							]
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
						CFLAGS=$saved_CFLAGS
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,10 +1,12 @@
 | 
				
			||||||
EXTRA_DIST=Versions
 | 
					EXTRA_DIST = Versions.in.in
 | 
				
			||||||
COMPATNUM=@LIBTOOL_VERSION_INFO@
 | 
					COMPATNUM=@LIBTOOL_VERSION_INFO@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if VERSIONED_SYMBOLS
 | 
					if VERSIONED_SYMBOLS
 | 
				
			||||||
VSYMS = -Wl,--version-script=Versions
 | 
					VSYMS = -Wl,--version-script=Versions
 | 
				
			||||||
 | 
					BUILT_SOURCES = $(top_builddir)/src/Versions
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
VSYMS =
 | 
					VSYMS =
 | 
				
			||||||
 | 
					BUILT_SOURCES =
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if SYMBOLIC_FUNCTIONS
 | 
					if SYMBOLIC_FUNCTIONS
 | 
				
			||||||
| 
						 | 
					@ -13,6 +15,8 @@ else
 | 
				
			||||||
SYMFUNCS =
 | 
					SYMFUNCS =
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					VERSION_CPPFLAGS =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
lib_LTLIBRARIES = libasound.la
 | 
					lib_LTLIBRARIES = libasound.la
 | 
				
			||||||
libasound_la_SOURCES = conf.c confeval.c confmisc.c input.c output.c async.c error.c dlmisc.c socket.c shmarea.c userfile.c names.c
 | 
					libasound_la_SOURCES = conf.c confeval.c confmisc.c input.c output.c async.c error.c dlmisc.c socket.c shmarea.c userfile.c names.c
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,12 +27,16 @@ SUBDIRS += mixer
 | 
				
			||||||
libasound_la_LIBADD += mixer/libmixer.la
 | 
					libasound_la_LIBADD += mixer/libmixer.la
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
if BUILD_PCM
 | 
					if BUILD_PCM
 | 
				
			||||||
 | 
					if VERSIONED_SYMBOLS
 | 
				
			||||||
 | 
					VERSION_CPPFLAGS += -DHAVE_PCM_SYMS -DHAVE_TIMER_SYMS
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
SUBDIRS += pcm timer
 | 
					SUBDIRS += pcm timer
 | 
				
			||||||
libasound_la_LIBADD += pcm/libpcm.la timer/libtimer.la
 | 
					libasound_la_LIBADD += pcm/libpcm.la timer/libtimer.la
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
if BUILD_RAWMIDI
 | 
					if BUILD_RAWMIDI
 | 
				
			||||||
SUBDIRS += rawmidi
 | 
					SUBDIRS += rawmidi
 | 
				
			||||||
libasound_la_LIBADD += rawmidi/librawmidi.la
 | 
					libasound_la_LIBADD += rawmidi/librawmidi.la
 | 
				
			||||||
 | 
					VERSION_CPPFLAGS += -DHAVE_RAWMIDI_SYMS
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
if BUILD_HWDEP
 | 
					if BUILD_HWDEP
 | 
				
			||||||
SUBDIRS += hwdep
 | 
					SUBDIRS += hwdep
 | 
				
			||||||
| 
						 | 
					@ -37,20 +45,20 @@ endif
 | 
				
			||||||
if BUILD_SEQ
 | 
					if BUILD_SEQ
 | 
				
			||||||
SUBDIRS += seq
 | 
					SUBDIRS += seq
 | 
				
			||||||
libasound_la_LIBADD += seq/libseq.la
 | 
					libasound_la_LIBADD += seq/libseq.la
 | 
				
			||||||
 | 
					VERSION_CPPFLAGS += -DHAVE_SEQ_SYMS
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
if BUILD_UCM
 | 
					if BUILD_UCM
 | 
				
			||||||
SUBDIRS += ucm
 | 
					SUBDIRS += ucm
 | 
				
			||||||
libasound_la_LIBADD += ucm/libucm.la
 | 
					libasound_la_LIBADD += ucm/libucm.la
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
if BUILD_ALISP
 | 
					 | 
				
			||||||
SUBDIRS += alisp
 | 
					 | 
				
			||||||
libasound_la_LIBADD += alisp/libalisp.la
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
SUBDIRS += conf
 | 
					SUBDIRS += conf
 | 
				
			||||||
libasound_la_LIBADD += @ALSA_DEPLIBS@
 | 
					libasound_la_LIBADD += @ALSA_DEPLIBS@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
libasound_la_LDFLAGS = -version-info $(COMPATNUM) $(VSYMS) $(SYMFUNCS) $(LDFLAGS_NOUNDEFINED)
 | 
					libasound_la_LDFLAGS = -version-info $(COMPATNUM) $(VSYMS) $(SYMFUNCS) $(LDFLAGS_NOUNDEFINED)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(top_builddir)/src/Versions: $(top_builddir)/src/Versions.in
 | 
				
			||||||
 | 
						$(COMPILE) -E $(VERSION_CPPFLAGS) -x assembler-with-cpp -o $@ $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
control/libcontrol.la:
 | 
					control/libcontrol.la:
 | 
				
			||||||
	$(MAKE) -C control libcontrol.la
 | 
						$(MAKE) -C control libcontrol.la
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -87,7 +95,4 @@ topology/libtopology.la:
 | 
				
			||||||
instr/libinstr.la:
 | 
					instr/libinstr.la:
 | 
				
			||||||
	$(MAKE) -C instr libinstr.la
 | 
						$(MAKE) -C instr libinstr.la
 | 
				
			||||||
 | 
					
 | 
				
			||||||
alisp/libalisp.la:
 | 
					 | 
				
			||||||
	$(MAKE) -C alisp libalisp.la
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
AM_CPPFLAGS=-I$(top_srcdir)/include
 | 
					AM_CPPFLAGS=-I$(top_srcdir)/include
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,6 +16,7 @@ ALSA_0.9 {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALSA_0.9.0rc4 {
 | 
					ALSA_0.9.0rc4 {
 | 
				
			||||||
 | 
					#ifdef HAVE_PCM_SYMS
 | 
				
			||||||
  global:
 | 
					  global:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_hw_params_get_access;
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_get_access;
 | 
				
			||||||
| 
						 | 
					@ -42,6 +43,7 @@ ALSA_0.9.0rc4 {
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_hw_params_get_rate_max;
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_get_rate_max;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_hw_params_set_rate_near;
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_set_rate_near;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_hw_params_set_rate_first;
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_set_rate_first;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_hw_params_set_rate_last;
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_set_rate_last;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_hw_params_get_period_time;
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_get_period_time;
 | 
				
			||||||
| 
						 | 
					@ -85,22 +87,29 @@ ALSA_0.9.0rc4 {
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_hw_params_set_tick_time_near;
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_set_tick_time_near;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_hw_params_set_tick_time_first;
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_set_tick_time_first;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_hw_params_set_tick_time_last;
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_set_tick_time_last;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
} ALSA_0.9;
 | 
					} ALSA_0.9;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALSA_0.9.0rc8 {
 | 
					ALSA_0.9.0rc8 {
 | 
				
			||||||
 | 
					#ifdef HAVE_PCM_SYMS
 | 
				
			||||||
  global:
 | 
					  global:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_forward;
 | 
					    @SYMBOL_PREFIX@snd_pcm_forward;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_status_get_trigger_htstamp;
 | 
					    @SYMBOL_PREFIX@snd_pcm_status_get_trigger_htstamp;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_status_get_htstamp;
 | 
					    @SYMBOL_PREFIX@snd_pcm_status_get_htstamp;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
} ALSA_0.9.0rc4;
 | 
					} ALSA_0.9.0rc4;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALSA_0.9.0 {
 | 
					ALSA_0.9.0 {
 | 
				
			||||||
 | 
					#if defined HAVE_PCM_SYMS || defined HAVE_TIMER_SYMS
 | 
				
			||||||
  global:
 | 
					  global:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if defined HAVE_PCM_SYMS
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_pcm_type_name;
 | 
					    @SYMBOL_PREFIX@snd_pcm_type_name;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifdef HAVE_TIMER_SYMS
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_timer_query_info;
 | 
					    @SYMBOL_PREFIX@snd_timer_query_info;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_timer_query_params;
 | 
					    @SYMBOL_PREFIX@snd_timer_query_params;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_timer_query_status;
 | 
					    @SYMBOL_PREFIX@snd_timer_query_status;
 | 
				
			||||||
| 
						 | 
					@ -108,6 +117,8 @@ ALSA_0.9.0 {
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_timer_params_get_exclusive;
 | 
					    @SYMBOL_PREFIX@snd_timer_params_get_exclusive;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_timer_params_set_filter;
 | 
					    @SYMBOL_PREFIX@snd_timer_params_set_filter;
 | 
				
			||||||
    @SYMBOL_PREFIX@snd_timer_params_get_filter;
 | 
					    @SYMBOL_PREFIX@snd_timer_params_get_filter;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
} ALSA_0.9.0rc8;
 | 
					} ALSA_0.9.0rc8;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALSA_0.9.3 {
 | 
					ALSA_0.9.3 {
 | 
				
			||||||
| 
						 | 
					@ -118,15 +129,9 @@ ALSA_0.9.3 {
 | 
				
			||||||
} ALSA_0.9.0;
 | 
					} ALSA_0.9.0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALSA_0.9.5 {
 | 
					ALSA_0.9.5 {
 | 
				
			||||||
  global:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @SYMBOL_PREFIX@alsa_lisp;
 | 
					 | 
				
			||||||
} ALSA_0.9.3;
 | 
					} ALSA_0.9.3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALSA_0.9.7 {
 | 
					ALSA_0.9.7 {
 | 
				
			||||||
  global:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @SYMBOL_PREFIX@alsa_lisp_*;
 | 
					 | 
				
			||||||
} ALSA_0.9.5;
 | 
					} ALSA_0.9.5;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ALSA_1.1.6 {
 | 
					ALSA_1.1.6 {
 | 
				
			||||||
| 
						 | 
					@ -140,3 +145,72 @@ ALSA_1.2.6 {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @SYMBOL_PREFIX@_snd_safe_strto*;
 | 
					    @SYMBOL_PREFIX@_snd_safe_strto*;
 | 
				
			||||||
} ALSA_1.1.6;
 | 
					} ALSA_1.1.6;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALSA_1.2.9 {
 | 
				
			||||||
 | 
					#ifdef HAVE_PCM_SYMS
 | 
				
			||||||
 | 
					  global:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_is_perfect_drain;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_set_drain_silence;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_get_drain_silence;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					} ALSA_1.2.6;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALSA_1.2.10 {
 | 
				
			||||||
 | 
					  global:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef HAVE_RAWMIDI_SYMS
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_ump_*;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_ctl_ump_next_device;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_ctl_ump_endpoint_info;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_ctl_ump_block_info;
 | 
				
			||||||
 | 
					#ifdef HAVE_SEQ_SYMS
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_ump_*;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_client_info_get_midi_version;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_client_info_get_ump_group_enabled;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_client_info_get_ump_groupless_enabled;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_client_info_get_ump_conversion;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_client_info_set_midi_version;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_client_info_set_ump_group_enabled;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_client_info_set_ump_groupless_enabled;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_client_info_set_ump_conversion;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_get_ump_endpoint_info;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_get_ump_block_info;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_set_ump_endpoint_info;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_set_ump_block_info;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_port_info_get_direction;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_port_info_get_ump_group;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_port_info_set_direction;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_port_info_set_ump_group;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_set_client_midi_version;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_set_client_ump_conversion;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					} ALSA_1.2.9;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ALSA_1.2.13 {
 | 
				
			||||||
 | 
					#if defined(HAVE_PCM_SYMS) || defined(HAVE_SEQ_SYMS) || defined(HAVE_RAWMIDI_SYMS)
 | 
				
			||||||
 | 
					  global:
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef HAVE_PCM_SYMS
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_pcm_hw_params_get_sync;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef HAVE_SEQ_SYMS
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_create_ump_endpoint;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_create_ump_block;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_queue_tempo_get_tempo_base;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_queue_tempo_set_tempo_base;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_has_queue_tempo_base;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_port_info_get_ump_is_midi1;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_seq_port_info_set_ump_is_midi1;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifdef HAVE_RAWMIDI_SYMS
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_ump_endpoint_info_clear;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_ump_endpoint_info_set_*;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_ump_block_info_clear;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_ump_block_info_set_*;
 | 
				
			||||||
 | 
					    @SYMBOL_PREFIX@snd_ump_packet_length;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					} ALSA_1.2.10;
 | 
				
			||||||
| 
						 | 
					@ -1,11 +0,0 @@
 | 
				
			||||||
EXTRA_LTLIBRARIES = libalisp.la
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
EXTRA_DIST = alisp_snd.c
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
libalisp_la_SOURCES = alisp.c
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
noinst_HEADERS = alisp_local.h
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
all: libalisp.la
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
AM_CPPFLAGS=-I$(top_srcdir)/include
 | 
					 | 
				
			||||||
							
								
								
									
										3494
									
								
								src/alisp/alisp.c
									
										
									
									
									
								
							
							
						
						
									
										3494
									
								
								src/alisp/alisp.c
									
										
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
					@ -1,151 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *  ALSA lisp implementation
 | 
					 | 
				
			||||||
 *  Copyright (c) 2003 by Jaroslav Kysela <perex@perex.cz>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *  Based on work of Sandro Sigala (slisp-1.2)
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This library is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *   it under the terms of the GNU Lesser General Public License as
 | 
					 | 
				
			||||||
 *   published by the Free Software Foundation; either version 2.1 of
 | 
					 | 
				
			||||||
 *   the License, or (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *   GNU Lesser General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   You should have received a copy of the GNU Lesser General Public
 | 
					 | 
				
			||||||
 *   License along with this library; if not, write to the Free Software
 | 
					 | 
				
			||||||
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "list.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
enum alisp_tokens {
 | 
					 | 
				
			||||||
	ALISP_IDENTIFIER,
 | 
					 | 
				
			||||||
	ALISP_INTEGER,
 | 
					 | 
				
			||||||
	ALISP_FLOAT,
 | 
					 | 
				
			||||||
	ALISP_FLOATE,
 | 
					 | 
				
			||||||
	ALISP_STRING
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
enum alisp_objects {
 | 
					 | 
				
			||||||
	ALISP_OBJ_INTEGER,
 | 
					 | 
				
			||||||
	ALISP_OBJ_FLOAT,
 | 
					 | 
				
			||||||
	ALISP_OBJ_IDENTIFIER,
 | 
					 | 
				
			||||||
	ALISP_OBJ_STRING,
 | 
					 | 
				
			||||||
	ALISP_OBJ_POINTER,
 | 
					 | 
				
			||||||
	ALISP_OBJ_CONS,
 | 
					 | 
				
			||||||
	ALISP_OBJ_LAST_SEARCH = ALISP_OBJ_CONS,
 | 
					 | 
				
			||||||
	ALISP_OBJ_NIL,
 | 
					 | 
				
			||||||
	ALISP_OBJ_T,
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct alisp_object;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define ALISP_TYPE_MASK	0xf0000000
 | 
					 | 
				
			||||||
#define ALISP_TYPE_SHIFT 28
 | 
					 | 
				
			||||||
#define ALISP_REFS_MASK 0x0fffffff
 | 
					 | 
				
			||||||
#define ALISP_REFS_SHIFT 0
 | 
					 | 
				
			||||||
#define ALISP_MAX_REFS (ALISP_REFS_MASK>>ALISP_REFS_SHIFT)
 | 
					 | 
				
			||||||
#define ALISP_MAX_REFS_LIMIT ((ALISP_MAX_REFS + 1) / 2)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct alisp_object {
 | 
					 | 
				
			||||||
	struct list_head list;
 | 
					 | 
				
			||||||
	unsigned int	type_refs;	/* type and count of references */
 | 
					 | 
				
			||||||
	union {
 | 
					 | 
				
			||||||
		char	*s;
 | 
					 | 
				
			||||||
		long	i;
 | 
					 | 
				
			||||||
		double	f;
 | 
					 | 
				
			||||||
		const void *ptr;
 | 
					 | 
				
			||||||
		struct {
 | 
					 | 
				
			||||||
			struct alisp_object *car;
 | 
					 | 
				
			||||||
			struct alisp_object *cdr;
 | 
					 | 
				
			||||||
		} c;
 | 
					 | 
				
			||||||
	} value;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline enum alisp_objects alisp_get_type(struct alisp_object *p)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return (p->type_refs >> ALISP_TYPE_SHIFT);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline void alisp_set_type(struct alisp_object *p, enum alisp_objects type)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	p->type_refs &= ~ALISP_TYPE_MASK;
 | 
					 | 
				
			||||||
	p->type_refs |= (unsigned int)type << ALISP_TYPE_SHIFT;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline int alisp_compare_type(struct alisp_object *p, enum alisp_objects type)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return ((unsigned int)type << ALISP_TYPE_SHIFT) ==
 | 
					 | 
				
			||||||
	       (p->type_refs & ALISP_TYPE_MASK);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline void alisp_set_refs(struct alisp_object *p, unsigned int refs)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	p->type_refs &= ~ALISP_REFS_MASK;
 | 
					 | 
				
			||||||
	p->type_refs |= refs & ALISP_REFS_MASK;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline unsigned int alisp_get_refs(struct alisp_object *p)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return p->type_refs & ALISP_REFS_MASK;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline unsigned int alisp_inc_refs(struct alisp_object *p)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	unsigned r = alisp_get_refs(p) + 1;
 | 
					 | 
				
			||||||
	alisp_set_refs(p, r);
 | 
					 | 
				
			||||||
	return r;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline unsigned int alisp_dec_refs(struct alisp_object *p)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	unsigned r = alisp_get_refs(p) - 1;
 | 
					 | 
				
			||||||
	alisp_set_refs(p, r);
 | 
					 | 
				
			||||||
	return r;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct alisp_object_pair {
 | 
					 | 
				
			||||||
	struct list_head list;
 | 
					 | 
				
			||||||
	const char *name;
 | 
					 | 
				
			||||||
 	struct alisp_object *value;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define ALISP_LEX_BUF_MAX	16
 | 
					 | 
				
			||||||
#define ALISP_OBJ_PAIR_HASH_SHIFT 4
 | 
					 | 
				
			||||||
#define ALISP_OBJ_PAIR_HASH_SIZE (1<<ALISP_OBJ_PAIR_HASH_SHIFT)
 | 
					 | 
				
			||||||
#define ALISP_OBJ_PAIR_HASH_MASK (ALISP_OBJ_PAIR_HASH_SIZE-1)
 | 
					 | 
				
			||||||
#define ALISP_FREE_OBJ_POOL	512	/* free objects above this pool */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct alisp_instance {
 | 
					 | 
				
			||||||
	int verbose: 1,
 | 
					 | 
				
			||||||
	    warning: 1,
 | 
					 | 
				
			||||||
	    debug: 1;
 | 
					 | 
				
			||||||
	/* i/o */
 | 
					 | 
				
			||||||
	snd_input_t *in;
 | 
					 | 
				
			||||||
	snd_output_t *out;
 | 
					 | 
				
			||||||
	snd_output_t *eout;	/* error output */
 | 
					 | 
				
			||||||
	snd_output_t *vout;	/* verbose output */
 | 
					 | 
				
			||||||
	snd_output_t *wout;	/* warning output */
 | 
					 | 
				
			||||||
	snd_output_t *dout;	/* debug output */
 | 
					 | 
				
			||||||
	/* lexer */
 | 
					 | 
				
			||||||
	int charno;
 | 
					 | 
				
			||||||
	int lineno;
 | 
					 | 
				
			||||||
	int lex_buf[ALISP_LEX_BUF_MAX];
 | 
					 | 
				
			||||||
	int *lex_bufp;
 | 
					 | 
				
			||||||
	char *token_buffer;
 | 
					 | 
				
			||||||
	int token_buffer_max;
 | 
					 | 
				
			||||||
	int thistoken;
 | 
					 | 
				
			||||||
	/* object allocator / storage */
 | 
					 | 
				
			||||||
	long free_objs;
 | 
					 | 
				
			||||||
	long used_objs;
 | 
					 | 
				
			||||||
	long max_objs;
 | 
					 | 
				
			||||||
	struct list_head free_objs_list;
 | 
					 | 
				
			||||||
	struct list_head used_objs_list[ALISP_OBJ_PAIR_HASH_SIZE][ALISP_OBJ_LAST_SEARCH + 1];
 | 
					 | 
				
			||||||
	/* set object */
 | 
					 | 
				
			||||||
	struct list_head setobjs_list[ALISP_OBJ_PAIR_HASH_SIZE];
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,936 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *  ALSA lisp implementation - sound related commands
 | 
					 | 
				
			||||||
 *  Copyright (c) 2003 by Jaroslav Kysela <perex@perex.cz>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This library is free software; you can redistribute it and/or modify
 | 
					 | 
				
			||||||
 *   it under the terms of the GNU Lesser General Public License as
 | 
					 | 
				
			||||||
 *   published by the Free Software Foundation; either version 2.1 of
 | 
					 | 
				
			||||||
 *   the License, or (at your option) any later version.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
 *   GNU Lesser General Public License for more details.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 *   You should have received a copy of the GNU Lesser General Public
 | 
					 | 
				
			||||||
 *   License along with this library; if not, write to the Free Software
 | 
					 | 
				
			||||||
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "../control/control_local.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct acall_table {
 | 
					 | 
				
			||||||
	const char *name;
 | 
					 | 
				
			||||||
	struct alisp_object * (*func) (struct alisp_instance *instance, struct acall_table * item, struct alisp_object * args);
 | 
					 | 
				
			||||||
	void * xfunc;
 | 
					 | 
				
			||||||
	const char *prefix;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *  helper functions
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline int get_integer(struct alisp_object * obj)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	if (alisp_compare_type(obj, ALISP_OBJ_INTEGER))
 | 
					 | 
				
			||||||
		return obj->value.i;
 | 
					 | 
				
			||||||
	return 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline const void *get_pointer(struct alisp_object * obj)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	if (alisp_compare_type(obj, ALISP_OBJ_POINTER))
 | 
					 | 
				
			||||||
		return obj->value.ptr;
 | 
					 | 
				
			||||||
	return NULL;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static const char *get_string(struct alisp_object * obj, const char * deflt)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	if (obj == &alsa_lisp_t)
 | 
					 | 
				
			||||||
		return "true";
 | 
					 | 
				
			||||||
	if (alisp_compare_type(obj, ALISP_OBJ_STRING) ||
 | 
					 | 
				
			||||||
	    alisp_compare_type(obj, ALISP_OBJ_IDENTIFIER))
 | 
					 | 
				
			||||||
		return obj->value.s;
 | 
					 | 
				
			||||||
	return deflt;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
struct flags {
 | 
					 | 
				
			||||||
	const char *key;
 | 
					 | 
				
			||||||
	unsigned int mask;
 | 
					 | 
				
			||||||
}; 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static unsigned int get_flags(struct alisp_instance * instance,
 | 
					 | 
				
			||||||
			      struct alisp_object * obj,
 | 
					 | 
				
			||||||
			      const struct flags * flags,
 | 
					 | 
				
			||||||
			      unsigned int deflt)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	const char *key;
 | 
					 | 
				
			||||||
	int invert;
 | 
					 | 
				
			||||||
	unsigned int result;
 | 
					 | 
				
			||||||
	const struct flags *ptr;
 | 
					 | 
				
			||||||
	struct alisp_object *n;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (obj == &alsa_lisp_nil)
 | 
					 | 
				
			||||||
		return deflt;
 | 
					 | 
				
			||||||
	result = deflt;
 | 
					 | 
				
			||||||
	do {
 | 
					 | 
				
			||||||
		key = get_string(obj, NULL);
 | 
					 | 
				
			||||||
		if (key) {
 | 
					 | 
				
			||||||
			invert = key[0] == '!';
 | 
					 | 
				
			||||||
			key += invert;
 | 
					 | 
				
			||||||
			ptr = flags;
 | 
					 | 
				
			||||||
			while (ptr->key) {
 | 
					 | 
				
			||||||
				if (!strcmp(ptr->key, key)) {
 | 
					 | 
				
			||||||
					if (invert)
 | 
					 | 
				
			||||||
						result &= ~ptr->mask;
 | 
					 | 
				
			||||||
					else
 | 
					 | 
				
			||||||
						result |= ptr->mask;
 | 
					 | 
				
			||||||
					break;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				ptr++;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		delete_tree(instance, car(obj));
 | 
					 | 
				
			||||||
		obj = cdr(n = obj);
 | 
					 | 
				
			||||||
		delete_object(instance, n);
 | 
					 | 
				
			||||||
	} while (obj != &alsa_lisp_nil);
 | 
					 | 
				
			||||||
	return result;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static const void *get_ptr(struct alisp_instance * instance,
 | 
					 | 
				
			||||||
			   struct alisp_object * obj,
 | 
					 | 
				
			||||||
			   const char *_ptr_id)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	const char *ptr_id;
 | 
					 | 
				
			||||||
	const void *ptr;
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	ptr_id = get_string(car(obj), NULL);
 | 
					 | 
				
			||||||
	if (ptr_id == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, obj);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (strcmp(ptr_id, _ptr_id)) {
 | 
					 | 
				
			||||||
		delete_tree(instance, obj);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	ptr = get_pointer(cdr(obj));
 | 
					 | 
				
			||||||
	delete_tree(instance, obj);
 | 
					 | 
				
			||||||
	return ptr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * new_lexpr(struct alisp_instance * instance, int err)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object * lexpr;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	lexpr = new_object(instance, ALISP_OBJ_CONS);
 | 
					 | 
				
			||||||
	if (lexpr == NULL)
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	lexpr->value.c.car = new_integer(instance, err);
 | 
					 | 
				
			||||||
	if (lexpr->value.c.car == NULL) {
 | 
					 | 
				
			||||||
		delete_object(instance, lexpr);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	lexpr->value.c.cdr = new_object(instance, ALISP_OBJ_CONS);
 | 
					 | 
				
			||||||
	if (lexpr->value.c.cdr == NULL) {
 | 
					 | 
				
			||||||
		delete_object(instance, lexpr->value.c.car);
 | 
					 | 
				
			||||||
		delete_object(instance, lexpr);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * add_cons(struct alisp_instance * instance,
 | 
					 | 
				
			||||||
				      struct alisp_object *lexpr,
 | 
					 | 
				
			||||||
				      int cdr, const char *id,
 | 
					 | 
				
			||||||
				      struct alisp_object *obj)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object * p1, * p2;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (lexpr == NULL || obj == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, obj);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (cdr) {
 | 
					 | 
				
			||||||
		p1 = lexpr->value.c.cdr = new_object(instance, ALISP_OBJ_CONS);
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		p1 = lexpr->value.c.car = new_object(instance, ALISP_OBJ_CONS);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	lexpr = p1;
 | 
					 | 
				
			||||||
	if (p1 == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, obj);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	p1->value.c.car = new_object(instance, ALISP_OBJ_CONS);
 | 
					 | 
				
			||||||
	if ((p2 = p1->value.c.car) == NULL)
 | 
					 | 
				
			||||||
		goto __err;
 | 
					 | 
				
			||||||
	p2->value.c.car = new_string(instance, id);
 | 
					 | 
				
			||||||
	if (p2->value.c.car == NULL) {
 | 
					 | 
				
			||||||
	      __err:
 | 
					 | 
				
			||||||
		if (cdr)
 | 
					 | 
				
			||||||
			lexpr->value.c.cdr = NULL;
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			lexpr->value.c.car = NULL;
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
		delete_tree(instance, obj);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	p2->value.c.cdr = obj;
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * add_cons2(struct alisp_instance * instance,
 | 
					 | 
				
			||||||
				       struct alisp_object *lexpr,
 | 
					 | 
				
			||||||
				       int cdr, struct alisp_object *obj)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (lexpr == NULL || obj == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, obj);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (cdr) {
 | 
					 | 
				
			||||||
		p1 = lexpr->value.c.cdr = new_object(instance, ALISP_OBJ_CONS);
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		p1 = lexpr->value.c.car = new_object(instance, ALISP_OBJ_CONS);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	lexpr = p1;
 | 
					 | 
				
			||||||
	if (p1 == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, obj);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	p1->value.c.car = obj;
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * new_result1(struct alisp_instance * instance,
 | 
					 | 
				
			||||||
					 int err, const char *ptr_id, void *ptr)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object * lexpr, * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (err < 0)
 | 
					 | 
				
			||||||
		ptr = NULL;
 | 
					 | 
				
			||||||
	lexpr = new_object(instance, ALISP_OBJ_CONS);
 | 
					 | 
				
			||||||
	if (lexpr == NULL)
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	lexpr->value.c.car = new_integer(instance, err);
 | 
					 | 
				
			||||||
	if (lexpr->value.c.car == NULL) {
 | 
					 | 
				
			||||||
		delete_object(instance, lexpr);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, lexpr, 1, ptr_id, new_pointer(instance, ptr));
 | 
					 | 
				
			||||||
	if (p1 == NULL) {
 | 
					 | 
				
			||||||
		delete_object(instance, lexpr);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * new_result2(struct alisp_instance * instance,
 | 
					 | 
				
			||||||
					 int err, int val)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object * lexpr, * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (err < 0)
 | 
					 | 
				
			||||||
		val = 0;
 | 
					 | 
				
			||||||
	lexpr = new_lexpr(instance, err);
 | 
					 | 
				
			||||||
	if (lexpr == NULL)
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	p1 = lexpr->value.c.cdr;
 | 
					 | 
				
			||||||
	p1->value.c.car = new_integer(instance, val);
 | 
					 | 
				
			||||||
	if (p1->value.c.car == NULL) {
 | 
					 | 
				
			||||||
		delete_object(instance, lexpr);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * new_result3(struct alisp_instance * instance,
 | 
					 | 
				
			||||||
					 int err, const char *str)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object * lexpr, * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (err < 0)
 | 
					 | 
				
			||||||
		str = "";
 | 
					 | 
				
			||||||
	lexpr = new_lexpr(instance, err);
 | 
					 | 
				
			||||||
	if (lexpr == NULL)
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	p1 = lexpr->value.c.cdr;
 | 
					 | 
				
			||||||
	p1->value.c.car = new_string(instance, str);
 | 
					 | 
				
			||||||
	if (p1->value.c.car == NULL) {
 | 
					 | 
				
			||||||
		delete_object(instance, lexpr);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *  macros
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *  HCTL functions
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
typedef int (*snd_int_pp_strp_int_t)(void **rctl, const char *name, int mode);
 | 
					 | 
				
			||||||
typedef int (*snd_int_pp_p_t)(void **rctl, void *handle);
 | 
					 | 
				
			||||||
typedef int (*snd_int_p_t)(void *rctl);
 | 
					 | 
				
			||||||
typedef char * (*snd_str_p_t)(void *rctl);
 | 
					 | 
				
			||||||
typedef int (*snd_int_intp_t)(int *val);
 | 
					 | 
				
			||||||
typedef int (*snd_int_str_t)(const char *str);
 | 
					 | 
				
			||||||
typedef int (*snd_int_int_strp_t)(int val, char **str);
 | 
					 | 
				
			||||||
typedef void *(*snd_p_p_t)(void *handle);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_int_pp_strp_int(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	const char *name;
 | 
					 | 
				
			||||||
	int err, mode;
 | 
					 | 
				
			||||||
	void *handle;
 | 
					 | 
				
			||||||
	struct alisp_object *p1, *p2;
 | 
					 | 
				
			||||||
	static const struct flags flags[] = {
 | 
					 | 
				
			||||||
		{ "nonblock", SND_CTL_NONBLOCK },
 | 
					 | 
				
			||||||
		{ "async", SND_CTL_ASYNC },
 | 
					 | 
				
			||||||
		{ "readonly", SND_CTL_READONLY },
 | 
					 | 
				
			||||||
		{ NULL, 0 }
 | 
					 | 
				
			||||||
	};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	name = get_string(p1 = eval(instance, car(args)), NULL);
 | 
					 | 
				
			||||||
	if (name == NULL)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	mode = get_flags(instance, p2 = eval(instance, car(cdr(args))), flags, 0);
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(cdr(args)));
 | 
					 | 
				
			||||||
	delete_object(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	delete_tree(instance, p2);
 | 
					 | 
				
			||||||
	err = ((snd_int_pp_strp_int_t)item->xfunc)(&handle, name, mode);
 | 
					 | 
				
			||||||
	delete_tree(instance, p1);
 | 
					 | 
				
			||||||
	return new_result1(instance, err, item->prefix, handle);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_int_pp_p(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
	void *handle;
 | 
					 | 
				
			||||||
	const char *prefix1;
 | 
					 | 
				
			||||||
	struct alisp_object *p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (item->xfunc == &snd_hctl_open_ctl)
 | 
					 | 
				
			||||||
		prefix1 = "ctl";
 | 
					 | 
				
			||||||
	else {
 | 
					 | 
				
			||||||
		delete_tree(instance, args);
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	handle = (void *)get_ptr(instance, p1, prefix1);
 | 
					 | 
				
			||||||
	if (handle == NULL)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	err = ((snd_int_pp_p_t)item->xfunc)(&handle, handle);
 | 
					 | 
				
			||||||
	return new_result1(instance, err, item->prefix, handle);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_p_p(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	void *handle;
 | 
					 | 
				
			||||||
	const char *prefix1;
 | 
					 | 
				
			||||||
	struct alisp_object * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (item->xfunc == &snd_hctl_first_elem ||
 | 
					 | 
				
			||||||
	    item->xfunc == &snd_hctl_last_elem ||
 | 
					 | 
				
			||||||
	    item->xfunc == &snd_hctl_elem_next ||
 | 
					 | 
				
			||||||
	    item->xfunc == &snd_hctl_elem_prev)
 | 
					 | 
				
			||||||
		prefix1 = "hctl_elem";
 | 
					 | 
				
			||||||
	else if (item->xfunc == &snd_hctl_ctl)
 | 
					 | 
				
			||||||
		prefix1 = "ctl";
 | 
					 | 
				
			||||||
	else {
 | 
					 | 
				
			||||||
		delete_tree(instance, args);
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	handle = (void *)get_ptr(instance, p1, item->prefix);
 | 
					 | 
				
			||||||
	if (handle == NULL)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	handle = ((snd_p_p_t)item->xfunc)(handle);
 | 
					 | 
				
			||||||
	return new_cons_pointer(instance, prefix1, handle);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_int_p(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	void *handle;
 | 
					 | 
				
			||||||
	struct alisp_object * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	handle = (void *)get_ptr(instance, p1, item->prefix);
 | 
					 | 
				
			||||||
	if (handle == NULL)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	return new_integer(instance, ((snd_int_p_t)item->xfunc)(handle));
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_str_p(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	void *handle;
 | 
					 | 
				
			||||||
	struct alisp_object * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	handle = (void *)get_ptr(instance, p1, item->prefix);
 | 
					 | 
				
			||||||
	if (handle == NULL)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	return new_string(instance, ((snd_str_p_t)item->xfunc)(handle));
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_int_intp(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	int val, err;
 | 
					 | 
				
			||||||
	struct alisp_object * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	if (!alisp_compare_type(p1, ALISP_OBJ_INTEGER)) {
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	val = p1->value.i;
 | 
					 | 
				
			||||||
	delete_tree(instance, p1);
 | 
					 | 
				
			||||||
	err = ((snd_int_intp_t)item->xfunc)(&val);
 | 
					 | 
				
			||||||
	return new_result2(instance, err, val);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_int_str(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
	struct alisp_object * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	if (!alisp_compare_type(p1, ALISP_OBJ_STRING) &&
 | 
					 | 
				
			||||||
	    !alisp_compare_type(p1, ALISP_OBJ_IDENTIFIER)) {
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	err = ((snd_int_str_t)item->xfunc)(p1->value.s);
 | 
					 | 
				
			||||||
	delete_tree(instance, p1);
 | 
					 | 
				
			||||||
	return new_integer(instance, err);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_int_int_strp(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
	char *str;
 | 
					 | 
				
			||||||
	long val;
 | 
					 | 
				
			||||||
	struct alisp_object * p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	if (!alisp_compare_type(p1, ALISP_OBJ_INTEGER)) {
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	val = p1->value.i;
 | 
					 | 
				
			||||||
	delete_tree(instance, p1);
 | 
					 | 
				
			||||||
	err = ((snd_int_int_strp_t)item->xfunc)(val, &str);
 | 
					 | 
				
			||||||
	return new_result3(instance, err, str);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_card_info(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	snd_ctl_t *handle;
 | 
					 | 
				
			||||||
	struct alisp_object * lexpr, * p1;
 | 
					 | 
				
			||||||
	snd_ctl_card_info_t info = {0};
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	handle = (snd_ctl_t *)get_ptr(instance, p1, item->prefix);
 | 
					 | 
				
			||||||
	if (handle == NULL)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	err = snd_ctl_card_info(handle, &info);
 | 
					 | 
				
			||||||
	lexpr = new_lexpr(instance, err);
 | 
					 | 
				
			||||||
	if (err < 0)
 | 
					 | 
				
			||||||
		return lexpr;
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, lexpr->value.c.cdr, 0, "id", new_string(instance, snd_ctl_card_info_get_id(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "driver", new_string(instance, snd_ctl_card_info_get_driver(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "name", new_string(instance, snd_ctl_card_info_get_name(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "longname", new_string(instance, snd_ctl_card_info_get_longname(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "mixername", new_string(instance, snd_ctl_card_info_get_mixername(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "components", new_string(instance, snd_ctl_card_info_get_components(&info)));
 | 
					 | 
				
			||||||
	if (p1 == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, lexpr);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * create_ctl_elem_id(struct alisp_instance * instance, snd_ctl_elem_id_t * id, struct alisp_object * cons)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	cons = add_cons(instance, cons, 0, "numid", new_integer(instance, snd_ctl_elem_id_get_numid(id)));
 | 
					 | 
				
			||||||
	cons = add_cons(instance, cons, 1, "iface", new_string(instance, snd_ctl_elem_iface_name(snd_ctl_elem_id_get_interface(id))));
 | 
					 | 
				
			||||||
	cons = add_cons(instance, cons, 1, "dev", new_integer(instance, snd_ctl_elem_id_get_device(id)));
 | 
					 | 
				
			||||||
	cons = add_cons(instance, cons, 1, "subdev", new_integer(instance, snd_ctl_elem_id_get_subdevice(id)));
 | 
					 | 
				
			||||||
	cons = add_cons(instance, cons, 1, "name", new_string(instance, snd_ctl_elem_id_get_name(id)));
 | 
					 | 
				
			||||||
	cons = add_cons(instance, cons, 1, "index", new_integer(instance, snd_ctl_elem_id_get_index(id)));
 | 
					 | 
				
			||||||
	return cons;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int parse_ctl_elem_id(struct alisp_instance * instance,
 | 
					 | 
				
			||||||
			     struct alisp_object * cons,
 | 
					 | 
				
			||||||
			     snd_ctl_elem_id_t * id)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object *p1;
 | 
					 | 
				
			||||||
	const char *xid;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (cons == NULL)
 | 
					 | 
				
			||||||
		return -ENOMEM;
 | 
					 | 
				
			||||||
	snd_ctl_elem_id_clear(id);
 | 
					 | 
				
			||||||
	id->numid = 0;
 | 
					 | 
				
			||||||
	do {
 | 
					 | 
				
			||||||
		p1 = car(cons);
 | 
					 | 
				
			||||||
		if (alisp_compare_type(p1, ALISP_OBJ_CONS)) {
 | 
					 | 
				
			||||||
			xid = get_string(p1->value.c.car, NULL);
 | 
					 | 
				
			||||||
			if (xid == NULL) {
 | 
					 | 
				
			||||||
				/* noop */
 | 
					 | 
				
			||||||
			} else if (!strcmp(xid, "numid")) {
 | 
					 | 
				
			||||||
				snd_ctl_elem_id_set_numid(id, get_integer(p1->value.c.cdr));
 | 
					 | 
				
			||||||
			} else if (!strcmp(xid, "iface")) {
 | 
					 | 
				
			||||||
				snd_ctl_elem_id_set_interface(id, snd_config_get_ctl_iface_ascii(get_string(p1->value.c.cdr, "0")));
 | 
					 | 
				
			||||||
			} else if (!strcmp(xid, "dev")) {
 | 
					 | 
				
			||||||
				snd_ctl_elem_id_set_device(id, get_integer(p1->value.c.cdr));
 | 
					 | 
				
			||||||
			} else if (!strcmp(xid, "subdev")) {
 | 
					 | 
				
			||||||
				snd_ctl_elem_id_set_subdevice(id, get_integer(p1->value.c.cdr));
 | 
					 | 
				
			||||||
			} else if (!strcmp(xid, "name")) {
 | 
					 | 
				
			||||||
				snd_ctl_elem_id_set_name(id, get_string(p1->value.c.cdr, "?"));
 | 
					 | 
				
			||||||
			} else if (!strcmp(xid, "index")) {
 | 
					 | 
				
			||||||
				snd_ctl_elem_id_set_index(id, get_integer(p1->value.c.cdr));
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
	        cons = cdr(p1 = cons);
 | 
					 | 
				
			||||||
	        delete_object(instance, p1);
 | 
					 | 
				
			||||||
	} while (cons != &alsa_lisp_nil);
 | 
					 | 
				
			||||||
	return 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_hctl_find_elem(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	snd_hctl_t *handle;
 | 
					 | 
				
			||||||
	snd_ctl_elem_id_t id = {0};
 | 
					 | 
				
			||||||
	struct alisp_object *p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	handle = (snd_hctl_t *)get_ptr(instance, car(args), item->prefix);
 | 
					 | 
				
			||||||
	if (handle == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
		delete_object(instance, args);
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	p1 = car(cdr(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(cdr(args)));
 | 
					 | 
				
			||||||
	delete_object(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	if (parse_ctl_elem_id(instance, eval(instance, p1), &id) < 0)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	return new_cons_pointer(instance, "hctl_elem", snd_hctl_find_elem(handle, &id));
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_hctl_elem_info(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	snd_hctl_elem_t *handle;
 | 
					 | 
				
			||||||
	struct alisp_object * lexpr, * p1, * p2;
 | 
					 | 
				
			||||||
	snd_ctl_elem_info_t info = {0};
 | 
					 | 
				
			||||||
	snd_ctl_elem_id_t id = {0};
 | 
					 | 
				
			||||||
	snd_ctl_elem_type_t type;
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	handle = (snd_hctl_elem_t *)get_ptr(instance, p1, item->prefix);
 | 
					 | 
				
			||||||
	if (handle == NULL)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	err = snd_hctl_elem_info(handle, &info);
 | 
					 | 
				
			||||||
	lexpr = new_lexpr(instance, err);
 | 
					 | 
				
			||||||
	if (err < 0)
 | 
					 | 
				
			||||||
		return lexpr;
 | 
					 | 
				
			||||||
	type = snd_ctl_elem_info_get_type(&info);
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, lexpr->value.c.cdr, 0, "id", p2 = new_object(instance, ALISP_OBJ_CONS));
 | 
					 | 
				
			||||||
	snd_ctl_elem_info_get_id(&info, &id);
 | 
					 | 
				
			||||||
	if (create_ctl_elem_id(instance, &id, p2) == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, lexpr);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "type", new_string(instance, snd_ctl_elem_type_name(type)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "readable", new_integer(instance, snd_ctl_elem_info_is_readable(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "writable", new_integer(instance, snd_ctl_elem_info_is_writable(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "volatile", new_integer(instance, snd_ctl_elem_info_is_volatile(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "inactive", new_integer(instance, snd_ctl_elem_info_is_inactive(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "locked", new_integer(instance, snd_ctl_elem_info_is_locked(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "isowner", new_integer(instance, snd_ctl_elem_info_is_owner(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "owner", new_integer(instance, snd_ctl_elem_info_get_owner(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "count", new_integer(instance, snd_ctl_elem_info_get_count(&info)));
 | 
					 | 
				
			||||||
	err = INTERNAL(snd_ctl_elem_info_get_dimensions)(&info);
 | 
					 | 
				
			||||||
	if (err > 0) {
 | 
					 | 
				
			||||||
		int idx;
 | 
					 | 
				
			||||||
		p1 = add_cons(instance, p1, 1, "dimensions", p2 = new_object(instance, ALISP_OBJ_CONS));
 | 
					 | 
				
			||||||
		for (idx = 0; idx < err; idx++)
 | 
					 | 
				
			||||||
			p2 = add_cons2(instance, p2, idx > 0, new_integer(instance, INTERNAL(snd_ctl_elem_info_get_dimension)(&info, idx)));
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	switch (type) {
 | 
					 | 
				
			||||||
	case SND_CTL_ELEM_TYPE_ENUMERATED: {
 | 
					 | 
				
			||||||
		unsigned int items, item;
 | 
					 | 
				
			||||||
		items = snd_ctl_elem_info_get_items(&info);
 | 
					 | 
				
			||||||
		p1 = add_cons(instance, p1, 1, "items", p2 = new_object(instance, ALISP_OBJ_CONS));
 | 
					 | 
				
			||||||
		for (item = 0; item < items; item++) {
 | 
					 | 
				
			||||||
			snd_ctl_elem_info_set_item(&info, item);
 | 
					 | 
				
			||||||
			err = snd_hctl_elem_info(handle, &info);
 | 
					 | 
				
			||||||
			if (err < 0) {
 | 
					 | 
				
			||||||
				p2 = add_cons2(instance, p2, item, &alsa_lisp_nil);
 | 
					 | 
				
			||||||
			} else {
 | 
					 | 
				
			||||||
				p2 = add_cons2(instance, p2, item, new_string(instance, snd_ctl_elem_info_get_item_name(&info)));
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	case SND_CTL_ELEM_TYPE_INTEGER:
 | 
					 | 
				
			||||||
		p1 = add_cons(instance, p1, 1, "min", new_integer(instance, snd_ctl_elem_info_get_min(&info)));
 | 
					 | 
				
			||||||
		p1 = add_cons(instance, p1, 1, "max", new_integer(instance, snd_ctl_elem_info_get_max(&info)));
 | 
					 | 
				
			||||||
		p1 = add_cons(instance, p1, 1, "step", new_integer(instance, snd_ctl_elem_info_get_step(&info)));
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
	case SND_CTL_ELEM_TYPE_INTEGER64:
 | 
					 | 
				
			||||||
		p1 = add_cons(instance, p1, 1, "min64", new_float(instance, snd_ctl_elem_info_get_min64(&info)));
 | 
					 | 
				
			||||||
		p1 = add_cons(instance, p1, 1, "max64", new_float(instance, snd_ctl_elem_info_get_max64(&info)));
 | 
					 | 
				
			||||||
		p1 = add_cons(instance, p1, 1, "step64", new_float(instance, snd_ctl_elem_info_get_step64(&info)));
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
	default:
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (p1 == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, lexpr);
 | 
					 | 
				
			||||||
		return NULL;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_hctl_elem_read(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	snd_hctl_elem_t *handle;
 | 
					 | 
				
			||||||
	struct alisp_object * lexpr, * p1 = NULL, * obj;
 | 
					 | 
				
			||||||
	snd_ctl_elem_info_t info = {0};
 | 
					 | 
				
			||||||
	snd_ctl_elem_value_t value = {0};
 | 
					 | 
				
			||||||
	snd_ctl_elem_type_t type;
 | 
					 | 
				
			||||||
	unsigned int idx, count;
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	handle = (snd_hctl_elem_t *)get_ptr(instance, p1, item->prefix);
 | 
					 | 
				
			||||||
	if (handle == NULL)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	err = snd_hctl_elem_info(handle, &info);
 | 
					 | 
				
			||||||
	if (err >= 0)
 | 
					 | 
				
			||||||
		err = snd_hctl_elem_read(handle, &value);
 | 
					 | 
				
			||||||
	lexpr = new_lexpr(instance, err);
 | 
					 | 
				
			||||||
	if (err < 0)
 | 
					 | 
				
			||||||
		return lexpr;
 | 
					 | 
				
			||||||
	type = snd_ctl_elem_info_get_type(&info);
 | 
					 | 
				
			||||||
	count = snd_ctl_elem_info_get_count(&info);
 | 
					 | 
				
			||||||
	if (type == SND_CTL_ELEM_TYPE_IEC958) {
 | 
					 | 
				
			||||||
		count = sizeof(snd_aes_iec958_t);
 | 
					 | 
				
			||||||
		type = SND_CTL_ELEM_TYPE_BYTES;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	for (idx = 0; idx < count; idx++) {
 | 
					 | 
				
			||||||
		switch (type) {
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_BOOLEAN:
 | 
					 | 
				
			||||||
			obj = new_integer(instance, snd_ctl_elem_value_get_boolean(&value, idx));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_INTEGER:
 | 
					 | 
				
			||||||
			obj = new_integer(instance, snd_ctl_elem_value_get_integer(&value, idx));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_INTEGER64:
 | 
					 | 
				
			||||||
			obj = new_integer(instance, snd_ctl_elem_value_get_integer64(&value, idx));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_ENUMERATED:
 | 
					 | 
				
			||||||
			obj = new_integer(instance, snd_ctl_elem_value_get_enumerated(&value, idx));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_BYTES:
 | 
					 | 
				
			||||||
			obj = new_integer(instance, snd_ctl_elem_value_get_byte(&value, idx));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		default:
 | 
					 | 
				
			||||||
			obj = NULL;
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		if (idx == 0) {
 | 
					 | 
				
			||||||
			p1 = add_cons2(instance, lexpr->value.c.cdr, 0, obj);
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			p1 = add_cons2(instance, p1, 1, obj);
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (p1 == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, lexpr);
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_hctl_elem_write(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	snd_hctl_elem_t *handle;
 | 
					 | 
				
			||||||
	struct alisp_object * p1 = NULL, * obj;
 | 
					 | 
				
			||||||
	snd_ctl_elem_info_t info = {0};
 | 
					 | 
				
			||||||
	snd_ctl_elem_value_t value = {0};
 | 
					 | 
				
			||||||
	snd_ctl_elem_type_t type;
 | 
					 | 
				
			||||||
	unsigned int idx, count;
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = car(cdr(args));
 | 
					 | 
				
			||||||
	obj = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(cdr(args)));
 | 
					 | 
				
			||||||
	delete_object(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	handle = (snd_hctl_elem_t *)get_ptr(instance, obj, item->prefix);
 | 
					 | 
				
			||||||
	if (handle == NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	err = snd_hctl_elem_info(handle, &info);
 | 
					 | 
				
			||||||
	if (err < 0) {
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
		return new_integer(instance, err);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	type = snd_ctl_elem_info_get_type(&info);
 | 
					 | 
				
			||||||
	count = snd_ctl_elem_info_get_count(&info);
 | 
					 | 
				
			||||||
	if (type == SND_CTL_ELEM_TYPE_IEC958) {
 | 
					 | 
				
			||||||
		count = sizeof(snd_aes_iec958_t);
 | 
					 | 
				
			||||||
		type = SND_CTL_ELEM_TYPE_BYTES;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	idx = -1;
 | 
					 | 
				
			||||||
	do {
 | 
					 | 
				
			||||||
		if (++idx >= count) {
 | 
					 | 
				
			||||||
			delete_tree(instance, p1);
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		obj = car(p1);
 | 
					 | 
				
			||||||
		switch (type) {
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_BOOLEAN:
 | 
					 | 
				
			||||||
			snd_ctl_elem_value_set_boolean(&value, idx, get_integer(obj));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_INTEGER:
 | 
					 | 
				
			||||||
			snd_ctl_elem_value_set_integer(&value, idx, get_integer(obj));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_INTEGER64:
 | 
					 | 
				
			||||||
			snd_ctl_elem_value_set_integer64(&value, idx, get_integer(obj));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_ENUMERATED:
 | 
					 | 
				
			||||||
			snd_ctl_elem_value_set_enumerated(&value, idx, get_integer(obj));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case SND_CTL_ELEM_TYPE_BYTES:
 | 
					 | 
				
			||||||
			snd_ctl_elem_value_set_byte(&value, idx, get_integer(obj));
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		default:
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		delete_tree(instance, obj);
 | 
					 | 
				
			||||||
		p1 = cdr(obj = p1);
 | 
					 | 
				
			||||||
		delete_object(instance, obj);
 | 
					 | 
				
			||||||
	} while (p1 != &alsa_lisp_nil);
 | 
					 | 
				
			||||||
	err = snd_hctl_elem_write(handle, &value);
 | 
					 | 
				
			||||||
	return new_integer(instance, err);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * FA_pcm_info(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	snd_pcm_t *handle;
 | 
					 | 
				
			||||||
	struct alisp_object * lexpr, * p1;
 | 
					 | 
				
			||||||
	snd_pcm_info_t info = {0};
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	handle = (snd_pcm_t *)get_ptr(instance, p1, item->prefix);
 | 
					 | 
				
			||||||
	if (handle == NULL)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	err = snd_pcm_info(handle, &info);
 | 
					 | 
				
			||||||
	lexpr = new_lexpr(instance, err);
 | 
					 | 
				
			||||||
	if (err < 0)
 | 
					 | 
				
			||||||
		return lexpr;
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, lexpr->value.c.cdr, 0, "card", new_integer(instance, snd_pcm_info_get_card(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "device", new_integer(instance, snd_pcm_info_get_device(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "subdevice", new_integer(instance, snd_pcm_info_get_subdevice(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "id", new_string(instance, snd_pcm_info_get_id(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "name", new_string(instance, snd_pcm_info_get_name(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "subdevice_name", new_string(instance, snd_pcm_info_get_subdevice_name(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "class", new_integer(instance, snd_pcm_info_get_class(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "subclass", new_integer(instance, snd_pcm_info_get_subclass(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "subdevices_count", new_integer(instance, snd_pcm_info_get_subdevices_count(&info)));
 | 
					 | 
				
			||||||
	p1 = add_cons(instance, p1, 1, "subdevices_avail", new_integer(instance, snd_pcm_info_get_subdevices_avail(&info)));
 | 
					 | 
				
			||||||
	//p1 = add_cons(instance, p1, 1, "sync", new_string(instance, snd_pcm_info_get_sync(&info)));
 | 
					 | 
				
			||||||
	return lexpr;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 *  main code
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static const struct acall_table acall_table[] = {
 | 
					 | 
				
			||||||
	{ "card_get_index", &FA_int_str, (void *)snd_card_get_index, NULL },
 | 
					 | 
				
			||||||
	{ "card_get_longname", &FA_int_int_strp, (void *)snd_card_get_longname, NULL },
 | 
					 | 
				
			||||||
	{ "card_get_name", &FA_int_int_strp, (void *)snd_card_get_name, NULL },
 | 
					 | 
				
			||||||
	{ "card_next", &FA_int_intp, (void *)&snd_card_next, NULL },
 | 
					 | 
				
			||||||
	{ "ctl_card_info", &FA_card_info, NULL, "ctl" },
 | 
					 | 
				
			||||||
	{ "ctl_close", &FA_int_p, (void *)&snd_ctl_close, "ctl" },
 | 
					 | 
				
			||||||
	{ "ctl_open", &FA_int_pp_strp_int, (void *)&snd_ctl_open, "ctl" },
 | 
					 | 
				
			||||||
	{ "hctl_close", &FA_int_p, (void *)&snd_hctl_close, "hctl" },
 | 
					 | 
				
			||||||
	{ "hctl_ctl", &FA_p_p, (void *)&snd_hctl_ctl, "hctl" },
 | 
					 | 
				
			||||||
	{ "hctl_elem_info", &FA_hctl_elem_info, (void *)&snd_hctl_elem_info, "hctl_elem" },
 | 
					 | 
				
			||||||
	{ "hctl_elem_next", &FA_p_p, (void *)&snd_hctl_elem_next, "hctl_elem" },
 | 
					 | 
				
			||||||
	{ "hctl_elem_prev", &FA_p_p, (void *)&snd_hctl_elem_prev, "hctl_elem" },
 | 
					 | 
				
			||||||
	{ "hctl_elem_read", &FA_hctl_elem_read, (void *)&snd_hctl_elem_read, "hctl_elem" },
 | 
					 | 
				
			||||||
	{ "hctl_elem_write", &FA_hctl_elem_write, (void *)&snd_hctl_elem_write, "hctl_elem" },
 | 
					 | 
				
			||||||
	{ "hctl_find_elem", &FA_hctl_find_elem, (void *)&snd_hctl_find_elem, "hctl" },
 | 
					 | 
				
			||||||
	{ "hctl_first_elem", &FA_p_p, (void *)&snd_hctl_first_elem, "hctl" },
 | 
					 | 
				
			||||||
	{ "hctl_free", &FA_int_p, (void *)&snd_hctl_free, "hctl" },
 | 
					 | 
				
			||||||
	{ "hctl_last_elem", &FA_p_p, (void *)&snd_hctl_last_elem, "hctl" },
 | 
					 | 
				
			||||||
	{ "hctl_load", &FA_int_p, (void *)&snd_hctl_load, "hctl" },
 | 
					 | 
				
			||||||
	{ "hctl_open", &FA_int_pp_strp_int, (void *)&snd_hctl_open, "hctl" },
 | 
					 | 
				
			||||||
	{ "hctl_open_ctl", &FA_int_pp_p, (void *)&snd_hctl_open_ctl, "hctl" },
 | 
					 | 
				
			||||||
	{ "pcm_info", &FA_pcm_info, NULL, "pcm" },
 | 
					 | 
				
			||||||
	{ "pcm_name", &FA_str_p, (void *)&snd_pcm_name, "pcm" },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int acall_compar(const void *p1, const void *p2)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	return strcmp(((struct acall_table *)p1)->name,
 | 
					 | 
				
			||||||
        	      ((struct acall_table *)p2)->name);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * F_acall(struct alisp_instance *instance, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object * p1, *p2;
 | 
					 | 
				
			||||||
	struct acall_table key, *item;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	p2 = cdr(args);
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	if (!alisp_compare_type(p1, ALISP_OBJ_IDENTIFIER) &&
 | 
					 | 
				
			||||||
	    !alisp_compare_type(p1, ALISP_OBJ_STRING)) {
 | 
					 | 
				
			||||||
	    	delete_tree(instance, p2);
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	key.name = p1->value.s;
 | 
					 | 
				
			||||||
	if ((item = bsearch(&key, acall_table,
 | 
					 | 
				
			||||||
			    sizeof acall_table / sizeof acall_table[0],
 | 
					 | 
				
			||||||
			    sizeof acall_table[0], acall_compar)) != NULL) {
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
		return item->func(instance, item, p2);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	delete_tree(instance, p1);
 | 
					 | 
				
			||||||
	delete_tree(instance, p2);
 | 
					 | 
				
			||||||
	lisp_warn(instance, "acall function %s' is undefined", p1->value.s);
 | 
					 | 
				
			||||||
	return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * F_ahandle(struct alisp_instance *instance, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object *p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	args = car(cdr(p1));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(cdr(p1)));
 | 
					 | 
				
			||||||
	delete_object(instance, cdr(p1));
 | 
					 | 
				
			||||||
	delete_tree(instance, car(p1));
 | 
					 | 
				
			||||||
	delete_object(instance, p1);
 | 
					 | 
				
			||||||
	return args;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * F_aerror(struct alisp_instance *instance, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object *p1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	p1 = eval(instance, car(args));
 | 
					 | 
				
			||||||
	delete_tree(instance, cdr(args));
 | 
					 | 
				
			||||||
	delete_object(instance, args);
 | 
					 | 
				
			||||||
	args = car(p1);
 | 
					 | 
				
			||||||
	if (args == &alsa_lisp_nil) {
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
		return new_integer(instance, SND_ERROR_ALISP_NIL);
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		delete_tree(instance, cdr(p1));
 | 
					 | 
				
			||||||
		delete_object(instance, p1);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return args;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int common_error(snd_output_t **rout, struct alisp_instance *instance, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct alisp_object * p = args, * p1;
 | 
					 | 
				
			||||||
	snd_output_t *out;
 | 
					 | 
				
			||||||
	int err;
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	err = snd_output_buffer_open(&out);
 | 
					 | 
				
			||||||
	if (err < 0) {
 | 
					 | 
				
			||||||
		delete_tree(instance, args);
 | 
					 | 
				
			||||||
		return err;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	do {
 | 
					 | 
				
			||||||
		p1 = eval(instance, car(p));
 | 
					 | 
				
			||||||
		if (alisp_compare_type(p1, ALISP_OBJ_STRING))
 | 
					 | 
				
			||||||
			snd_output_printf(out, "%s", p1->value.s);
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			princ_object(out, p1);
 | 
					 | 
				
			||||||
		delete_tree(instance, p1);
 | 
					 | 
				
			||||||
		p = cdr(p1 = p);
 | 
					 | 
				
			||||||
		delete_object(instance, p1);
 | 
					 | 
				
			||||||
	} while (p != &alsa_lisp_nil);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	*rout = out;
 | 
					 | 
				
			||||||
	return 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * F_snderr(struct alisp_instance *instance, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	snd_output_t *out;
 | 
					 | 
				
			||||||
	char *str;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (common_error(&out, instance, args) < 0)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	snd_output_buffer_string(out, &str);
 | 
					 | 
				
			||||||
	SNDERR(str);
 | 
					 | 
				
			||||||
	snd_output_close(out);
 | 
					 | 
				
			||||||
	return &alsa_lisp_t;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static struct alisp_object * F_syserr(struct alisp_instance *instance, struct alisp_object * args)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	snd_output_t *out;
 | 
					 | 
				
			||||||
	char *str;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (common_error(&out, instance, args) < 0)
 | 
					 | 
				
			||||||
		return &alsa_lisp_nil;
 | 
					 | 
				
			||||||
	snd_output_buffer_string(out, &str);
 | 
					 | 
				
			||||||
	SYSERR(str);
 | 
					 | 
				
			||||||
	snd_output_close(out);
 | 
					 | 
				
			||||||
	return &alsa_lisp_t;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static const struct intrinsic snd_intrinsics[] = {
 | 
					 | 
				
			||||||
	{ "Acall", F_acall },
 | 
					 | 
				
			||||||
	{ "Aerror", F_aerror },
 | 
					 | 
				
			||||||
	{ "Ahandle", F_ahandle },
 | 
					 | 
				
			||||||
	{ "Aresult", F_ahandle },
 | 
					 | 
				
			||||||
	{ "Asnderr", F_snderr },
 | 
					 | 
				
			||||||
	{ "Asyserr", F_syserr }
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
							
								
								
									
										73
									
								
								src/async.c
									
										
									
									
									
								
							
							
						
						
									
										73
									
								
								src/async.c
									
										
									
									
									
								
							| 
						 | 
					@ -29,7 +29,9 @@
 | 
				
			||||||
#include <signal.h>
 | 
					#include <signal.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct sigaction previous_action;
 | 
					static struct sigaction previous_action;
 | 
				
			||||||
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
#define MAX_SIG_FUNCTION_CODE 10 /* i.e. SIG_DFL SIG_IGN SIG_HOLD et al */
 | 
					#define MAX_SIG_FUNCTION_CODE 10 /* i.e. SIG_DFL SIG_IGN SIG_HOLD et al */
 | 
				
			||||||
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef SND_ASYNC_RT_SIGNAL
 | 
					#ifdef SND_ASYNC_RT_SIGNAL
 | 
				
			||||||
/** async signal number */
 | 
					/** async signal number */
 | 
				
			||||||
| 
						 | 
					@ -54,6 +56,15 @@ static LIST_HEAD(snd_async_handlers);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
 | 
					static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
 | 
				
			||||||
 | 
						/* siginfo_t does not have si_fd */
 | 
				
			||||||
 | 
						struct list_head *i;
 | 
				
			||||||
 | 
						list_for_each(i, &snd_async_handlers) {
 | 
				
			||||||
 | 
							snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);
 | 
				
			||||||
 | 
							if (h->callback)
 | 
				
			||||||
 | 
								h->callback(h);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
	int fd;
 | 
						int fd;
 | 
				
			||||||
	struct list_head *i;
 | 
						struct list_head *i;
 | 
				
			||||||
	//assert(siginfo->si_code == SI_SIGIO);
 | 
						//assert(siginfo->si_code == SI_SIGIO);
 | 
				
			||||||
| 
						 | 
					@ -66,6 +77,7 @@ static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, vo
 | 
				
			||||||
		if (h->fd == fd && h->callback)
 | 
							if (h->fd == fd && h->callback)
 | 
				
			||||||
			h->callback(h);
 | 
								h->callback(h);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -137,12 +149,44 @@ int snd_async_add_handler(snd_async_handler_t **handler, int fd,
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int snd_async_del_handler(snd_async_handler_t *handler)
 | 
					int snd_async_del_handler(snd_async_handler_t *handler)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int err = 0;
 | 
						int err = 0, err2 = 0;
 | 
				
			||||||
	int was_empty = list_empty(&snd_async_handlers);
 | 
						int was_empty;
 | 
				
			||||||
	assert(handler);
 | 
						assert(handler);
 | 
				
			||||||
 | 
						if (handler->type != SND_ASYNC_HANDLER_GENERIC) {
 | 
				
			||||||
 | 
							struct list_head *alist;
 | 
				
			||||||
 | 
							switch (handler->type) {
 | 
				
			||||||
 | 
					#ifdef BUILD_PCM
 | 
				
			||||||
 | 
							case SND_ASYNC_HANDLER_PCM:
 | 
				
			||||||
 | 
								alist = &handler->u.pcm->async_handlers;
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
							case SND_ASYNC_HANDLER_CTL:
 | 
				
			||||||
 | 
								alist = &handler->u.ctl->async_handlers;
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							default:
 | 
				
			||||||
 | 
								assert(0);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if (!list_empty(alist))
 | 
				
			||||||
 | 
								list_del(&handler->hlist);
 | 
				
			||||||
 | 
							if (!list_empty(alist))
 | 
				
			||||||
 | 
								goto _glist;
 | 
				
			||||||
 | 
							switch (handler->type) {
 | 
				
			||||||
 | 
					#ifdef BUILD_PCM
 | 
				
			||||||
 | 
							case SND_ASYNC_HANDLER_PCM:
 | 
				
			||||||
 | 
								err2 = snd_pcm_async(handler->u.pcm, -1, 1);
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
							case SND_ASYNC_HANDLER_CTL:
 | 
				
			||||||
 | 
								err2 = snd_ctl_async(handler->u.ctl, -1, 1);
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							default:
 | 
				
			||||||
 | 
								assert(0);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					 _glist:
 | 
				
			||||||
 | 
						was_empty = list_empty(&snd_async_handlers);
 | 
				
			||||||
	list_del(&handler->glist);
 | 
						list_del(&handler->glist);
 | 
				
			||||||
	if (!was_empty
 | 
						if (!was_empty && list_empty(&snd_async_handlers)) {
 | 
				
			||||||
	 && list_empty(&snd_async_handlers)) {
 | 
					 | 
				
			||||||
		err = sigaction(snd_async_signo, &previous_action, NULL);
 | 
							err = sigaction(snd_async_signo, &previous_action, NULL);
 | 
				
			||||||
		if (err < 0) {
 | 
							if (err < 0) {
 | 
				
			||||||
			SYSERR("sigaction");
 | 
								SYSERR("sigaction");
 | 
				
			||||||
| 
						 | 
					@ -150,27 +194,8 @@ int snd_async_del_handler(snd_async_handler_t *handler)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		memset(&previous_action, 0, sizeof(previous_action));
 | 
							memset(&previous_action, 0, sizeof(previous_action));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (handler->type == SND_ASYNC_HANDLER_GENERIC)
 | 
					 | 
				
			||||||
		goto _end;
 | 
					 | 
				
			||||||
	if (!list_empty(&handler->hlist))
 | 
					 | 
				
			||||||
		list_del(&handler->hlist);
 | 
					 | 
				
			||||||
	if (!list_empty(&handler->hlist))
 | 
					 | 
				
			||||||
		goto _end;
 | 
					 | 
				
			||||||
	switch (handler->type) {
 | 
					 | 
				
			||||||
#ifdef BUILD_PCM
 | 
					 | 
				
			||||||
	case SND_ASYNC_HANDLER_PCM:
 | 
					 | 
				
			||||||
		err = snd_pcm_async(handler->u.pcm, -1, 1);
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
	case SND_ASYNC_HANDLER_CTL:
 | 
					 | 
				
			||||||
		err = snd_ctl_async(handler->u.ctl, -1, 1);
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
	default:
 | 
					 | 
				
			||||||
		assert(0);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 _end:
 | 
					 | 
				
			||||||
	free(handler);
 | 
						free(handler);
 | 
				
			||||||
	return err;
 | 
						return err ? err : err2;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										130
									
								
								src/conf.c
									
										
									
									
									
								
							
							
						
						
									
										130
									
								
								src/conf.c
									
										
									
									
									
								
							| 
						 | 
					@ -527,7 +527,7 @@ static inline void snd_config_unlock(void) { }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Add a diretory to the paths to search included files.
 | 
					 * Add a directory to the paths to search included files.
 | 
				
			||||||
 * param fd -  File object that owns these paths to search files included by it.
 | 
					 * param fd -  File object that owns these paths to search files included by it.
 | 
				
			||||||
 * param dir - Path of the directory to add. Allocated externally and need to
 | 
					 * param dir - Path of the directory to add. Allocated externally and need to
 | 
				
			||||||
*              be freed manually later.
 | 
					*              be freed manually later.
 | 
				
			||||||
| 
						 | 
					@ -584,6 +584,8 @@ static void free_include_paths(struct filedesc *fd)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Returns the default top-level config directory
 | 
					 * \brief Returns the default top-level config directory
 | 
				
			||||||
 * \return The top-level config directory path string
 | 
					 * \return The top-level config directory path string
 | 
				
			||||||
| 
						 | 
					@ -605,6 +607,8 @@ const char *snd_config_topdir(void)
 | 
				
			||||||
	return topdir;
 | 
						return topdir;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static char *_snd_config_path(const char *name)
 | 
					static char *_snd_config_path(const char *name)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	const char *root = snd_config_topdir();
 | 
						const char *root = snd_config_topdir();
 | 
				
			||||||
| 
						 | 
					@ -814,11 +818,12 @@ static int get_char_skip_comments(input_t *input)
 | 
				
			||||||
				closedir(dirp);
 | 
									closedir(dirp);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				err = add_include_path(input->current, str);
 | 
									err = add_include_path(input->current, str);
 | 
				
			||||||
				free(str);
 | 
					 | 
				
			||||||
				if (err < 0) {
 | 
									if (err < 0) {
 | 
				
			||||||
					SNDERR("Cannot add search dir %s", str);
 | 
										SNDERR("Cannot add search dir %s", str);
 | 
				
			||||||
 | 
										free(str);
 | 
				
			||||||
					return err;
 | 
										return err;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
									free(str);
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1263,13 +1268,13 @@ static int parse_array_def(snd_config_t *parent, input_t *input, int *idx, int s
 | 
				
			||||||
	snd_config_t *n = NULL;
 | 
						snd_config_t *n = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!skip) {
 | 
						if (!skip) {
 | 
				
			||||||
		snd_config_t *g;
 | 
					 | 
				
			||||||
		char static_id[12];
 | 
							char static_id[12];
 | 
				
			||||||
		while (1) {
 | 
							while (1) {
 | 
				
			||||||
			snprintf(static_id, sizeof(static_id), "%i", *idx);
 | 
								snprintf(static_id, sizeof(static_id), "%i", *idx);
 | 
				
			||||||
			if (_snd_config_search(parent, static_id, -1, &g) == 0) {
 | 
								if (_snd_config_search(parent, static_id, -1, &n) == 0) {
 | 
				
			||||||
				if (override) {
 | 
									if (override) {
 | 
				
			||||||
					snd_config_delete(n);
 | 
										snd_config_delete(n);
 | 
				
			||||||
 | 
										/* fallthrough to break */
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					/* merge */
 | 
										/* merge */
 | 
				
			||||||
					(*idx)++;
 | 
										(*idx)++;
 | 
				
			||||||
| 
						 | 
					@ -1278,6 +1283,7 @@ static int parse_array_def(snd_config_t *parent, input_t *input, int *idx, int s
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							n = NULL;
 | 
				
			||||||
		id = strdup(static_id);
 | 
							id = strdup(static_id);
 | 
				
			||||||
		if (id == NULL)
 | 
							if (id == NULL)
 | 
				
			||||||
			return -ENOMEM;
 | 
								return -ENOMEM;
 | 
				
			||||||
| 
						 | 
					@ -1699,7 +1705,7 @@ static int _snd_config_save_children(snd_config_t *config, snd_output_t *out,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -1724,7 +1730,7 @@ static int _snd_config_save_children(snd_config_t *config, snd_output_t *out,
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int snd_config_substitute(snd_config_t *dst, snd_config_t *src)
 | 
					int snd_config_substitute(snd_config_t *dst, snd_config_t *src)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	assert(dst && src);
 | 
						assert(dst && src && src != dst);
 | 
				
			||||||
	if (dst->type == SND_CONFIG_TYPE_COMPOUND) {
 | 
						if (dst->type == SND_CONFIG_TYPE_COMPOUND) {
 | 
				
			||||||
		int err = snd_config_delete_compound_members(dst);
 | 
							int err = snd_config_delete_compound_members(dst);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
| 
						 | 
					@ -1743,6 +1749,8 @@ int snd_config_substitute(snd_config_t *dst, snd_config_t *src)
 | 
				
			||||||
	free(dst->id);
 | 
						free(dst->id);
 | 
				
			||||||
	if (dst->type == SND_CONFIG_TYPE_STRING)
 | 
						if (dst->type == SND_CONFIG_TYPE_STRING)
 | 
				
			||||||
		free(dst->u.string);
 | 
							free(dst->u.string);
 | 
				
			||||||
 | 
						if (src->parent)	/* like snd_config_remove */
 | 
				
			||||||
 | 
							list_del(&src->list);
 | 
				
			||||||
	dst->id = src->id;
 | 
						dst->id = src->id;
 | 
				
			||||||
	dst->type = src->type;
 | 
						dst->type = src->type;
 | 
				
			||||||
	dst->u = src->u;
 | 
						dst->u = src->u;
 | 
				
			||||||
| 
						 | 
					@ -2054,7 +2062,7 @@ int snd_config_load(snd_config_t *config, snd_input_t *in)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Loads a configuration tree from a string.
 | 
					 * \brief Loads a configuration tree from a string.
 | 
				
			||||||
 * \param[out] The function puts the handle to the configuration
 | 
					 * \param[out] config The function puts the handle to the configuration
 | 
				
			||||||
 *	       node loaded from the file(s) at the address specified
 | 
					 *	       node loaded from the file(s) at the address specified
 | 
				
			||||||
 *             by \a config.
 | 
					 *             by \a config.
 | 
				
			||||||
 * \param[in] s String with the ASCII configuration
 | 
					 * \param[in] s String with the ASCII configuration
 | 
				
			||||||
| 
						 | 
					@ -2259,9 +2267,9 @@ static int _snd_config_array_merge(snd_config_t *dst, snd_config_t *src, int ind
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief In-place merge of two config handles
 | 
					 * \brief In-place merge of two config handles
 | 
				
			||||||
 * \param dst[out] Config handle for the merged contents
 | 
					 * \param[out] dst Config handle for the merged contents
 | 
				
			||||||
 * \param src[in] Config handle to merge into dst (may be NULL)
 | 
					 * \param[in] src Config handle to merge into dst (may be NULL)
 | 
				
			||||||
 * \param override[in] Override flag
 | 
					 * \param[in] override Override flag
 | 
				
			||||||
 * \return Zero if successful, otherwise a negative error code.
 | 
					 * \return Zero if successful, otherwise a negative error code.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This function merges all fields from the source compound to the destination compound.
 | 
					 * This function merges all fields from the source compound to the destination compound.
 | 
				
			||||||
| 
						 | 
					@ -2305,7 +2313,6 @@ int snd_config_merge(snd_config_t *dst, snd_config_t *src, int override)
 | 
				
			||||||
				if (override ||
 | 
									if (override ||
 | 
				
			||||||
				    sn->type != SND_CONFIG_TYPE_COMPOUND ||
 | 
									    sn->type != SND_CONFIG_TYPE_COMPOUND ||
 | 
				
			||||||
				    dn->type != SND_CONFIG_TYPE_COMPOUND) {
 | 
									    dn->type != SND_CONFIG_TYPE_COMPOUND) {
 | 
				
			||||||
					snd_config_remove(sn);
 | 
					 | 
				
			||||||
					err = snd_config_substitute(dn, sn);
 | 
										err = snd_config_substitute(dn, sn);
 | 
				
			||||||
					if (err < 0)
 | 
										if (err < 0)
 | 
				
			||||||
						return err;
 | 
											return err;
 | 
				
			||||||
| 
						 | 
					@ -2872,6 +2879,26 @@ int snd_config_imake_string(snd_config_t **config, const char *id, const char *v
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * \brief Creates a string configuration node with the given initial value.
 | 
				
			||||||
 | 
					 * \param[out] config The function puts the handle to the new node at
 | 
				
			||||||
 | 
					 *                    the address specified by \a config.
 | 
				
			||||||
 | 
					 * \param[in] id The id of the new node.
 | 
				
			||||||
 | 
					 * \param[in] value The initial value of the new node.  May be \c NULL.
 | 
				
			||||||
 | 
					 * \return Zero if successful, otherwise a negative error code.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This function creates a new node of type #SND_CONFIG_TYPE_STRING. The node
 | 
				
			||||||
 | 
					 * contains with a copy of the string \c value, replacing any character other
 | 
				
			||||||
 | 
					 * than alphanumeric, space, or '-' with the character '_'.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * \par Errors:
 | 
				
			||||||
 | 
					 * <dl>
 | 
				
			||||||
 | 
					 * <dt>-ENOMEM<dd>Out of memory.
 | 
				
			||||||
 | 
					 * </dl>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * \par Conforming to:
 | 
				
			||||||
 | 
					 * LSB 3.2
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
int snd_config_imake_safe_string(snd_config_t **config, const char *id, const char *value)
 | 
					int snd_config_imake_safe_string(snd_config_t **config, const char *id, const char *value)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
| 
						 | 
					@ -3893,7 +3920,6 @@ int snd_config_search_alias_hooks(snd_config_t *config,
 | 
				
			||||||
#define ALSA_CONFIG_PATH_VAR "ALSA_CONFIG_PATH"
 | 
					#define ALSA_CONFIG_PATH_VAR "ALSA_CONFIG_PATH"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \ingroup Config
 | 
					 | 
				
			||||||
 * \brief Configuration top-level node (the global configuration).
 | 
					 * \brief Configuration top-level node (the global configuration).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * This variable contains a handle to the top-level configuration node,
 | 
					 * This variable contains a handle to the top-level configuration node,
 | 
				
			||||||
| 
						 | 
					@ -3921,7 +3947,7 @@ snd_config_t *snd_config = NULL;
 | 
				
			||||||
struct finfo {
 | 
					struct finfo {
 | 
				
			||||||
	char *name;
 | 
						char *name;
 | 
				
			||||||
	dev_t dev;
 | 
						dev_t dev;
 | 
				
			||||||
	ino_t ino;
 | 
						ino64_t ino;
 | 
				
			||||||
	time_t mtime;
 | 
						time_t mtime;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4083,14 +4109,17 @@ static int config_filename_filter(const struct dirent64 *dirent)
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int config_file_open(snd_config_t *root, const char *filename)
 | 
					static int config_file_open(snd_config_t *root, const char *filename, int merge)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	snd_input_t *in;
 | 
						snd_input_t *in;
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = snd_input_stdio_open(&in, filename, "r");
 | 
						err = snd_input_stdio_open(&in, filename, "r");
 | 
				
			||||||
	if (err >= 0) {
 | 
						if (err >= 0) {
 | 
				
			||||||
		err = snd_config_load(root, in);
 | 
							if (merge)
 | 
				
			||||||
 | 
								err = snd_config_load(root, in);
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								err = snd_config_load_override(root, in);
 | 
				
			||||||
		snd_input_close(in);
 | 
							snd_input_close(in);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
			SNDERR("%s may be old or corrupted: consider to remove or fix it", filename);
 | 
								SNDERR("%s may be old or corrupted: consider to remove or fix it", filename);
 | 
				
			||||||
| 
						 | 
					@ -4100,7 +4129,7 @@ static int config_file_open(snd_config_t *root, const char *filename)
 | 
				
			||||||
	return err;
 | 
						return err;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int config_file_load(snd_config_t *root, const char *fn, int errors)
 | 
					static int config_file_load(snd_config_t *root, const char *fn, int errors, int merge)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct stat64 st;
 | 
						struct stat64 st;
 | 
				
			||||||
	struct dirent64 **namelist;
 | 
						struct dirent64 **namelist;
 | 
				
			||||||
| 
						 | 
					@ -4113,9 +4142,16 @@ static int config_file_load(snd_config_t *root, const char *fn, int errors)
 | 
				
			||||||
		return 1;
 | 
							return 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (!S_ISDIR(st.st_mode))
 | 
						if (!S_ISDIR(st.st_mode))
 | 
				
			||||||
		return config_file_open(root, fn);
 | 
							return config_file_open(root, fn, merge);
 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun) && !defined(ANDROID)
 | 
					#if defined(_GNU_SOURCE) && \
 | 
				
			||||||
 | 
					    !defined(__NetBSD__) && \
 | 
				
			||||||
 | 
					    !defined(__FreeBSD__) && \
 | 
				
			||||||
 | 
					    !defined(__OpenBSD__) && \
 | 
				
			||||||
 | 
					    !defined(__DragonFly__) && \
 | 
				
			||||||
 | 
					    !defined(__sun) && \
 | 
				
			||||||
 | 
					    !defined(__ANDROID__) && \
 | 
				
			||||||
 | 
					    !defined(__OHOS__)
 | 
				
			||||||
#define SORTFUNC	versionsort64
 | 
					#define SORTFUNC	versionsort64
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#define SORTFUNC	alphasort64
 | 
					#define SORTFUNC	alphasort64
 | 
				
			||||||
| 
						 | 
					@ -4132,7 +4168,7 @@ static int config_file_load(snd_config_t *root, const char *fn, int errors)
 | 
				
			||||||
				snprintf(filename, sl, "%s/%s", fn, namelist[j]->d_name);
 | 
									snprintf(filename, sl, "%s/%s", fn, namelist[j]->d_name);
 | 
				
			||||||
				filename[sl-1] = '\0';
 | 
									filename[sl-1] = '\0';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				err = config_file_open(root, filename);
 | 
									err = config_file_open(root, filename, merge);
 | 
				
			||||||
				free(filename);
 | 
									free(filename);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			free(namelist[j]);
 | 
								free(namelist[j]);
 | 
				
			||||||
| 
						 | 
					@ -4144,20 +4180,20 @@ static int config_file_load(snd_config_t *root, const char *fn, int errors)
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int config_file_load_user(snd_config_t *root, const char *fn, int errors)
 | 
					static int config_file_load_user(snd_config_t *root, const char *fn, int errors, int merge)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	char *fn2;
 | 
						char *fn2;
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = snd_user_file(fn, &fn2);
 | 
						err = snd_user_file(fn, &fn2);
 | 
				
			||||||
	if (err < 0)
 | 
						if (err < 0)
 | 
				
			||||||
		return config_file_load(root, fn, errors);
 | 
							return config_file_load(root, fn, errors, merge);
 | 
				
			||||||
	err = config_file_load(root, fn2, errors);
 | 
						err = config_file_load(root, fn2, errors, merge);
 | 
				
			||||||
	free(fn2);
 | 
						free(fn2);
 | 
				
			||||||
	return err;
 | 
						return err;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int config_file_load_user_all(snd_config_t *_root, snd_config_t *_file, int errors)
 | 
					static int config_file_load_user_all(snd_config_t *_root, snd_config_t *_file, int errors, int merge)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	snd_config_t *file = _file, *root = _root, *n;
 | 
						snd_config_t *file = _file, *root = _root, *n;
 | 
				
			||||||
	char *name, *name2, *remain, *rname = NULL;
 | 
						char *name, *name2, *remain, *rname = NULL;
 | 
				
			||||||
| 
						 | 
					@ -4188,7 +4224,7 @@ static int config_file_load_user_all(snd_config_t *_root, snd_config_t *_file, i
 | 
				
			||||||
			*remain = '\0';
 | 
								*remain = '\0';
 | 
				
			||||||
			remain += 3;
 | 
								remain += 3;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		err = config_file_load_user(root, name2, errors);
 | 
							err = config_file_load_user(root, name2, errors, merge);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
			goto _err;
 | 
								goto _err;
 | 
				
			||||||
		if (err == 0)	/* first hit wins */
 | 
							if (err == 0)	/* first hit wins */
 | 
				
			||||||
| 
						 | 
					@ -4237,7 +4273,7 @@ int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	snd_config_t *n;
 | 
						snd_config_t *n;
 | 
				
			||||||
	snd_config_iterator_t i, next;
 | 
						snd_config_iterator_t i, next;
 | 
				
			||||||
	int err, idx = 0, errors = 1, hit;
 | 
						int err, idx = 0, errors = 1, merge = 1, hit;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	assert(root && dst);
 | 
						assert(root && dst);
 | 
				
			||||||
	if ((err = snd_config_search(config, "errors", &n)) >= 0) {
 | 
						if ((err = snd_config_search(config, "errors", &n)) >= 0) {
 | 
				
			||||||
| 
						 | 
					@ -4247,6 +4283,10 @@ int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t
 | 
				
			||||||
			return errors;
 | 
								return errors;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						/* special case, we know the card number (may be multiple times) */
 | 
				
			||||||
 | 
						if (private_data && snd_config_search(private_data, "integer", &n) >= 0) {
 | 
				
			||||||
 | 
							merge = 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if ((err = snd_config_search(config, "files", &n)) < 0) {
 | 
						if ((err = snd_config_search(config, "files", &n)) < 0) {
 | 
				
			||||||
		SNDERR("Unable to find field files in the pre-load section");
 | 
							SNDERR("Unable to find field files in the pre-load section");
 | 
				
			||||||
		return -EINVAL;
 | 
							return -EINVAL;
 | 
				
			||||||
| 
						 | 
					@ -4259,6 +4299,7 @@ int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t
 | 
				
			||||||
		SNDERR("Invalid type for field filenames");
 | 
							SNDERR("Invalid type for field filenames");
 | 
				
			||||||
		goto _err;
 | 
							goto _err;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	do {
 | 
						do {
 | 
				
			||||||
		hit = 0;
 | 
							hit = 0;
 | 
				
			||||||
		snd_config_for_each(i, next, n) {
 | 
							snd_config_for_each(i, next, n) {
 | 
				
			||||||
| 
						 | 
					@ -4272,7 +4313,7 @@ int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t
 | 
				
			||||||
				goto _err;
 | 
									goto _err;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if (i == idx) {
 | 
								if (i == idx) {
 | 
				
			||||||
				err = config_file_load_user_all(root, n, errors);
 | 
									err = config_file_load_user_all(root, n, errors, merge);
 | 
				
			||||||
				if (err < 0)
 | 
									if (err < 0)
 | 
				
			||||||
					goto _err;
 | 
										goto _err;
 | 
				
			||||||
				idx++;
 | 
									idx++;
 | 
				
			||||||
| 
						 | 
					@ -4294,7 +4335,7 @@ SND_DLSYM_BUILD_VERSION(snd_config_hook_load, SND_CONFIG_DLSYM_VERSION_HOOK);
 | 
				
			||||||
int snd_determine_driver(int card, char **driver);
 | 
					int snd_determine_driver(int card, char **driver);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
snd_config_t *_snd_config_hook_private_data(int card, const char *driver)
 | 
					static snd_config_t *_snd_config_hook_private_data(int card, const char *driver)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	snd_config_t *private_data, *v;
 | 
						snd_config_t *private_data, *v;
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
| 
						 | 
					@ -4381,23 +4422,18 @@ static int _snd_config_hook_table(snd_config_t *root, snd_config_t *config, snd_
 | 
				
			||||||
int snd_config_hook_load_for_all_cards(snd_config_t *root, snd_config_t *config, snd_config_t **dst, snd_config_t *private_data ATTRIBUTE_UNUSED)
 | 
					int snd_config_hook_load_for_all_cards(snd_config_t *root, snd_config_t *config, snd_config_t **dst, snd_config_t *private_data ATTRIBUTE_UNUSED)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int card = -1, err;
 | 
						int card = -1, err;
 | 
				
			||||||
	snd_config_t *loaded;	// trace loaded cards
 | 
					 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	err = snd_config_top(&loaded);
 | 
					 | 
				
			||||||
	if (err < 0)
 | 
					 | 
				
			||||||
		return err;
 | 
					 | 
				
			||||||
	do {
 | 
						do {
 | 
				
			||||||
		err = snd_card_next(&card);
 | 
							err = snd_card_next(&card);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
			goto __fin_err;
 | 
								return err;
 | 
				
			||||||
		if (card >= 0) {
 | 
							if (card >= 0) {
 | 
				
			||||||
			snd_config_t *n, *m, *private_data = NULL;
 | 
								snd_config_t *n, *private_data = NULL;
 | 
				
			||||||
			const char *driver;
 | 
								const char *driver;
 | 
				
			||||||
			char *fdriver = NULL;
 | 
								char *fdriver = NULL;
 | 
				
			||||||
			bool load;
 | 
					 | 
				
			||||||
			err = snd_determine_driver(card, &fdriver);
 | 
								err = snd_determine_driver(card, &fdriver);
 | 
				
			||||||
			if (err < 0)
 | 
								if (err < 0)
 | 
				
			||||||
				goto __fin_err;
 | 
									return err;
 | 
				
			||||||
			if (snd_config_search(root, fdriver, &n) >= 0) {
 | 
								if (snd_config_search(root, fdriver, &n) >= 0) {
 | 
				
			||||||
				if (snd_config_get_string(n, &driver) < 0) {
 | 
									if (snd_config_get_string(n, &driver) < 0) {
 | 
				
			||||||
					if (snd_config_get_type(n) == SND_CONFIG_TYPE_COMPOUND) {
 | 
										if (snd_config_get_type(n) == SND_CONFIG_TYPE_COMPOUND) {
 | 
				
			||||||
| 
						 | 
					@ -4418,19 +4454,6 @@ int snd_config_hook_load_for_all_cards(snd_config_t *root, snd_config_t *config,
 | 
				
			||||||
				driver = fdriver;
 | 
									driver = fdriver;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		      __std:
 | 
							      __std:
 | 
				
			||||||
			load = true;
 | 
					 | 
				
			||||||
			err = snd_config_imake_integer(&m, driver, 1);
 | 
					 | 
				
			||||||
			if (err < 0)
 | 
					 | 
				
			||||||
				goto __err;
 | 
					 | 
				
			||||||
			err = snd_config_add(loaded, m);
 | 
					 | 
				
			||||||
			if (err < 0) {
 | 
					 | 
				
			||||||
				if (err == -EEXIST) {
 | 
					 | 
				
			||||||
					snd_config_delete(m);
 | 
					 | 
				
			||||||
					load = false;
 | 
					 | 
				
			||||||
				} else {
 | 
					 | 
				
			||||||
					goto __err;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			private_data = _snd_config_hook_private_data(card, driver);
 | 
								private_data = _snd_config_hook_private_data(card, driver);
 | 
				
			||||||
			if (!private_data) {
 | 
								if (!private_data) {
 | 
				
			||||||
				err = -ENOMEM;
 | 
									err = -ENOMEM;
 | 
				
			||||||
| 
						 | 
					@ -4439,22 +4462,17 @@ int snd_config_hook_load_for_all_cards(snd_config_t *root, snd_config_t *config,
 | 
				
			||||||
			err = _snd_config_hook_table(root, config, private_data);
 | 
								err = _snd_config_hook_table(root, config, private_data);
 | 
				
			||||||
			if (err < 0)
 | 
								if (err < 0)
 | 
				
			||||||
				goto __err;
 | 
									goto __err;
 | 
				
			||||||
			if (load)
 | 
								err = snd_config_hook_load(root, config, &n, private_data);
 | 
				
			||||||
				err = snd_config_hook_load(root, config, &n, private_data);
 | 
					 | 
				
			||||||
		      __err:
 | 
							      __err:
 | 
				
			||||||
			if (private_data)
 | 
								if (private_data)
 | 
				
			||||||
				snd_config_delete(private_data);
 | 
									snd_config_delete(private_data);
 | 
				
			||||||
			free(fdriver);
 | 
								free(fdriver);
 | 
				
			||||||
			if (err < 0)
 | 
								if (err < 0)
 | 
				
			||||||
				goto __fin_err;
 | 
									return err;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} while (card >= 0);
 | 
						} while (card >= 0);
 | 
				
			||||||
	snd_config_delete(loaded);
 | 
					 | 
				
			||||||
	*dst = NULL;
 | 
						*dst = NULL;
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
__fin_err:
 | 
					 | 
				
			||||||
	snd_config_delete(loaded);
 | 
					 | 
				
			||||||
	return err;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
SND_DLSYM_BUILD_VERSION(snd_config_hook_load_for_all_cards, SND_CONFIG_DLSYM_VERSION_HOOK);
 | 
					SND_DLSYM_BUILD_VERSION(snd_config_hook_load_for_all_cards, SND_CONFIG_DLSYM_VERSION_HOOK);
 | 
				
			||||||
| 
						 | 
					@ -5809,6 +5827,7 @@ static void _snd_config_end(void)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
size_t page_size(void)
 | 
					size_t page_size(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	long s = sysconf(_SC_PAGE_SIZE);
 | 
						long s = sysconf(_SC_PAGE_SIZE);
 | 
				
			||||||
| 
						 | 
					@ -5844,3 +5863,4 @@ size_t page_ptr(size_t object_offset, size_t object_size, size_t *offset, size_t
 | 
				
			||||||
	*offset = object_offset;
 | 
						*offset = object_offset;
 | 
				
			||||||
	return r;
 | 
						return r;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,6 @@
 | 
				
			||||||
SUBDIRS=cards ctl pcm
 | 
					SUBDIRS=cards ctl pcm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cfg_files = alsa.conf
 | 
					cfg_files = alsa.conf
 | 
				
			||||||
if BUILD_ALISP
 | 
					 | 
				
			||||||
cfg_files += sndo-mixer.alisp
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
if BUILD_MODULES
 | 
					if BUILD_MODULES
 | 
				
			||||||
if BUILD_MIXER_MODULES
 | 
					if BUILD_MIXER_MODULES
 | 
				
			||||||
cfg_files += smixer.conf
 | 
					cfg_files += smixer.conf
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,14 +26,6 @@ Audigy.pcm.front.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
									value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				interface PCM
 | 
									interface PCM
 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
									name "EMU10K1 PCM Send Routing"
 | 
				
			||||||
| 
						 | 
					@ -42,15 +34,6 @@ Audigy.pcm.front.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0 ]
 | 
									value [ 8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}	
 | 
					}	
 | 
				
			||||||
| 
						 | 
					@ -79,14 +62,6 @@ Audigy.pcm.rear.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 0 0 255 255 0 0 0 0  0 0 255 0 0 0 0 0  0 0 0 255 0 0 0 0 ]
 | 
									value [ 0 0 255 255 0 0 0 0  0 0 255 0 0 0 0 0  0 0 0 255 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 0 0 255 255 0 0 0 0  0 0 255 0 0 0 0 0  0 0 0 255 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}	
 | 
					}	
 | 
				
			||||||
| 
						 | 
					@ -115,14 +90,6 @@ Audigy.pcm.center_lfe.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
									value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				interface PCM
 | 
									interface PCM
 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
									name "EMU10K1 PCM Send Routing"
 | 
				
			||||||
| 
						 | 
					@ -131,14 +98,6 @@ Audigy.pcm.center_lfe.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0 ]
 | 
									value [ 6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}	
 | 
					}	
 | 
				
			||||||
| 
						 | 
					@ -265,14 +224,6 @@ Audigy.pcm.iec958.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ $AES0 $AES1 $AES2 $AES3 ]
 | 
									value [ $AES0 $AES1 $AES2 $AES3 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "IEC958 Playback Default"
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				preserve true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ $AES0 $AES1 $AES2 $AES3 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				name "IEC958 Optical Raw Playback Switch"
 | 
									name "IEC958 Optical Raw Playback Switch"
 | 
				
			||||||
				lock true
 | 
									lock true
 | 
				
			||||||
| 
						 | 
					@ -287,14 +238,6 @@ Audigy.pcm.iec958.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
									value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				interface PCM
 | 
									interface PCM
 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
									name "EMU10K1 PCM Send Routing"
 | 
				
			||||||
| 
						 | 
					@ -303,14 +246,6 @@ Audigy.pcm.iec958.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 20 21 0 0 0 0 0 0  20 21 0 0 0 0 0 0   20 21 0 0 0 0 0 0 ]
 | 
									value [ 20 21 0 0 0 0 0 0  20 21 0 0 0 0 0 0   20 21 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 20 21 0 0 0 0 0 0  20 21 0 0 0 0 0 0   20 21 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				name "Audigy Analog/Digital Output Jack"
 | 
									name "Audigy Analog/Digital Output Jack"
 | 
				
			||||||
				lock true
 | 
									lock true
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,14 +26,6 @@ Audigy2.pcm.front.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
									value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				interface PCM
 | 
									interface PCM
 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
									name "EMU10K1 PCM Send Routing"
 | 
				
			||||||
| 
						 | 
					@ -42,14 +34,6 @@ Audigy2.pcm.front.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0 ]
 | 
									value [ 8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0  8 9 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -79,14 +63,6 @@ Audigy2.pcm.rear.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 0 0 255 255 0 0 0 0  0 0 255 0 0 0 0 0  0 0 0 255 0 0 0 0 ]
 | 
									value [ 0 0 255 255 0 0 0 0  0 0 255 0 0 0 0 0  0 0 0 255 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 0 0 255 255 0 0 0 0  0 0 255 0 0 0 0 0  0 0 0 255 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}	
 | 
					}	
 | 
				
			||||||
| 
						 | 
					@ -115,14 +91,6 @@ Audigy2.pcm.center_lfe.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
									value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				interface PCM
 | 
									interface PCM
 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
									name "EMU10K1 PCM Send Routing"
 | 
				
			||||||
| 
						 | 
					@ -131,14 +99,6 @@ Audigy2.pcm.center_lfe.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0 ]
 | 
									value [ 6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0  6 7 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -167,14 +127,6 @@ Audigy2.pcm.side.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
									value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				interface PCM
 | 
									interface PCM
 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
									name "EMU10K1 PCM Send Routing"
 | 
				
			||||||
| 
						 | 
					@ -183,14 +135,6 @@ Audigy2.pcm.side.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 14 15 0 0 0 0 0 0  14 15 0 0 0 0 0 0  14 15 0 0 0 0 0 0 ]
 | 
									value [ 14 15 0 0 0 0 0 0  14 15 0 0 0 0 0 0  14 15 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 14 15 0 0 0 0 0 0  14 15 0 0 0 0 0 0  14 15 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -374,13 +318,6 @@ Audigy2.pcm.iec958.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ $AES0 $AES1 $AES2 $AES3 ]
 | 
									value [ $AES0 $AES1 $AES2 $AES3 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "IEC958 Playback Default"
 | 
					 | 
				
			||||||
				preserve true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ $AES0 $AES1 $AES2 $AES3 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				name "IEC958 Optical Raw Playback Switch"
 | 
									name "IEC958 Optical Raw Playback Switch"
 | 
				
			||||||
				lock true
 | 
									lock true
 | 
				
			||||||
| 
						 | 
					@ -395,14 +332,6 @@ Audigy2.pcm.iec958.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
									value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 255 255 0 0 0 0 0 0  255 0 0 0 0 0 0 0  0 255 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				interface PCM
 | 
									interface PCM
 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
									name "EMU10K1 PCM Send Routing"
 | 
				
			||||||
| 
						 | 
					@ -411,14 +340,6 @@ Audigy2.pcm.iec958.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ 20 21 0 0 0 0 0 0  20 21 0 0 0 0 0 0   20 21 0 0 0 0 0 0 ]
 | 
									value [ 20 21 0 0 0 0 0 0  20 21 0 0 0 0 0 0   20 21 0 0 0 0 0 0 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "EMU10K1 PCM Send Routing"
 | 
					 | 
				
			||||||
				index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ 20 21 0 0 0 0 0 0  20 21 0 0 0 0 0 0   20 21 0 0 0 0 0 0 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				name "Audigy Analog/Digital Output Jack"
 | 
									name "Audigy Analog/Digital Output Jack"
 | 
				
			||||||
				lock true
 | 
									lock true
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,14 +28,6 @@ EMU10K1.pcm.front.0 {
 | 
				
			||||||
					optional true
 | 
										optional true
 | 
				
			||||||
					value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
 | 
										value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
					# for compatibility with older drivers
 | 
					 | 
				
			||||||
					name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
					index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
					# lock true
 | 
					 | 
				
			||||||
					optional true
 | 
					 | 
				
			||||||
					value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					interface PCM
 | 
										interface PCM
 | 
				
			||||||
					name "EMU10K1 PCM Send Routing"
 | 
										name "EMU10K1 PCM Send Routing"
 | 
				
			||||||
| 
						 | 
					@ -44,14 +36,6 @@ EMU10K1.pcm.front.0 {
 | 
				
			||||||
					optional true
 | 
										optional true
 | 
				
			||||||
					value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
 | 
										value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
					# for compatibility with older drivers
 | 
					 | 
				
			||||||
					name "EMU10K1 PCM Send Routing"
 | 
					 | 
				
			||||||
					index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
					# lock true
 | 
					 | 
				
			||||||
					optional true
 | 
					 | 
				
			||||||
					value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			]
 | 
								]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -87,14 +71,6 @@ EMU10K1.pcm.rear.0 {
 | 
				
			||||||
					optional true
 | 
										optional true
 | 
				
			||||||
					value [ 0 0 255 255 0 0 255 0 0 0 0 255 ]
 | 
										value [ 0 0 255 255 0 0 255 0 0 0 0 255 ]
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
					# for compatibility with older drivers
 | 
					 | 
				
			||||||
					name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
					index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
					# lock true
 | 
					 | 
				
			||||||
					optional true
 | 
					 | 
				
			||||||
					value [ 0 0 255 255 0 0 255 0 0 0 0 255 ]
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			]
 | 
								]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -152,14 +128,6 @@ EMU10K1.pcm.center_lfe.0 {
 | 
				
			||||||
					optional true
 | 
										optional true
 | 
				
			||||||
					value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
 | 
										value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
					# for compatibility with older drivers
 | 
					 | 
				
			||||||
					name "EMU10K1 PCM Send Volume"
 | 
					 | 
				
			||||||
					index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
					# lock true
 | 
					 | 
				
			||||||
					optional true
 | 
					 | 
				
			||||||
					value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					interface PCM
 | 
										interface PCM
 | 
				
			||||||
					name "EMU10K1 PCM Send Routing"
 | 
										name "EMU10K1 PCM Send Routing"
 | 
				
			||||||
| 
						 | 
					@ -168,14 +136,6 @@ EMU10K1.pcm.center_lfe.0 {
 | 
				
			||||||
					optional true
 | 
										optional true
 | 
				
			||||||
					value [ 6 7 0 0 6 7 0 0 6 7 0 0 ]
 | 
										value [ 6 7 0 0 6 7 0 0 6 7 0 0 ]
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
					# for compatibility with older drivers
 | 
					 | 
				
			||||||
					name "EMU10K1 PCM Send Routing"
 | 
					 | 
				
			||||||
					index { @func private_pcm_subdevice }
 | 
					 | 
				
			||||||
					# lock true
 | 
					 | 
				
			||||||
					optional true
 | 
					 | 
				
			||||||
					value [ 6 7 0 0 6 7 0 0 6 7 0 0 ]
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			]
 | 
								]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -304,14 +264,6 @@ EMU10K1.pcm.iec958.0 {
 | 
				
			||||||
				optional true
 | 
									optional true
 | 
				
			||||||
				value [ $AES0 $AES1 $AES2 $AES3 ]
 | 
									value [ $AES0 $AES1 $AES2 $AES3 ]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				# for compatibility with older drivers
 | 
					 | 
				
			||||||
				name "IEC958 Playback Default"
 | 
					 | 
				
			||||||
				lock true
 | 
					 | 
				
			||||||
				preserve true
 | 
					 | 
				
			||||||
				optional true
 | 
					 | 
				
			||||||
				value [ $AES0 $AES1 $AES2 $AES3 ]
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				name "IEC958 Optical Raw Playback Switch"
 | 
									name "IEC958 Optical Raw Playback Switch"
 | 
				
			||||||
				lock true
 | 
									lock true
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -163,8 +163,6 @@ HDA-Intel.pcm.iec958.0 {
 | 
				
			||||||
	hint.device 1
 | 
						hint.device 1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<confdir:pcm/hdmi.conf>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
HDA-Intel.pcm.hdmi.common {
 | 
					HDA-Intel.pcm.hdmi.common {
 | 
				
			||||||
	@args [ CARD DEVICE CTLINDEX AES0 AES1 AES2 AES3 ]
 | 
						@args [ CARD DEVICE CTLINDEX AES0 AES1 AES2 AES3 ]
 | 
				
			||||||
	@args.CARD {
 | 
						@args.CARD {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,8 +2,6 @@
 | 
				
			||||||
# Configuration for the Intel HDMI/DP LPE audio
 | 
					# Configuration for the Intel HDMI/DP LPE audio
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<confdir:pcm/hdmi.conf>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
HdmiLpeAudio.pcm.hdmi.0 {
 | 
					HdmiLpeAudio.pcm.hdmi.0 {
 | 
				
			||||||
	@args [ CARD AES0 AES1 AES2 AES3 ]
 | 
						@args [ CARD AES0 AES1 AES2 AES3 ]
 | 
				
			||||||
	@args.CARD {
 | 
						@args.CARD {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -60,22 +60,6 @@ cfg_files = aliases.conf \
 | 
				
			||||||
	VXPocket.conf \
 | 
						VXPocket.conf \
 | 
				
			||||||
	VXPocket440.conf
 | 
						VXPocket440.conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if BUILD_ALISP
 | 
					 | 
				
			||||||
cfg_files += aliases.alisp
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
alsa_DATA = $(cfg_files)
 | 
					alsa_DATA = $(cfg_files)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if BUILD_ALISP
 | 
					EXTRA_DIST = $(cfg_files)
 | 
				
			||||||
SI7018dir = $(alsaconfigdir)/cards/SI7018
 | 
					 | 
				
			||||||
SI7018_files = \
 | 
					 | 
				
			||||||
	SI7018/sndoc-mixer.alisp \
 | 
					 | 
				
			||||||
	SI7018/sndop-mixer.alisp
 | 
					 | 
				
			||||||
SI7018_DATA = $(SI7018_files)
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
SI7018_files=
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
EXTRA_DIST = \
 | 
					 | 
				
			||||||
	$(cfg_files) \
 | 
					 | 
				
			||||||
	$(SI7018_files)
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +0,0 @@
 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; SiS SI7018 mixer abstract layer
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; Copyright (c) 2003 Jaroslav Kysela <perex@perex.cz>
 | 
					 | 
				
			||||||
; License: GPL v2 (http://www.gnu.org/licenses/gpl.html)
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndoc_mixer_open (hctl pcm)
 | 
					 | 
				
			||||||
  (princ "sndoc_mixer_open: hctl=" hctl " pcm=" pcm "\n")
 | 
					 | 
				
			||||||
  0
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,11 +0,0 @@
 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; SiS SI7018 mixer abstract layer
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; Copyright (c) 2003 Jaroslav Kysela <perex@perex.cz>
 | 
					 | 
				
			||||||
; License: GPL v2 (http://www.gnu.org/licenses/gpl.html)
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndop_mixer_open (hctl pcm)
 | 
					 | 
				
			||||||
  (princ "sndop_mixer_open: hctl=" hctl " pcm=" pcm "\n")
 | 
					 | 
				
			||||||
  0
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
| 
						 | 
					@ -27,6 +27,7 @@ USB-Audio.pcm.use_dmix {
 | 
				
			||||||
USB-Audio.pcm.surround40_type {
 | 
					USB-Audio.pcm.surround40_type {
 | 
				
			||||||
	"AudioPhile" two_stereo_devices
 | 
						"AudioPhile" two_stereo_devices
 | 
				
			||||||
	"Audiophile USB (tm)" two_stereo_devices
 | 
						"Audiophile USB (tm)" two_stereo_devices
 | 
				
			||||||
 | 
						"ICUSBAUDIO7D" six_channels
 | 
				
			||||||
	"OmniStudio" two_stereo_devices
 | 
						"OmniStudio" two_stereo_devices
 | 
				
			||||||
	"Quattro" two_stereo_devices
 | 
						"Quattro" two_stereo_devices
 | 
				
			||||||
	"SB Audigy 2 NX" six_channels
 | 
						"SB Audigy 2 NX" six_channels
 | 
				
			||||||
| 
						 | 
					@ -52,6 +53,7 @@ USB-Audio.pcm.iec958_device {
 | 
				
			||||||
	"Blue Snowball" 999
 | 
						"Blue Snowball" 999
 | 
				
			||||||
	"C-Media USB Headphone Set" 999
 | 
						"C-Media USB Headphone Set" 999
 | 
				
			||||||
	"Cmedia Audio" 999
 | 
						"Cmedia Audio" 999
 | 
				
			||||||
 | 
						"Corsair HS60 PRO Surround USB S" 999
 | 
				
			||||||
	"DELL PROFESSIONAL SOUND BAR AE5" 999
 | 
						"DELL PROFESSIONAL SOUND BAR AE5" 999
 | 
				
			||||||
	"HP Digital Stereo Headset" 999
 | 
						"HP Digital Stereo Headset" 999
 | 
				
			||||||
	"GN 9330" 999
 | 
						"GN 9330" 999
 | 
				
			||||||
| 
						 | 
					@ -65,8 +67,11 @@ USB-Audio.pcm.iec958_device {
 | 
				
			||||||
	"Plantronics USB Headset" 999
 | 
						"Plantronics USB Headset" 999
 | 
				
			||||||
	"Plantronics Wireless Audio" 999
 | 
						"Plantronics Wireless Audio" 999
 | 
				
			||||||
	"SB WoW Headset" 999
 | 
						"SB WoW Headset" 999
 | 
				
			||||||
 | 
						"Scarlett 2i2 4th Gen" 999
 | 
				
			||||||
	"Scarlett 2i2 USB" 999
 | 
						"Scarlett 2i2 USB" 999
 | 
				
			||||||
	"Scarlett 2i4 USB" 999
 | 
						"Scarlett 2i4 USB" 999
 | 
				
			||||||
 | 
						"Scarlett Solo 4th Gen" 999
 | 
				
			||||||
 | 
						"Scarlett Solo USB" 999
 | 
				
			||||||
	"Sennheiser USB headset" 999
 | 
						"Sennheiser USB headset" 999
 | 
				
			||||||
	"SWTOR Gaming Headset by Razer" 999
 | 
						"SWTOR Gaming Headset by Razer" 999
 | 
				
			||||||
	"ThinkStation P620 Main" 999
 | 
						"ThinkStation P620 Main" 999
 | 
				
			||||||
| 
						 | 
					@ -77,6 +82,7 @@ USB-Audio.pcm.iec958_device {
 | 
				
			||||||
	"USB Device 0x46d_0x992" 999
 | 
						"USB Device 0x46d_0x992" 999
 | 
				
			||||||
	"WD15 Dock" 999
 | 
						"WD15 Dock" 999
 | 
				
			||||||
	"WD19 Dock" 999
 | 
						"WD19 Dock" 999
 | 
				
			||||||
 | 
						"ThinkPad USB-C Dock Gen2 USB Au" 999
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Second iec958 device number, if any.
 | 
					# Second iec958 device number, if any.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,29 +0,0 @@
 | 
				
			||||||
(setq snd_card_aliases_array
 | 
					 | 
				
			||||||
  (
 | 
					 | 
				
			||||||
    ("YMF724" 		. "YMF744")
 | 
					 | 
				
			||||||
    ("YMF724F"		. "YMF744")
 | 
					 | 
				
			||||||
    ("YMF740"		. "YMF744")
 | 
					 | 
				
			||||||
    ("YMF740C"		. "YMF744")
 | 
					 | 
				
			||||||
    ("YMF754"		. "YMF744")
 | 
					 | 
				
			||||||
    ("CMIPCI"		. "CMI8338")
 | 
					 | 
				
			||||||
    ("CMI8738"		. "CMI8338")
 | 
					 | 
				
			||||||
    ("CMI8738-MC4"	. "CMI8738-MC6")
 | 
					 | 
				
			||||||
    ("E-mu APS"		. "EMU10K1")
 | 
					 | 
				
			||||||
    ("GUS Max"		. "GUS")
 | 
					 | 
				
			||||||
    ("GUS ACE" 		. "GUS")
 | 
					 | 
				
			||||||
    ("GUS Extreme"	. "GUS")
 | 
					 | 
				
			||||||
    ("AMD InterWave"	. "GUS")
 | 
					 | 
				
			||||||
    ("Dynasonic 3-D"	. "GUS")
 | 
					 | 
				
			||||||
    ("InterWave STB"	. "GUS")
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun snd_card_alias (cardname)
 | 
					 | 
				
			||||||
  (setq r (assq cardname snd_card_aliases_array))
 | 
					 | 
				
			||||||
  (setq r (if (null r) cardname r))
 | 
					 | 
				
			||||||
  (unsetq r)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun snd_card_alias_unset ()
 | 
					 | 
				
			||||||
  (unsetq snd_card_aliases_array snd_card_alias)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
| 
						 | 
					@ -57,8 +57,10 @@ CMI8786 cards.CMI8788
 | 
				
			||||||
CMI8787 cards.CMI8788
 | 
					CMI8787 cards.CMI8788
 | 
				
			||||||
pistachio cards.pistachio-card
 | 
					pistachio cards.pistachio-card
 | 
				
			||||||
VC4-HDMI cards.vc4-hdmi
 | 
					VC4-HDMI cards.vc4-hdmi
 | 
				
			||||||
 | 
					hda-acpi cards.HDA-Intel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<confdir:ctl/default.conf>
 | 
					<confdir:ctl/default.conf>
 | 
				
			||||||
<confdir:pcm/default.conf>
 | 
					<confdir:pcm/default.conf>
 | 
				
			||||||
<confdir:pcm/dmix.conf>
 | 
					<confdir:pcm/dmix.conf>
 | 
				
			||||||
<confdir:pcm/dsnoop.conf>
 | 
					<confdir:pcm/dsnoop.conf>
 | 
				
			||||||
 | 
					<confdir:pcm/hdmi.conf>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,8 +3,6 @@
 | 
				
			||||||
# subframe conversion
 | 
					# subframe conversion
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<confdir:pcm/hdmi.conf>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
vc4-hdmi.pcm.hdmi.0 {
 | 
					vc4-hdmi.pcm.hdmi.0 {
 | 
				
			||||||
	@args [ CARD AES0 AES1 AES2 AES3 ]
 | 
						@args [ CARD AES0 AES1 AES2 AES3 ]
 | 
				
			||||||
	@args.CARD {
 | 
						@args.CARD {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,115 +0,0 @@
 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; Toplevel configuration for the ALSA Ordinary Mixer Interface
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
; Copyright (c) 2003 Jaroslav Kysela <perex@perex.cz>
 | 
					 | 
				
			||||||
; License: GPL v2 (http://www.gnu.org/licenses/gpl.html)
 | 
					 | 
				
			||||||
;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_include (hctl stream)
 | 
					 | 
				
			||||||
  (setq info (Acall "ctl_card_info" (Acall "hctl_ctl" hctl)))
 | 
					 | 
				
			||||||
  (if (= (Aerror info) 0)
 | 
					 | 
				
			||||||
    (progn
 | 
					 | 
				
			||||||
      (setq info (Aresult info))
 | 
					 | 
				
			||||||
      (setq driver (cdr (assq "driver" (unsetq info))))
 | 
					 | 
				
			||||||
      (setq file (concat (path "data") "/alsa/cards/" (snd_card_alias driver) "/sndo" stream "-mixer.alisp"))
 | 
					 | 
				
			||||||
      (setq r (include file))
 | 
					 | 
				
			||||||
      (when (= r -2) (Asyserr "unable to find file " file))
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
    (setq r (Aerror info))
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
  (unsetq info driver file r)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_mixer_open_fcn (hctl stream pcm)
 | 
					 | 
				
			||||||
  (setq fcn (concat "sndo" stream "_mixer_open"))
 | 
					 | 
				
			||||||
  (setq r (if (exfun fcn) (funcall fcn hctl pcm) 0))
 | 
					 | 
				
			||||||
  (when (= r 0)
 | 
					 | 
				
			||||||
    (setq hctls (if hctls (cons hctls (cons hctl)) hctl))
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
  (unsetq fcn r)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_mixer_open_hctl (name stream pcm)
 | 
					 | 
				
			||||||
  (setq hctl (Acall "hctl_open" name nil))
 | 
					 | 
				
			||||||
  (setq r (Aerror hctl))
 | 
					 | 
				
			||||||
  (when (= r 0)
 | 
					 | 
				
			||||||
    (setq hctl (Aresult hctl))
 | 
					 | 
				
			||||||
    (setq r (sndo_include hctl stream))
 | 
					 | 
				
			||||||
    (if (= r 0)
 | 
					 | 
				
			||||||
       (setq r (sndo_mixer_open_fcn hctl stream pcm))
 | 
					 | 
				
			||||||
       (Acall "hctl_close" hctl)
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
  (unsetq hctl r)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_mixer_open_virtual (name stream pcm)
 | 
					 | 
				
			||||||
  (setq file (concat (path "data") "/alsa/virtual/" name "/sndo" stream "-mixer.alisp"))
 | 
					 | 
				
			||||||
  (setq r (include file))
 | 
					 | 
				
			||||||
  (when (= r -2) (Asyserr "unable to find file " file))
 | 
					 | 
				
			||||||
  (when (= r 0) (setq r (sndo_mixer_open_fcn nil stream pcm)))
 | 
					 | 
				
			||||||
  (unsetq file r)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_mixer_open1 (name stream)
 | 
					 | 
				
			||||||
  (if (compare-strings name 0 2 "hw:" 0 2)
 | 
					 | 
				
			||||||
    (sndo_mixer_open_hctl name stream nil)
 | 
					 | 
				
			||||||
    (sndo_mixer_open_virtual name stream nil)
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_mixer_open (pname cname)
 | 
					 | 
				
			||||||
  (setq r (sndo_mixer_open1 pname "p"))
 | 
					 | 
				
			||||||
  (when (= r 0) (setq r (sndo_mixer_open1 cname "c")))
 | 
					 | 
				
			||||||
  (when (!= r 0) (sndo_mixer_close))
 | 
					 | 
				
			||||||
  (unsetq sndo_mixer_open
 | 
					 | 
				
			||||||
	  sndo_mixer_open_pcm sndo_mixer_open_pcm1
 | 
					 | 
				
			||||||
          sndo_mixer_open_virtual sndo_mixer_open_fcn
 | 
					 | 
				
			||||||
	  sndo_include r)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_mixer_open_pcm1 (pcm stream)
 | 
					 | 
				
			||||||
  (setq info (Acall "pcm_info" pcm))
 | 
					 | 
				
			||||||
  (setq r (Aerror info))
 | 
					 | 
				
			||||||
  (when (= r 0)
 | 
					 | 
				
			||||||
    (setq info (Aresult info))
 | 
					 | 
				
			||||||
    (setq card (cdr (assq "card" info)))
 | 
					 | 
				
			||||||
    (setq r
 | 
					 | 
				
			||||||
      (if (< card 0)
 | 
					 | 
				
			||||||
	(sndo_mixer_open_virtual (Acall "pcm_name" pcm) stream pcm)
 | 
					 | 
				
			||||||
        (sndo_mixer_open_hctl (format "hw:%i" card) stream pcm)
 | 
					 | 
				
			||||||
      )
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
  (unsetq info card r)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_mixer_open_pcm (ppcm cpcm)
 | 
					 | 
				
			||||||
  (setq r (sndo_mixer_open_pcm1 ppcm "p"))
 | 
					 | 
				
			||||||
  (when (= r 0) (setq r (sndo_mixer_open_pcm1 cpcm "c")))
 | 
					 | 
				
			||||||
  (when (!= r 0) (sndo_mixer_close))
 | 
					 | 
				
			||||||
  (unsetq sndo_mixer_open
 | 
					 | 
				
			||||||
	  sndo_mixer_open_pcm sndo_mixer_open_pcm1
 | 
					 | 
				
			||||||
          sndo_mixer_open_virtual sndo_mixer_open_fcn
 | 
					 | 
				
			||||||
	  sndo_include r)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_mixer_close1 (hctl stream)
 | 
					 | 
				
			||||||
  (when hctl
 | 
					 | 
				
			||||||
    (progn
 | 
					 | 
				
			||||||
      (setq fcn (concat "sndo" stream "_mixer_close"))
 | 
					 | 
				
			||||||
      (when (exfun fcn) (funcall fcn hctl))
 | 
					 | 
				
			||||||
      (unsetq fcn)
 | 
					 | 
				
			||||||
      (Acall "hctl_close" hctl)
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun sndo_mixer_close nil
 | 
					 | 
				
			||||||
  (sndo_mixer_close1 (nth 1 hctls) "c")
 | 
					 | 
				
			||||||
  (sndo_mixer_close1 (nth 0 hctls) "p")
 | 
					 | 
				
			||||||
  (snd_card_alias_unset)
 | 
					 | 
				
			||||||
  (unsetq hctls)
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(include (concat (path "data") "/alsa/cards/aliases.alisp"))
 | 
					 | 
				
			||||||
| 
						 | 
					@ -31,14 +31,16 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "local.h"
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <ctype.h>
 | 
					#include <ctype.h>
 | 
				
			||||||
#include <limits.h>
 | 
					#include <limits.h>
 | 
				
			||||||
#include "local.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
typedef long long value_type_t;
 | 
					typedef long long value_type_t;
 | 
				
			||||||
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const char *_find_end_of_expression(const char *s, char begin, char end)
 | 
					static const char *_find_end_of_expression(const char *s, char begin, char end)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -119,6 +121,7 @@ static int _to_integer(value_type_t *val, snd_config_t *c)
 | 
				
			||||||
	return err;
 | 
						return err;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
int _snd_eval_string(snd_config_t **dst, const char *s,
 | 
					int _snd_eval_string(snd_config_t **dst, const char *s,
 | 
				
			||||||
		     snd_config_expand_fcn_t fcn, void *private_data)
 | 
							     snd_config_expand_fcn_t fcn, void *private_data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -244,6 +247,7 @@ int _snd_eval_string(snd_config_t **dst, const char *s,
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		return snd_config_imake_integer(dst, NULL, left);
 | 
							return snd_config_imake_integer(dst, NULL, left);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Evaluate an math expression in the string
 | 
					 * \brief Evaluate an math expression in the string
 | 
				
			||||||
| 
						 | 
					@ -251,7 +255,7 @@ int _snd_eval_string(snd_config_t **dst, const char *s,
 | 
				
			||||||
 *                 node at the address specified by \a dst.
 | 
					 *                 node at the address specified by \a dst.
 | 
				
			||||||
 * \param[in] s A string to evaluate
 | 
					 * \param[in] s A string to evaluate
 | 
				
			||||||
 * \param[in] fcn A function to get the variable contents
 | 
					 * \param[in] fcn A function to get the variable contents
 | 
				
			||||||
 * \param[in] private_value A private value for the variable contents function
 | 
					 * \param[in] private_data A private value for the variable contents function
 | 
				
			||||||
 * \return 0 if successful, otherwise a negative error code.
 | 
					 * \return 0 if successful, otherwise a negative error code.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
int snd_config_evaluate_string(snd_config_t **dst, const char *s,
 | 
					int snd_config_evaluate_string(snd_config_t **dst, const char *s,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -74,12 +74,12 @@
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "local.h"
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <ctype.h>
 | 
					#include <ctype.h>
 | 
				
			||||||
#include <limits.h>
 | 
					#include <limits.h>
 | 
				
			||||||
#include "local.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Gets the boolean value from the given ASCII string.
 | 
					 * \brief Gets the boolean value from the given ASCII string.
 | 
				
			||||||
| 
						 | 
					@ -645,7 +645,7 @@ static int string_from_integer(char **dst, long v)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int _snd_func_private_data(snd_config_t **dst, snd_config_t *src,
 | 
					static int _snd_func_private_data(snd_config_t **dst, snd_config_t *src,
 | 
				
			||||||
			   snd_config_t **private_data, const char *id)
 | 
								   snd_config_t **private_data, const char *id)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
| 
						 | 
					@ -1031,6 +1031,14 @@ int snd_func_card_name(snd_config_t **dst, snd_config_t *root,
 | 
				
			||||||
SND_DLSYM_BUILD_VERSION(snd_func_card_name, SND_CONFIG_DLSYM_VERSION_EVALUATE);
 | 
					SND_DLSYM_BUILD_VERSION(snd_func_card_name, SND_CONFIG_DLSYM_VERSION_EVALUATE);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef DOXYGEN
 | 
				
			||||||
 | 
					/* For consistency with the PCM Interface module, include documentation even
 | 
				
			||||||
 | 
					 * when PCM module is not included in the build. */ 
 | 
				
			||||||
 | 
					#ifndef BUILD_PCM
 | 
				
			||||||
 | 
					#define BUILD_PCM
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#endif /* DOXYGEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef BUILD_PCM
 | 
					#ifdef BUILD_PCM
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,7 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "control_local.h"
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
| 
						 | 
					@ -32,7 +33,6 @@
 | 
				
			||||||
#include <ctype.h>
 | 
					#include <ctype.h>
 | 
				
			||||||
#include <fcntl.h>
 | 
					#include <fcntl.h>
 | 
				
			||||||
#include <sys/ioctl.h>
 | 
					#include <sys/ioctl.h>
 | 
				
			||||||
#include "control_local.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
#define SND_FILE_CONTROL	ALSA_DEVICE_DIRECTORY "controlC%i"
 | 
					#define SND_FILE_CONTROL	ALSA_DEVICE_DIRECTORY "controlC%i"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -185,6 +185,7 @@ in-kernel implementations utilize this feature for I/O operations. This is
 | 
				
			||||||
against the original design.
 | 
					against the original design.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "control_local.h"
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
| 
						 | 
					@ -196,7 +197,6 @@ against the original design.
 | 
				
			||||||
#include <poll.h>
 | 
					#include <poll.h>
 | 
				
			||||||
#include <stdbool.h>
 | 
					#include <stdbool.h>
 | 
				
			||||||
#include <limits.h>
 | 
					#include <limits.h>
 | 
				
			||||||
#include "control_local.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief get identifier of CTL handle
 | 
					 * \brief get identifier of CTL handle
 | 
				
			||||||
| 
						 | 
					@ -265,13 +265,14 @@ int snd_ctl_nonblock(snd_ctl_t *ctl, int nonblock)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name)
 | 
					int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name, int mode)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	snd_ctl_t *ctl;
 | 
						snd_ctl_t *ctl;
 | 
				
			||||||
	ctl = calloc(1, sizeof(*ctl));
 | 
						ctl = calloc(1, sizeof(*ctl));
 | 
				
			||||||
	if (!ctl)
 | 
						if (!ctl)
 | 
				
			||||||
		return -ENOMEM;
 | 
							return -ENOMEM;
 | 
				
			||||||
	ctl->type = type;
 | 
						ctl->type = type;
 | 
				
			||||||
 | 
						ctl->mode = mode;
 | 
				
			||||||
	if (name)
 | 
						if (name)
 | 
				
			||||||
		ctl->name = strdup(name);
 | 
							ctl->name = strdup(name);
 | 
				
			||||||
	INIT_LIST_HEAD(&ctl->async_handlers);
 | 
						INIT_LIST_HEAD(&ctl->async_handlers);
 | 
				
			||||||
| 
						 | 
					@ -427,6 +428,7 @@ int snd_ctl_elem_info(snd_ctl_t *ctl, snd_ctl_elem_info_t *info)
 | 
				
			||||||
	return ctl->ops->element_info(ctl, info);
 | 
						return ctl->ops->element_info(ctl, info);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
#if 0 /* deprecated */
 | 
					#if 0 /* deprecated */
 | 
				
			||||||
static bool validate_element_member_dimension(snd_ctl_elem_info_t *info)
 | 
					static bool validate_element_member_dimension(snd_ctl_elem_info_t *info)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -502,6 +504,8 @@ int __snd_ctl_add_elem_set(snd_ctl_t *ctl, snd_ctl_elem_info_t *info,
 | 
				
			||||||
	return ctl->ops->element_add(ctl, info);
 | 
						return ctl->ops->element_add(ctl, info);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif /* DOC_HIDDEN */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Create and add some user-defined control elements of integer type.
 | 
					 * \brief Create and add some user-defined control elements of integer type.
 | 
				
			||||||
 * \param ctl A handle of backend module for control interface.
 | 
					 * \param ctl A handle of backend module for control interface.
 | 
				
			||||||
| 
						 | 
					@ -1266,6 +1270,49 @@ int snd_ctl_rawmidi_prefer_subdevice(snd_ctl_t *ctl, int subdev)
 | 
				
			||||||
	return ctl->ops->rawmidi_prefer_subdevice(ctl, subdev);
 | 
						return ctl->ops->rawmidi_prefer_subdevice(ctl, subdev);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * \brief Get next UMP device number
 | 
				
			||||||
 | 
					 * \param ctl CTL handle
 | 
				
			||||||
 | 
					 * \param device current device on entry and next device on return
 | 
				
			||||||
 | 
					 * \return 0 on success otherwise a negative error code
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					int snd_ctl_ump_next_device(snd_ctl_t *ctl, int *device)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						assert(ctl && device);
 | 
				
			||||||
 | 
						if (ctl->ops->ump_next_device)
 | 
				
			||||||
 | 
							return ctl->ops->ump_next_device(ctl, device);
 | 
				
			||||||
 | 
						return -ENXIO;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * \brief Get UMP Endpoint info about a UMP RawMidi device
 | 
				
			||||||
 | 
					 * \param ctl CTL handle
 | 
				
			||||||
 | 
					 * \param info UMP Endpoint info pointer
 | 
				
			||||||
 | 
					 * \return 0 on success otherwise a negative error code
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t *info)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						assert(ctl && info);
 | 
				
			||||||
 | 
						fprintf(stderr, "%s:%d\n", __func__, __LINE__);
 | 
				
			||||||
 | 
						if (ctl->ops->ump_endpoint_info)
 | 
				
			||||||
 | 
							return ctl->ops->ump_endpoint_info(ctl, info);
 | 
				
			||||||
 | 
						return -ENXIO;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * \brief Get UMP Block info about a UMP RawMidi device
 | 
				
			||||||
 | 
					 * \param ctl CTL handle
 | 
				
			||||||
 | 
					 * \param info UMP Block info pointer
 | 
				
			||||||
 | 
					 * \return 0 on success otherwise a negative error code
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						assert(ctl && info);
 | 
				
			||||||
 | 
						if (ctl->ops->ump_block_info)
 | 
				
			||||||
 | 
							return ctl->ops->ump_block_info(ctl, info);
 | 
				
			||||||
 | 
						return -ENXIO;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \brief Set Power State to given SND_CTL_POWER_* value and do the power management
 | 
					 * \brief Set Power State to given SND_CTL_POWER_* value and do the power management
 | 
				
			||||||
 * \param ctl CTL handle
 | 
					 * \param ctl CTL handle
 | 
				
			||||||
| 
						 | 
					@ -1320,7 +1367,7 @@ int snd_ctl_wait(snd_ctl_t *ctl, int timeout)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	npfds = snd_ctl_poll_descriptors_count(ctl);
 | 
						npfds = snd_ctl_poll_descriptors_count(ctl);
 | 
				
			||||||
	if (npfds <= 0 || npfds >= 16) {
 | 
						if (npfds <= 0 || npfds >= 16) {
 | 
				
			||||||
		SNDERR("Invalid poll_fds %d\n", npfds);
 | 
							SNDERR("Invalid poll_fds %d", npfds);
 | 
				
			||||||
		return -EIO;
 | 
							return -EIO;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	pfd = alloca(sizeof(*pfd) * npfds);
 | 
						pfd = alloca(sizeof(*pfd) * npfds);
 | 
				
			||||||
| 
						 | 
					@ -1328,7 +1375,7 @@ int snd_ctl_wait(snd_ctl_t *ctl, int timeout)
 | 
				
			||||||
	if (err < 0)
 | 
						if (err < 0)
 | 
				
			||||||
		return err;
 | 
							return err;
 | 
				
			||||||
	if (err != npfds) {
 | 
						if (err != npfds) {
 | 
				
			||||||
		SNDMSG("invalid poll descriptors %d\n", err);
 | 
							SNDMSG("invalid poll descriptors %d", err);
 | 
				
			||||||
		return -EIO;
 | 
							return -EIO;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	for (;;) {
 | 
						for (;;) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,12 +27,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "control_local.h"
 | 
				
			||||||
 | 
					#include "control_external.h"
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include "control_local.h"
 | 
					 | 
				
			||||||
#include "control_external.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef PIC
 | 
					#ifndef PIC
 | 
				
			||||||
/* entry for static linking */
 | 
					/* entry for static linking */
 | 
				
			||||||
| 
						 | 
					@ -622,7 +622,7 @@ The rest fields are filled by #snd_ctl_ext_create().  The handle field
 | 
				
			||||||
is the resultant PCM handle.  The others are the current status of the
 | 
					is the resultant PCM handle.  The others are the current status of the
 | 
				
			||||||
PCM.
 | 
					PCM.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
\section ctl_ext_impl Callback Functions of External Control Plugins
 | 
					\section ctl_ext_impl_cb Callback Functions of External Control Plugins
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The callback functions in #snd_ctl_ext_callback_t define the real
 | 
					The callback functions in #snd_ctl_ext_callback_t define the real
 | 
				
			||||||
behavior of the driver.  There are many callbacks but many of them are optional. 
 | 
					behavior of the driver.  There are many callbacks but many of them are optional. 
 | 
				
			||||||
| 
						 | 
					@ -712,11 +712,11 @@ int snd_ctl_ext_create(snd_ctl_ext_t *ext, const char *name, int mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (ext->version < SNDRV_PROTOCOL_VERSION(1, 0, 0) ||
 | 
						if (ext->version < SNDRV_PROTOCOL_VERSION(1, 0, 0) ||
 | 
				
			||||||
	    ext->version > SND_CTL_EXT_VERSION) {
 | 
						    ext->version > SND_CTL_EXT_VERSION) {
 | 
				
			||||||
		SNDERR("ctl_ext: Plugin version mismatch\n");
 | 
							SNDERR("ctl_ext: Plugin version mismatch");
 | 
				
			||||||
		return -ENXIO;
 | 
							return -ENXIO;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = snd_ctl_new(&ctl, SND_CTL_TYPE_EXT, name);
 | 
						err = snd_ctl_new(&ctl, SND_CTL_TYPE_EXT, name, mode);
 | 
				
			||||||
	if (err < 0)
 | 
						if (err < 0)
 | 
				
			||||||
		return err;
 | 
							return err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,6 +26,7 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "control_local.h"
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
| 
						 | 
					@ -33,18 +34,18 @@
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <fcntl.h>
 | 
					#include <fcntl.h>
 | 
				
			||||||
#include <sys/ioctl.h>
 | 
					#include <sys/ioctl.h>
 | 
				
			||||||
#include "control_local.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef PIC
 | 
					#ifndef PIC
 | 
				
			||||||
/* entry for static linking */
 | 
					/* entry for static linking */
 | 
				
			||||||
const char *_snd_module_control_hw = "";
 | 
					const char *_snd_module_control_hw = "";
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef F_SETSIG
 | 
					#ifndef F_SETSIG
 | 
				
			||||||
#define F_SETSIG 10
 | 
					#define F_SETSIG 10
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					 | 
				
			||||||
#define SNDRV_FILE_CONTROL	ALSA_DEVICE_DIRECTORY "controlC%i"
 | 
					#define SNDRV_FILE_CONTROL	ALSA_DEVICE_DIRECTORY "controlC%i"
 | 
				
			||||||
#define SNDRV_CTL_VERSION_MAX	SNDRV_PROTOCOL_VERSION(2, 0, 4)
 | 
					#define SNDRV_CTL_VERSION_MAX	SNDRV_PROTOCOL_VERSION(2, 0, 4)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -325,6 +326,32 @@ static int snd_ctl_hw_rawmidi_prefer_subdevice(snd_ctl_t *handle, int subdev)
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int snd_ctl_hw_ump_next_device(snd_ctl_t *handle, int *device)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						snd_ctl_hw_t *hw = handle->private_data;
 | 
				
			||||||
 | 
						if (ioctl(hw->fd, SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE, device) < 0)
 | 
				
			||||||
 | 
							return -errno;
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int snd_ctl_hw_ump_endpoint_info(snd_ctl_t *handle,
 | 
				
			||||||
 | 
										snd_ump_endpoint_info_t *info)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						snd_ctl_hw_t *hw = handle->private_data;
 | 
				
			||||||
 | 
						if (ioctl(hw->fd, SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO, info) < 0)
 | 
				
			||||||
 | 
							return -errno;
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int snd_ctl_hw_ump_block_info(snd_ctl_t *handle,
 | 
				
			||||||
 | 
									     snd_ump_block_info_t *info)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						snd_ctl_hw_t *hw = handle->private_data;
 | 
				
			||||||
 | 
						if (ioctl(hw->fd, SNDRV_CTL_IOCTL_UMP_BLOCK_INFO, info) < 0)
 | 
				
			||||||
 | 
							return -errno;
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int snd_ctl_hw_set_power_state(snd_ctl_t *handle, unsigned int state)
 | 
					static int snd_ctl_hw_set_power_state(snd_ctl_t *handle, unsigned int state)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	snd_ctl_hw_t *hw = handle->private_data;
 | 
						snd_ctl_hw_t *hw = handle->private_data;
 | 
				
			||||||
| 
						 | 
					@ -348,7 +375,7 @@ static int snd_ctl_hw_read(snd_ctl_t *handle, snd_ctl_event_t *event)
 | 
				
			||||||
	if (res <= 0)
 | 
						if (res <= 0)
 | 
				
			||||||
		return -errno;
 | 
							return -errno;
 | 
				
			||||||
	if (CHECK_SANITY(res != sizeof(*event))) {
 | 
						if (CHECK_SANITY(res != sizeof(*event))) {
 | 
				
			||||||
		SNDMSG("snd_ctl_hw_read: read size error (req:%d, got:%d)\n",
 | 
							SNDMSG("snd_ctl_hw_read: read size error (req:%d, got:%d)",
 | 
				
			||||||
		       sizeof(*event), res);
 | 
							       sizeof(*event), res);
 | 
				
			||||||
		return -EINVAL;
 | 
							return -EINVAL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -379,6 +406,9 @@ static const snd_ctl_ops_t snd_ctl_hw_ops = {
 | 
				
			||||||
	.rawmidi_next_device = snd_ctl_hw_rawmidi_next_device,
 | 
						.rawmidi_next_device = snd_ctl_hw_rawmidi_next_device,
 | 
				
			||||||
	.rawmidi_info = snd_ctl_hw_rawmidi_info,
 | 
						.rawmidi_info = snd_ctl_hw_rawmidi_info,
 | 
				
			||||||
	.rawmidi_prefer_subdevice = snd_ctl_hw_rawmidi_prefer_subdevice,
 | 
						.rawmidi_prefer_subdevice = snd_ctl_hw_rawmidi_prefer_subdevice,
 | 
				
			||||||
 | 
						.ump_next_device = snd_ctl_hw_ump_next_device,
 | 
				
			||||||
 | 
						.ump_endpoint_info = snd_ctl_hw_ump_endpoint_info,
 | 
				
			||||||
 | 
						.ump_block_info = snd_ctl_hw_ump_block_info,
 | 
				
			||||||
	.set_power_state = snd_ctl_hw_set_power_state,
 | 
						.set_power_state = snd_ctl_hw_set_power_state,
 | 
				
			||||||
	.get_power_state = snd_ctl_hw_get_power_state,
 | 
						.get_power_state = snd_ctl_hw_get_power_state,
 | 
				
			||||||
	.read = snd_ctl_hw_read,
 | 
						.read = snd_ctl_hw_read,
 | 
				
			||||||
| 
						 | 
					@ -444,7 +474,7 @@ int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode)
 | 
				
			||||||
	hw->fd = fd;
 | 
						hw->fd = fd;
 | 
				
			||||||
	hw->protocol = ver;
 | 
						hw->protocol = ver;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = snd_ctl_new(&ctl, SND_CTL_TYPE_HW, name);
 | 
						err = snd_ctl_new(&ctl, SND_CTL_TYPE_HW, name, mode);
 | 
				
			||||||
	if (err < 0) {
 | 
						if (err < 0) {
 | 
				
			||||||
		close(fd);
 | 
							close(fd);
 | 
				
			||||||
		free(hw);
 | 
							free(hw);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,6 +47,9 @@ typedef struct _snd_ctl_ops {
 | 
				
			||||||
	int (*rawmidi_next_device)(snd_ctl_t *handle, int *device);
 | 
						int (*rawmidi_next_device)(snd_ctl_t *handle, int *device);
 | 
				
			||||||
	int (*rawmidi_info)(snd_ctl_t *handle, snd_rawmidi_info_t * info);
 | 
						int (*rawmidi_info)(snd_ctl_t *handle, snd_rawmidi_info_t * info);
 | 
				
			||||||
	int (*rawmidi_prefer_subdevice)(snd_ctl_t *handle, int subdev);
 | 
						int (*rawmidi_prefer_subdevice)(snd_ctl_t *handle, int subdev);
 | 
				
			||||||
 | 
						int (*ump_next_device)(snd_ctl_t *handle, int *device);
 | 
				
			||||||
 | 
						int (*ump_endpoint_info)(snd_ctl_t *handle, snd_ump_endpoint_info_t *info);
 | 
				
			||||||
 | 
						int (*ump_block_info)(snd_ctl_t *handle, snd_ump_block_info_t *info);
 | 
				
			||||||
	int (*set_power_state)(snd_ctl_t *handle, unsigned int state);
 | 
						int (*set_power_state)(snd_ctl_t *handle, unsigned int state);
 | 
				
			||||||
	int (*get_power_state)(snd_ctl_t *handle, unsigned int *state);
 | 
						int (*get_power_state)(snd_ctl_t *handle, unsigned int *state);
 | 
				
			||||||
	int (*read)(snd_ctl_t *handle, snd_ctl_event_t *event);
 | 
						int (*read)(snd_ctl_t *handle, snd_ctl_event_t *event);
 | 
				
			||||||
| 
						 | 
					@ -62,6 +65,7 @@ struct _snd_ctl {
 | 
				
			||||||
	snd_ctl_type_t type;
 | 
						snd_ctl_type_t type;
 | 
				
			||||||
	const snd_ctl_ops_t *ops;
 | 
						const snd_ctl_ops_t *ops;
 | 
				
			||||||
	void *private_data;
 | 
						void *private_data;
 | 
				
			||||||
 | 
						int mode;
 | 
				
			||||||
	int nonblock;
 | 
						int nonblock;
 | 
				
			||||||
	int poll_fd;
 | 
						int poll_fd;
 | 
				
			||||||
	struct list_head async_handlers;
 | 
						struct list_head async_handlers;
 | 
				
			||||||
| 
						 | 
					@ -93,7 +97,7 @@ struct _snd_hctl {
 | 
				
			||||||
/* make local functions really local */
 | 
					/* make local functions really local */
 | 
				
			||||||
#define snd_ctl_new	snd1_ctl_new
 | 
					#define snd_ctl_new	snd1_ctl_new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name);
 | 
					int snd_ctl_new(snd_ctl_t **ctlp, snd_ctl_type_t type, const char *name, int mode);
 | 
				
			||||||
int _snd_ctl_poll_descriptor(snd_ctl_t *ctl);
 | 
					int _snd_ctl_poll_descriptor(snd_ctl_t *ctl);
 | 
				
			||||||
#define _snd_ctl_async_descriptor _snd_ctl_poll_descriptor
 | 
					#define _snd_ctl_async_descriptor _snd_ctl_poll_descriptor
 | 
				
			||||||
int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode);
 | 
					int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
					@ -502,7 +502,7 @@ int snd_ctl_shm_open(snd_ctl_t **handlep, const char *name, const char *sockname
 | 
				
			||||||
	shm->socket = sock;
 | 
						shm->socket = sock;
 | 
				
			||||||
	shm->ctrl = ctrl;
 | 
						shm->ctrl = ctrl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = snd_ctl_new(&ctl, SND_CTL_TYPE_SHM, name);
 | 
						err = snd_ctl_new(&ctl, SND_CTL_TYPE_SHM, name, mode);
 | 
				
			||||||
	if (err < 0) {
 | 
						if (err < 0) {
 | 
				
			||||||
		result = err;
 | 
							result = err;
 | 
				
			||||||
		goto _err;
 | 
							goto _err;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,11 +25,11 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "control_local.h"
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <ctype.h>
 | 
					#include <ctype.h>
 | 
				
			||||||
#include <math.h>
 | 
					#include <math.h>
 | 
				
			||||||
#include "control_local.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Function to convert from percentage to volume. val = percentage */
 | 
					/* Function to convert from percentage to volume. val = percentage */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,12 +26,12 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "control_local.h"
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <ctype.h>
 | 
					#include <ctype.h>
 | 
				
			||||||
#include "control_local.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void __fill_eld_ctl_id(snd_ctl_elem_id_t *id, int dev, int subdev)
 | 
					static void __fill_eld_ctl_id(snd_ctl_elem_id_t *id, int dev, int subdev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -47,13 +47,13 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
 | 
				
			||||||
	snd_ctl_elem_info_t cinfo = {0};
 | 
						snd_ctl_elem_info_t cinfo = {0};
 | 
				
			||||||
	snd_ctl_elem_value_t value = {0};
 | 
						snd_ctl_elem_value_t value = {0};
 | 
				
			||||||
	unsigned char *eld;
 | 
						unsigned char *eld;
 | 
				
			||||||
	unsigned int l;
 | 
						unsigned int l, spc;
 | 
				
			||||||
	char *s, c;
 | 
						char *s, c;
 | 
				
			||||||
	int ret, valid;
 | 
						int ret, valid;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ret = snd_ctl_hw_open(&ctl, NULL, info->card, 0);
 | 
						ret = snd_ctl_hw_open(&ctl, NULL, info->card, 0);
 | 
				
			||||||
	if (ret < 0) {
 | 
						if (ret < 0) {
 | 
				
			||||||
		SYSMSG("Cannot open the associated CTL\n");
 | 
							SYSMSG("Cannot open the associated CTL");
 | 
				
			||||||
		return ret;
 | 
							return ret;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,7 +66,7 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
 | 
				
			||||||
	if (ret == -ENOENT || cinfo.type != SND_CTL_ELEM_TYPE_BYTES || cinfo.count == 0)
 | 
						if (ret == -ENOENT || cinfo.type != SND_CTL_ELEM_TYPE_BYTES || cinfo.count == 0)
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
	if (ret < 0) {
 | 
						if (ret < 0) {
 | 
				
			||||||
		SYSMSG("Cannot read ELD\n");
 | 
							SYSMSG("Cannot read ELD");
 | 
				
			||||||
		return ret;
 | 
							return ret;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	/* decode connected HDMI device name */
 | 
						/* decode connected HDMI device name */
 | 
				
			||||||
| 
						 | 
					@ -74,23 +74,36 @@ int __snd_pcm_info_eld_fixup(snd_pcm_info_t * info)
 | 
				
			||||||
	if (cinfo.count < 20 || cinfo.count > 256)
 | 
						if (cinfo.count < 20 || cinfo.count > 256)
 | 
				
			||||||
		return -EIO;
 | 
							return -EIO;
 | 
				
			||||||
	l = eld[4] & 0x1f;
 | 
						l = eld[4] & 0x1f;
 | 
				
			||||||
	if (l == 0 || l > 16 || 20 + l > cinfo.count)
 | 
						if (l == 0)
 | 
				
			||||||
		return -EIO;
 | 
							/* no monitor name detected */
 | 
				
			||||||
 | 
							goto __present;
 | 
				
			||||||
 | 
						if (l > 16 || 20 + l > cinfo.count) {
 | 
				
			||||||
 | 
							SNDERR("ELD decode failed, using old HDMI output names");
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	s = alloca(l + 1);
 | 
						s = alloca(l + 1);
 | 
				
			||||||
	s[l] = '\0';
 | 
					 | 
				
			||||||
	/* sanitize */
 | 
						/* sanitize */
 | 
				
			||||||
	valid = 0;
 | 
						valid = 0;
 | 
				
			||||||
 | 
						spc = 0;
 | 
				
			||||||
	while (l > 0) {
 | 
						while (l > 0) {
 | 
				
			||||||
		l--;
 | 
							l--;
 | 
				
			||||||
		c = eld[20 + l];
 | 
							c = eld[20 + l];
 | 
				
			||||||
		if (c < ' ' || c >= 0x7f) {
 | 
							if (c <= ' ' || c >= 0x7f) {
 | 
				
			||||||
			s[l] = ' ';
 | 
								s[l] = ' ';
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			valid += !!isalnum(c);
 | 
								valid += !!isalnum(c);
 | 
				
			||||||
			s[l] = c;
 | 
								s[l] = c;
 | 
				
			||||||
 | 
								if (spc == 0)
 | 
				
			||||||
 | 
									spc = l + 1;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (valid > 3)
 | 
						if (valid > 3) {
 | 
				
			||||||
 | 
							s[spc] = '\0';
 | 
				
			||||||
		snd_strlcpy((char *)info->name, s, sizeof(info->name));
 | 
							snd_strlcpy((char *)info->name, s, sizeof(info->name));
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
					__present:
 | 
				
			||||||
 | 
							strncat((char *)info->name, " *", sizeof(info->name) - 1);
 | 
				
			||||||
 | 
							((char *)info->name)[sizeof(info->name)-1] = '\0';
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,13 +42,13 @@ to reduce overhead accessing the real controls in kernel drivers.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "control_local.h"
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <fcntl.h>
 | 
					#include <fcntl.h>
 | 
				
			||||||
#include <sys/ioctl.h>
 | 
					#include <sys/ioctl.h>
 | 
				
			||||||
#include "control_local.h"
 | 
					 | 
				
			||||||
#ifdef HAVE_LIBPTHREAD
 | 
					#ifdef HAVE_LIBPTHREAD
 | 
				
			||||||
#include <pthread.h>
 | 
					#include <pthread.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					@ -680,7 +680,7 @@ int snd_hctl_wait(snd_hctl_t *hctl, int timeout)
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	npfds = snd_hctl_poll_descriptors_count(hctl);
 | 
						npfds = snd_hctl_poll_descriptors_count(hctl);
 | 
				
			||||||
	if (npfds <= 0 || npfds >= 16) {
 | 
						if (npfds <= 0 || npfds >= 16) {
 | 
				
			||||||
		SNDERR("Invalid poll_fds %d\n", npfds);
 | 
							SNDERR("Invalid poll_fds %d", npfds);
 | 
				
			||||||
		return -EIO;
 | 
							return -EIO;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	pfd = alloca(sizeof(*pfd) * npfds);
 | 
						pfd = alloca(sizeof(*pfd) * npfds);
 | 
				
			||||||
| 
						 | 
					@ -689,14 +689,14 @@ int snd_hctl_wait(snd_hctl_t *hctl, int timeout)
 | 
				
			||||||
	if (err < 0)
 | 
						if (err < 0)
 | 
				
			||||||
		return err;
 | 
							return err;
 | 
				
			||||||
	if (err != npfds) {
 | 
						if (err != npfds) {
 | 
				
			||||||
		SNDMSG("invalid poll descriptors %d\n", err);
 | 
							SNDMSG("invalid poll descriptors %d", err);
 | 
				
			||||||
		return -EIO;
 | 
							return -EIO;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	do {
 | 
						do {
 | 
				
			||||||
		pollio = 0;
 | 
							pollio = 0;
 | 
				
			||||||
		err_poll = poll(pfd, npfds, timeout);
 | 
							err_poll = poll(pfd, npfds, timeout);
 | 
				
			||||||
		if (err_poll < 0) {
 | 
							if (err_poll < 0) {
 | 
				
			||||||
			if (errno == EINTR && !CTLINABORT(hctl->ctl))
 | 
								if (errno == EINTR && !CTLINABORT(hctl->ctl) && !(hctl->ctl->mode & SND_CTL_EINTR))
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			return -errno;
 | 
								return -errno;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * \file control/namehint.c
 | 
					 * \file control/namehint.c
 | 
				
			||||||
 | 
					 * \ingroup Configuration
 | 
				
			||||||
 * \brief Give device name hints
 | 
					 * \brief Give device name hints
 | 
				
			||||||
 * \author Jaroslav Kysela <perex@perex.cz>
 | 
					 * \author Jaroslav Kysela <perex@perex.cz>
 | 
				
			||||||
 * \date 2006
 | 
					 * \date 2006
 | 
				
			||||||
| 
						 | 
					@ -602,9 +603,7 @@ int snd_device_name_hint(int card, const char *iface, void ***hints)
 | 
				
			||||||
	list.siface = iface;
 | 
						list.siface = iface;
 | 
				
			||||||
	list.show_all = 0;
 | 
						list.show_all = 0;
 | 
				
			||||||
	list.cardname = NULL;
 | 
						list.cardname = NULL;
 | 
				
			||||||
	if (strcmp(iface, "card") == 0)
 | 
						if (strcmp(iface, "pcm") == 0)
 | 
				
			||||||
		list.iface = SND_CTL_ELEM_IFACE_CARD;
 | 
					 | 
				
			||||||
	else if (strcmp(iface, "pcm") == 0)
 | 
					 | 
				
			||||||
		list.iface = SND_CTL_ELEM_IFACE_PCM;
 | 
							list.iface = SND_CTL_ELEM_IFACE_PCM;
 | 
				
			||||||
	else if (strcmp(iface, "rawmidi") == 0)
 | 
						else if (strcmp(iface, "rawmidi") == 0)
 | 
				
			||||||
		list.iface = SND_CTL_ELEM_IFACE_RAWMIDI;
 | 
							list.iface = SND_CTL_ELEM_IFACE_RAWMIDI;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,13 +29,13 @@
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "local.h"
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#include <stdarg.h>
 | 
					#include <stdarg.h>
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
#include <string.h>
 | 
					#include <string.h>
 | 
				
			||||||
#include <ctype.h>
 | 
					#include <ctype.h>
 | 
				
			||||||
#include "local.h"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef DOC_HIDDEN
 | 
					#ifndef DOC_HIDDEN
 | 
				
			||||||
typedef struct {
 | 
					typedef struct {
 | 
				
			||||||
| 
						 | 
					@ -311,7 +311,7 @@ static int snd_config_get_ctl_elem_value(snd_config_t *conf,
 | 
				
			||||||
			unsigned int idx = 0;
 | 
								unsigned int idx = 0;
 | 
				
			||||||
			if (len % 2 != 0 || len > count * 2) {
 | 
								if (len % 2 != 0 || len > count * 2) {
 | 
				
			||||||
			_bad_content:
 | 
								_bad_content:
 | 
				
			||||||
				SNDERR("bad value content\n");
 | 
									SNDERR("bad value content");
 | 
				
			||||||
				return -EINVAL;
 | 
									return -EINVAL;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			while (*buf) {
 | 
								while (*buf) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue