 
 (defeci cs-add ((chainsetup "sChainsetup to add: " "%s"))
   "Adds a new chainsetup with name `name`."
+  :pcomplete doc)
+
+(defeci cs-option ((option "sOption string: " "%s"))
+  "Send an option command to ecasound."
   :pcomplete doc)
 
 (defeci cs-connect ()


(defeci ai-selected ()
  "Returns the name of the currently selected audio input object."
  :pcomplete doc)

(defeci ao-add ((filename "FOutput filename: " "%s"))

(defun eci-process-map-list (string)
  "Parse the output of a map-xxx-list ECI command and return an alist.
STRING is the string returned by a map-xxx-list command."
  (delq nil
	(mapcar
	 (lambda (elt)
	   (when (stringp (nth 3 elt))
	     (append
	      (list (nth 1 elt) (nth 0 elt) (nth 2 elt))
	      (let (res (count (string-to-number (nth 3 elt))))
		(setq elt (nthcdr 4 elt))
		(while (> count 0)
		  (setq
		   res
		   (cons
		    (list (nth 0 elt) (nth 1 elt)
			  (string-to-number (nth 2 elt)) ;; default value
			  (when (string= (nth 3 elt) "1")
			    (string-to-number (nth 4 elt)))
			  (when (string= (nth 5 elt) "1")
			    (string-to-number (nth 6 elt)))
			  (cond
			   ((string= (nth 7 elt) "1")
			    'toggle)
			   ((string= (nth 8 elt) "1")
			    'integer)
			   ((string= (nth 9 elt) "1")
			    'logarithmic)
			   ((string= (nth 10 elt) "1")
			    'output))) res)
		   elt (nthcdr 11 elt)
		   count (1- count)))
		(reverse res)))))
	 (mapcar (lambda (str) (split-string str ","))
		 (split-string string "\n")))))

(defeci cs-set-audio-format
  ((format (ecasound-read-from-minibuffer
