X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fplat-omap%2Finclude%2Fmach%2Fomap-alsa.h;h=b0341e7a0cfa412affe303f4929a10b389eaf75b;hb=fdee8764947cde1e6933e7d981ce5b9de00e83e6;hp=bdf30a0f87f2f2c81a0477bfff20a38a714b78c8;hpb=30a2f3c60a84092c8084dfe788b710f8d0768cd4;p=linux-2.6-omap-h63xx.git diff --git a/arch/arm/plat-omap/include/mach/omap-alsa.h b/arch/arm/plat-omap/include/mach/omap-alsa.h index bdf30a0f87f..b0341e7a0cf 100644 --- a/arch/arm/plat-omap/include/mach/omap-alsa.h +++ b/arch/arm/plat-omap/include/mach/omap-alsa.h @@ -45,6 +45,33 @@ #include #include #include +/* + * Debug functions + */ +#undef DEBUG +/* #define DEBUG */ + +#define ERR(ARGS...) \ + do { \ + printk(KERN_ERR "{%s}-ERROR: ", __func__); \ + printk(ARGS); \ + } while (0) + +#ifdef DEBUG +#define DPRINTK(ARGS...) \ + do { \ + printk(KERN_INFO "<%s>: ", __func__); \ + printk(ARGS); \ + } while (0) +#define ADEBUG() printk("XXX Alsa debug f:%s, l:%d\n", __func__, __LINE__) +#define FN_IN printk(KERN_INFO "[%s]: start\n", __func__) +#define FN_OUT(n) printk(KERN_INFO "[%s]: end(%u)\n", __func__, n) +#else +#define DPRINTK(ARGS...) /* nop */ +#define ADEBUG() /* nop */ +#define FN_IN /* nop */ +#define FN_OUT(n) /* nop */ +#endif #define DMA_BUF_SIZE (1024 * 8) @@ -62,12 +89,12 @@ struct audio_stream { char dma_q_count; /* DMA Channel Q Count */ int active:1; /* we are using this stream for transfer now */ int period; /* current transfer period */ - int periods; /* current count of periods registerd in the DMA engine */ + int periods; /* current registered periods in DMA engine */ spinlock_t dma_lock; /* for locking in DMA operations */ struct snd_pcm_substream *stream; /* the pcm stream */ unsigned linked:1; /* dma channels linked */ - int offset; /* store start position of the last period in the alsa buffer */ - int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */ + int offset; /* start position of last period in alsa buf */ + int (*hw_start)(void); /* interface to start HW interface, (McBSP) */ int (*hw_stop)(void); /* interface to stop HW interface, e.g. McBSP */ }; @@ -108,7 +135,8 @@ void snd_omap_suspend_mixer(void); void snd_omap_resume_mixer(void); #endif -int snd_omap_alsa_post_probe(struct platform_device *pdev, struct omap_alsa_codec_config *config); +int snd_omap_alsa_post_probe(struct platform_device *pdev, + struct omap_alsa_codec_config *config); int snd_omap_alsa_remove(struct platform_device *pdev); #ifdef CONFIG_PM int snd_omap_alsa_suspend(struct platform_device *pdev, pm_message_t state);