#ifndef YAMAHA_MC1N2_AUDIO_H
#define YAMAHA_MC1N2_AUDIO_H
+#include <system/audio.h>
+
#include "mc1n2.h"
struct yamaha_mc1n2_audio_routine_init {
MCDRV_SYSEQ_INFO syseq_info;
};
-struct yamaha_mc1n2_audio_routine_route_init {
+struct yamaha_mc1n2_audio_routine_postopen {
+ MCDRV_AE_INFO ae_info;
+};
+
+struct yamaha_mc1n2_audio_routine_route {
+ audio_devices_t device;
+ audio_mode_t mode;
+
+ MCDRV_AE_INFO ae_info;
MCDRV_PATH_INFO path_info;
MCDRV_DAC_INFO dac_info;
};
-struct yamaha_mc1n2_audio_routine {
+struct yamaha_mc1n2_audio_routines {
struct yamaha_mc1n2_audio_routine_init *init;
- struct yamaha_mc1n2_audio_routine_route_init *route_init;
+ struct yamaha_mc1n2_audio_routine_postopen *postopen;
+ struct yamaha_mc1n2_audio_routine_route *route_init;
+ struct yamaha_mc1n2_audio_routine_route *route_start;
+ struct yamaha_mc1n2_audio_routine_route *route_stop;
+
+ int route_start_count;
};
struct yamaha_mc1n2_audio_device_ops {
char *hw_node;
- struct yamaha_mc1n2_audio_routine routine;
+ struct yamaha_mc1n2_audio_routines routines;
};
struct yamaha_mc1n2_audio_pdata {
char *name;
struct yamaha_mc1n2_audio_device_ops *ops;
+
+ audio_devices_t device_current;
+ audio_mode_t mode_current;
+ int route_started;
};
/*
// Routines
int yamaha_mc1n2_audio_routine_init(struct yamaha_mc1n2_audio_pdata *pdata);
+int yamaha_mc1n2_audio_routine_postopen(struct yamaha_mc1n2_audio_pdata *pdata);
int yamaha_mc1n2_audio_routine_route_init(struct yamaha_mc1n2_audio_pdata *pdata);
+int yamaha_mc1n2_audio_routine_route_start(struct yamaha_mc1n2_audio_pdata *pdata);
+int yamaha_mc1n2_audio_routine_route_stop(struct yamaha_mc1n2_audio_pdata *pdata);
// Values configuration
+int yamaha_mc1n2_audio_set_route(struct yamaha_mc1n2_audio_pdata *pdata,
+ audio_devices_t device, audio_mode_t mode);
char *yamaha_mc1n2_audio_get_hw_node(struct yamaha_mc1n2_audio_pdata *pdata);
// Init/Deinit