mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	pcm: Fix DSD formats userland usability
Support for DSD sample formats has been added a while ago. This patch makes those sample formats beter usable from userland (e.g. aplay). [These implementation details have been forgotten in the previous DSD support patch -- tiwai] Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
		
							parent
							
								
									f6b879e7cc
								
							
						
					
					
						commit
						87df9f3b7a
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -195,11 +195,13 @@ int snd_pcm_format_width(snd_pcm_format_t format)
 | 
			
		|||
	switch (format) {
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S8:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_U8:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_DSD_U8:
 | 
			
		||||
		return 8;
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S16_LE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S16_BE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_U16_LE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_U16_BE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_DSD_U16_LE:
 | 
			
		||||
		return 16;
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S18_3LE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S18_3BE:
 | 
			
		||||
| 
						 | 
				
			
			@ -253,11 +255,13 @@ int snd_pcm_format_physical_width(snd_pcm_format_t format)
 | 
			
		|||
	switch (format) {
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S8:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_U8:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_DSD_U8:
 | 
			
		||||
		return 8;
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S16_LE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S16_BE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_U16_LE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_U16_BE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_DSD_U16_LE:
 | 
			
		||||
		return 16;
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S18_3LE:
 | 
			
		||||
	case SNDRV_PCM_FORMAT_S18_3BE:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue