Changeset 587 for GPL/trunk/alsa-kernel/include/sound/pcm.h
- Timestamp:
- Jun 9, 2016, 10:38:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/include/sound/pcm.h
r464 r587 74 74 snd_pcm_uframes_t pos, 75 75 void __user *buf, snd_pcm_uframes_t count); 76 int (*silence)(struct snd_pcm_substream *substream, int channel, 76 int (*silence)(struct snd_pcm_substream *substream, int channel, 77 77 snd_pcm_uframes_t pos, snd_pcm_uframes_t count); 78 78 struct page *(*page)(struct snd_pcm_substream *substream, … … 216 216 217 217 struct snd_pcm_hw_constraints { 218 struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - 218 struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - 219 219 SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; 220 220 struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - … … 330 330 int tstamp_type; /* timestamp type */ 331 331 332 /* -- DMA -- */ 332 /* -- DMA -- */ 333 333 unsigned char *dma_area; /* DMA area */ 334 334 dma_addr_t dma_addr; /* physical bus address (not accessible from main CPU) */ … … 538 538 } while (0) 539 539 540 #ifdef TARGET_OS2 540 541 #define snd_pcm_group_for_each_entry(s, substream) \ 541 542 list_for_each_entry(s, &substream->group->substreams, link_list, struct snd_pcm_substream) 543 #else 544 #define snd_pcm_group_for_each_entry(s, substream) \ 545 list_for_each_entry(s, &substream->group->substreams, link_list) 546 #endif 542 547 543 548 static inline int snd_pcm_running(struct snd_pcm_substream *substream) … … 592 597 snd_pcm_sframes_t avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_ptr; 593 598 #if defined TARGET_OS2 594 if ( runtime->buffer_size > runtime->control->appl_ptr) 595 avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_ptr; 596 else 597 { 598 599 avail = runtime->control->appl_ptr - runtime->status->hw_ptr; 600 if ( avail > runtime->buffer_size ) 601 avail = 0; 602 else 603 avail = runtime->buffer_size - avail; 604 } 605 #endif /* TARGET_OS2 */ 599 if ( runtime->buffer_size > runtime->control->appl_ptr) 600 avail = runtime->status->hw_ptr + runtime->buffer_size - runtime->control->appl_ptr; 601 else 602 { 603 604 avail = runtime->control->appl_ptr - runtime->status->hw_ptr; 605 if ( avail > runtime->buffer_size ) 606 avail = 0; 607 else 608 avail = runtime->buffer_size - avail; 609 } 610 #endif /* TARGET_OS2 */ 606 611 if (avail < 0) 607 612 avail += runtime->boundary; … … 706 711 } 707 712 708 static inline void snd_pcm_trigger_done(struct snd_pcm_substream *substream, 713 static inline void snd_pcm_trigger_done(struct snd_pcm_substream *substream, 709 714 struct snd_pcm_substream *master) 710 715 { … … 763 768 void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c); 764 769 void snd_interval_div(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c); 765 void snd_interval_muldivk(const struct snd_interval *a, const struct snd_interval *b, 770 void snd_interval_muldivk(const struct snd_interval *a, const struct snd_interval *b, 766 771 unsigned int k, struct snd_interval *c); 767 772 void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, … … 788 793 unsigned int min, unsigned int max); 789 794 int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var); 790 int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, 795 int snd_pcm_hw_constraint_list(struct snd_pcm_runtime *runtime, 791 796 unsigned int cond, 792 797 snd_pcm_hw_param_t var, 793 798 struct snd_pcm_hw_constraint_list *l); 794 int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, 799 int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime, 795 800 unsigned int cond, 796 801 snd_pcm_hw_param_t var, 797 802 struct snd_pcm_hw_constraint_ratnums *r); 798 int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime, 803 int snd_pcm_hw_constraint_ratdens(struct snd_pcm_runtime *runtime, 799 804 unsigned int cond, 800 805 snd_pcm_hw_param_t var, 801 806 struct snd_pcm_hw_constraint_ratdens *r); 802 int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime, 807 int snd_pcm_hw_constraint_msbits(struct snd_pcm_runtime *runtime, 803 808 unsigned int cond, 804 809 unsigned int width, … … 848 853 int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream); 849 854 int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, 850 unsigned int cmd, void *arg); 855 unsigned int cmd, void *arg); 851 856 int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); 852 857 int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream);
Note:
See TracChangeset
for help on using the changeset viewer.