mirror of
				https://github.com/oplus-giulia-dev/android_hardware_oplus
				synced 2025-11-04 13:55:35 +08:00 
			
		
		
		
	audio_amplifier: Fix PCM device check
It should've been && instead of ||, but pcm_open() always returns a valid pointer, so we just drop the NULL check. Change-Id: Ibf1d0b34b02ca5910cd4c1bee4d55a04205e2203
This commit is contained in:
		
				
					committed by
					
						
						Michael Bestas
					
				
			
			
				
	
			
			
			
						parent
						
							1177faa26d
						
					
				
				
					commit
					1166219abe
				
			@@ -108,7 +108,7 @@ int tfa98xx_start_feedback(void* adev, uint32_t snd_device) {
 | 
			
		||||
 | 
			
		||||
    tfa_dev->tfa98xx_out =
 | 
			
		||||
            pcm_open(tfa_dev->adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_tfa98xx);
 | 
			
		||||
    if (!(tfa_dev->tfa98xx_out || pcm_is_ready(tfa_dev->tfa98xx_out))) {
 | 
			
		||||
    if (!pcm_is_ready(tfa_dev->tfa98xx_out)) {
 | 
			
		||||
        ALOGE("%d: %s", __LINE__, pcm_get_error(tfa_dev->tfa98xx_out));
 | 
			
		||||
        rc = -EIO;
 | 
			
		||||
        goto error;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user