Fix to independent playback and capture patch to stop triggering PCM capture interrupts when a capture is not running and PCM playback interrupts when a playback is not running.
This was causing a possible kernel hang while stopping a capture with an ongoing playback or vice versa.
This commit is contained in:
		
							parent
							
								
									af01d7d2f8
								
							
						
					
					
						commit
						fe08f3c3bd
					
				| @ -169,6 +169,19 @@ index 25b77dc..ec62624 100644 | ||||
|              break; | ||||
|          } | ||||
|          case MT_ALSA_Msg_SetSampleRate: | ||||
| @@ -1468,8 +1502,10 @@ void AudioFrameTIC(void* user)
 | ||||
|              frame_process_begin(&self->m_RTP_streams_manager); | ||||
|              if(self->m_pALSAChip && self->m_alsa_driver_frontend) | ||||
|              { | ||||
| -                self->m_alsa_driver_frontend->pcm_interrupt(self->m_pALSAChip, 1);
 | ||||
| -                self->m_alsa_driver_frontend->pcm_interrupt(self->m_pALSAChip, 0);
 | ||||
| +                if (self->m_bIsRecordingIO)
 | ||||
| +                  self->m_alsa_driver_frontend->pcm_interrupt(self->m_pALSAChip, 1);
 | ||||
| +                if (self->m_bIsPlaybackIO)
 | ||||
| +                  self->m_alsa_driver_frontend->pcm_interrupt(self->m_pALSAChip, 0);
 | ||||
|              } | ||||
|              frame_process_end(&self->m_RTP_streams_manager); | ||||
|          #endif | ||||
| @@ -1680,20 +1714,25 @@ int get_interrupts_frame_size(void* user, uint32_t *framesize)
 | ||||
|      return -EINVAL; | ||||
|  } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user