audiodsp_module.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef AUDIO_DSP_MODULES_H
  2. #define AUDIO_DSP_MODULES_H
  3. #include <linux/device.h>
  4. #include <linux/timer.h>
  5. #include <linux/wakelock.h>
  6. /*
  7. #include <asm/dsp/audiodsp_control.h>
  8. #include <asm/dsp/dsp_register.h>
  9. */
  10. #include "audiodsp_control.h"
  11. #include "dsp_register.h"
  12. #include "codec_message.h"
  13. #include <linux/dma-mapping.h>
  14. struct audiodsp_priv
  15. {
  16. struct class *class;
  17. struct device *dev;
  18. struct device *micro_dev;
  19. struct timer_list dsp_mointer;
  20. struct list_head mcode_list;
  21. int mcode_id;
  22. spinlock_t mcode_lock;
  23. int code_mem_size;
  24. struct mail_msg *mailbox_reg;
  25. struct mail_msg *mailbox_reg2;
  26. struct dsp_working_info *dsp_work_details;
  27. unsigned long dsp_code_start;
  28. unsigned long dsp_code_size;
  29. unsigned long dsp_stack_start;
  30. unsigned long dsp_stack_size;
  31. unsigned long dsp_gstack_start;
  32. unsigned long dsp_gstack_size;
  33. unsigned long dsp_heap_start;
  34. unsigned long dsp_heap_size;
  35. struct mutex dsp_mutex;
  36. char dsp_codename[32];
  37. unsigned long dsp_start_time;//system jiffies
  38. unsigned long dsp_end_time;//system jiffies
  39. int stream_fmt;
  40. int last_stream_fmt;
  41. struct frame_fmt frame_format;
  42. struct frame_info cur_frame_info;
  43. unsigned int last_valid_pts;
  44. int out_len_after_last_valid_pts;
  45. int decode_error_count;
  46. int decode_fatal_err;
  47. int dsp_is_started;
  48. void *stream_buffer_mem;
  49. int stream_buffer_mem_size;
  50. int decoded_nb_frames;
  51. int first_lookup_over;
  52. int format_wait_count;
  53. unsigned long stream_buffer_start;
  54. unsigned long stream_buffer_end;
  55. unsigned long stream_buffer_size;
  56. struct mutex stream_buffer_mutex;
  57. struct completion decode_completion;
  58. void __iomem *p;
  59. // for power management
  60. struct wake_lock wakelock;
  61. };
  62. struct audiodsp_priv *audiodsp_privdata(void);
  63. #define DSP_PRNT(fmt,args...) printk(KERN_INFO "[dsp]" fmt,##args)
  64. #endif