mirror of
				https://github.com/Ysurac/openmptcprouter.git
				synced 2025-03-09 15:40:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			58 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 74931c13b3841d3d22a58b9344de2de89be02183 Mon Sep 17 00:00:00 2001
 | |
| From: Matthias Reichl <hias@horus.com>
 | |
| Date: Fri, 2 Feb 2018 20:30:42 +0100
 | |
| Subject: [PATCH 233/277] ASoC: hifiberry_dacplus: fix S24_LE format
 | |
| 
 | |
| Remove set_bclk_ratio call so 24-bit data is transmitted in
 | |
| 24 bclk cycles.
 | |
| 
 | |
| Signed-off-by: Matthias Reichl <hias@horus.com>
 | |
| ---
 | |
|  sound/soc/bcm/hifiberry_dacplus.c | 20 +++-----------------
 | |
|  1 file changed, 3 insertions(+), 17 deletions(-)
 | |
| 
 | |
| diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c
 | |
| index 16697dd6c6db..b32dae9d3b1d 100644
 | |
| --- a/sound/soc/bcm/hifiberry_dacplus.c
 | |
| +++ b/sound/soc/bcm/hifiberry_dacplus.c
 | |
| @@ -216,20 +216,11 @@ static int snd_rpi_hifiberry_dacplus_update_rate_den(
 | |
|  	return 0;
 | |
|  }
 | |
|  
 | |
| -static int snd_rpi_hifiberry_dacplus_set_bclk_ratio_pro(
 | |
| -	struct snd_soc_dai *cpu_dai, struct snd_pcm_hw_params *params)
 | |
| -{
 | |
| -	int bratio = snd_pcm_format_physical_width(params_format(params))
 | |
| -		* params_channels(params);
 | |
| -	return snd_soc_dai_set_bclk_ratio(cpu_dai, bratio);
 | |
| -}
 | |
| -
 | |
|  static int snd_rpi_hifiberry_dacplus_hw_params(
 | |
|  	struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params)
 | |
|  {
 | |
| -	int ret;
 | |
| +	int ret = 0;
 | |
|  	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 | |
| -	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
 | |
|  
 | |
|  	if (snd_rpi_hifiberry_is_dacpro) {
 | |
|  		struct snd_soc_codec *codec = rtd->codec;
 | |
| @@ -237,13 +228,8 @@ static int snd_rpi_hifiberry_dacplus_hw_params(
 | |
|  		snd_rpi_hifiberry_dacplus_set_sclk(codec,
 | |
|  			params_rate(params));
 | |
|  
 | |
| -		ret = snd_rpi_hifiberry_dacplus_set_bclk_ratio_pro(cpu_dai,
 | |
| -			params);
 | |
| -		if (!ret)
 | |
| -			ret = snd_rpi_hifiberry_dacplus_update_rate_den(
 | |
| -				substream, params);
 | |
| -	} else {
 | |
| -		ret = snd_soc_dai_set_bclk_ratio(cpu_dai, 64);
 | |
| +		ret = snd_rpi_hifiberry_dacplus_update_rate_den(
 | |
| +			substream, params);
 | |
|  	}
 | |
|  	return ret;
 | |
|  }
 | |
| -- 
 | |
| 2.16.1
 | |
| 
 |