list_for_each(pos, seq) {
s = list_entry(pos, struct sequence_element, list);
switch (s->type) {
+ case SEQUENCE_ELEMENT_TYPE_CDEV:
+ uc_error("cdev not yet implemented: '%s'", s->data.cdev);
+ break;
case SEQUENCE_ELEMENT_TYPE_CSET:
uc_error("cset not yet implemented: '%s'", s->data.cset);
break;
*
* Sequence controls elements are in the following form:-
*
+ * cdev "hw:0,0"
* cset "element_id_syntax value_syntax"
* usleep time
* exec "any unix command with arguments"
return -ENOMEM;
list_add_tail(&curr->list, base);
+ if (strcmp(cmd, "cdev") == 0) {
+ curr->type = SEQUENCE_ELEMENT_TYPE_CDEV;
+ err = parse_string(n, &curr->data.cdev);
+ if (err < 0) {
+ uc_error("error: cdev requires a string!");
+ return err;
+ }
+ continue;
+ }
+
if (strcmp(cmd, "cset") == 0) {
curr->type = SEQUENCE_ELEMENT_TYPE_CSET;
err = parse_string(n, &curr->data.cset);
#define MAX_FILE 256
#define ALSA_USE_CASE_DIR ALSA_CONFIG_DIR "/ucm"
-#define SEQUENCE_ELEMENT_TYPE_CSET 1
-#define SEQUENCE_ELEMENT_TYPE_SLEEP 2
-#define SEQUENCE_ELEMENT_TYPE_EXEC 3
+#define SEQUENCE_ELEMENT_TYPE_CDEV 1
+#define SEQUENCE_ELEMENT_TYPE_CSET 2
+#define SEQUENCE_ELEMENT_TYPE_SLEEP 3
+#define SEQUENCE_ELEMENT_TYPE_EXEC 4
struct ucm_value {
struct list_head list;
unsigned int type;
union {
long sleep; /* Sleep time in msecs if sleep element, else 0 */
+ char *cdev;
char *cset;
char *exec;
} data;