cs4281_wrapper.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*******************************************************************************
  2. *
  3. *      "cs4281_wrapper.h" --  Cirrus Logic-Crystal CS4281 linux audio driver.
  4. *
  5. *      Copyright (C) 2000,2001  Cirrus Logic Corp.  
  6. *            -- tom woller (twoller@crystal.cirrus.com) or
  7. *               (audio@crystal.cirrus.com).
  8. *
  9. *      This program is free software; you can redistribute it and/or modify
  10. *      it under the terms of the GNU General Public License as published by
  11. *      the Free Software Foundation; either version 2 of the License, or
  12. *      (at your option) any later version.
  13. *
  14. *      This program is distributed in the hope that it will be useful,
  15. *      but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. *      GNU General Public License for more details.
  18. *
  19. *      You should have received a copy of the GNU General Public License
  20. *      along with this program; if not, write to the Free Software
  21. *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. *
  23. * 12/22/00 trw - new file. 
  24. * 04/18/01 trw - rework entire wrapper logic.
  25. *
  26. *******************************************************************************/
  27. #ifndef __CS4281_WRAPPER_H
  28. #define __CS4281_WRAPPER_H
  29. /* 2.4.x wrapper */
  30. #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,9)
  31. static int cs4281_null_suspend(struct pci_dev *pcidev, u32 unused) { return 0; }
  32. static int cs4281_null_resume(struct pci_dev *pcidev) { return 0; }
  33. #else
  34. #define no_llseek cs4281_llseek
  35. static loff_t cs4281_llseek(struct file *file, loff_t offset, int origin)
  36. {
  37. return -ESPIPE;
  38. }
  39. void cs4281_null_suspend(struct pci_dev *pcidev) { return; }
  40. void cs4281_null_resume(struct pci_dev *pcidev) { return; }
  41. #endif
  42. #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3)
  43. /* Some versions of 2.4.2 resolve pci_set_dma_mask and some do not... 
  44. *  but 2.4.0 definitely does not 
  45. */
  46. #define pci_set_dma_mask(dev,data) 0;
  47. #else
  48. #endif
  49. #define cs4x_mem_map_reserve(page) mem_map_reserve(page)
  50. #define cs4x_mem_map_unreserve(page) mem_map_unreserve(page)
  51. #endif /* #ifndef __CS4281_WRAPPER_H */