Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. static struct snd_soc_dai_driver dfmcs320_dai = {
  2. .name = "dfbmcs320-pcm",
  3. .playback = {
  4. .channels_min = 1,
  5. .channels_max = 1,
  6. .rates = SNDRV_PCM_RATE_8000,
  7. .formats = SNDRV_PCM_FMTBIT_S16_LE,
  8. },
  9. .capture = {
  10. .channels_min = 1,
  11. .channels_max = 1,
  12. .rates = SNDRV_PCM_RATE_8000,
  13. .formats = SNDRV_PCM_FMTBIT_S16_LE,
  14. },
  15. };
  16.  
  17. static struct snd_soc_codec_driver soc_codec_dev_dfmcs320;
  18.  
  19. static int __devinit dfmcs320_dai_probe(struct dfmcs320_device *pdev)
  20. {
  21. return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_dfmcs320,
  22. pdata->dais, pdata->num_dais);
  23. }
  24.  
  25. static int __devexit dfmcs320_dai_remove(struct dfmcs320_device *pdev)
  26. {
  27. snd_soc_unregister_codec(&pdev->dev);
  28. return 0;
  29. }
  30.  
  31. static struct dfmcs320_driver dfmcs320_dai_driver = {
  32. .driver = {
  33. .name = "dfmcs320-dai",
  34. .owner = THIS_MODULE,
  35. },
  36. .probe = dfmcs320_dai_probe,
  37. .remove = __devexit_p(dfmcs320_dai_remove),
  38. };
  39.  
  40. static int __init dfmcs320_dai_init(void)
  41. {
  42. return dfmcs320_driver_register(&dfmcs320_dai_driver);
  43. }
  44. module_init(dfmcs320_dai_init);
  45.  
  46. static void __exit dfmcs320_dai_exit(void)
  47. {
  48. dfmcs320_driver_unregister(&dfmcs320_dai_driver);
  49. }
  50. module_exit(dfmcs320_dai_exit);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement