mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	AC3 passthrough support
Second version after Tanu's feedback
TODO:
    - notify client that volume control is disabled
    - change sink rate in passthrough mode if needed
    - automatic detection of passthrough mode instead of hard
    coded profile names
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
			
			
This commit is contained in:
		
							parent
							
								
									021aa306aa
								
							
						
					
					
						commit
						9b6c84ad6e
					
				
					 10 changed files with 124 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -1393,6 +1393,24 @@ void pa_sink_set_volume(
 | 
			
		|||
    pa_assert(volume || (s->flags & PA_SINK_FLAT_VOLUME));
 | 
			
		||||
    pa_assert(!volume || volume->channels == 1 || pa_cvolume_compatible(volume, &s->sample_spec));
 | 
			
		||||
 | 
			
		||||
    /* make sure we don't change the volume when a PASSTHROUGH input is connected */
 | 
			
		||||
    if (s->flags & PA_SINK_PASSTHROUGH) {
 | 
			
		||||
        pa_sink_input *alt_i;
 | 
			
		||||
        uint32_t idx;
 | 
			
		||||
 | 
			
		||||
        /* one and only one PASSTHROUGH input can possibly be connected */
 | 
			
		||||
        if (pa_idxset_size(s->inputs) == 1) {
 | 
			
		||||
 | 
			
		||||
            alt_i = pa_idxset_first(s->inputs, &idx);
 | 
			
		||||
 | 
			
		||||
            if (alt_i->flags & PA_SINK_INPUT_PASSTHROUGH) {
 | 
			
		||||
                /* FIXME: Need to notify client that volume control is disabled */
 | 
			
		||||
                pa_log_warn("Cannot change volume, Sink is connected to PASSTHROUGH input");
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* As a special exception we accept mono volumes on all sinks --
 | 
			
		||||
     * even on those with more complex channel maps */
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue