Skip to contentSkip to conversation

: Volume control per PCM

ALSA - driver 0001318 [email protected] 1 participant 1 message Feb 11, 2006

lore
Share & tools
lore
#0 lore raw

A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1318>
======================================================================
Reported By: darkbrain
Assigned To:
======================================================================

Project:                    ALSA - driver
Issue ID:                   1318
Category:                   PCI - cs46xx
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     new
Distribution:               
Kernel Version:             
======================================================================
Date Submitted:             08-07-2005 14:45 CEST
Last Modified:              02-11-2006 02:38 CET

======================================================================
Summary: Volume control per PCM
Description:
Hi, i'm trying to implement a volume control per PCM streams, i've attached a function that does the job. Unfortunally when it change the volume it also change the equalizer cutting off low frequencyes. I think there is a problem with the second poke, infact withot that poke, the volume works correctly for left case. Any suggestion? Any documentation? Thanks,
Dino

======================================================================

----------------------------------------------------------------------
darkbrain - 02-10-06 15:29
----------------------------------------------------------------------
Yep the code is pratically identical.
Here is a comment taken from cs46xx_dsp_scb_types.h :
/* Standard stereo volume control
Initialized by the host (host updates target volumes)

Current volumes update by the DSP task
On mixer input streams: required & updated by the mixer subroutine in
the
"parent" DSP task

On Tees, both current & target volumes are copied up on
initialization,
and, subsequently, the target volume is copied up while the current volume is copied down.

These two 32-bit words are redefined for wavetable & 3-D voices.
*/
It's seems that i need to write only the target volume and leave the dsp to change the current volume.
But obviuslly it's doesn't work. only the left channel seems to be modified. Any way i don't know if this registry is what i'm modifying.

----------------------------------------------------------------------
Raymond - 02-11-06 02:38
----------------------------------------------------------------------
It seem that when you change "DAC Volume", cs46xx_dsp_set_dac_volume() will set all scb to the same volume. This is the major problem.

	/* main output */
	scb = ins->master_mix_scb->sub_list_ptr;
	while (scb != ins->the_null_scb) {
		cs46xx_dsp_scb_set_volume (chip,scb,left,right);
		scb = scb->next_scb_ptr;
	}

	/* rear output */
	scb = ins->rear_mix_scb->sub_list_ptr;
	while (scb != ins->the_null_scb) {
		cs46xx_dsp_scb_set_volume (chip,scb,left,right);
		scb = scb->next_scb_ptr;
	}

Issue History
Date Modified Username Field Change
======================================================================

08-07-05 14:45 darkbrain      New Issue                                    
08-07-05 14:45 darkbrain      File Added: volume.c                         
08-13-05 10:43 darkbrain      Note Added: 0005802                          
01-10-06 12:55 darkbrain      Note Added: 0007548                          
02-05-06 04:55 Raymond        Note Added: 0007929                          
02-05-06 05:33 Raymond        Note Edited: 0007929                         
02-05-06 13:19 darkbrain      Note Added: 0007932                          
02-05-06 14:42 Raymond        Note Added: 0007934                          
02-06-06 03:43 Raymond        Note Edited: 0007934                         
02-07-06 21:04 darkbrain      File Added: pcm1.patch                       
02-07-06 21:05 darkbrain      Note Added: 0007960                          
02-08-06 02:39 Raymond        Note Edited: 0007934                         
02-08-06 03:24 Raymond        Note Added: 0007962                          
02-08-06 03:31 Raymond        Note Edited: 0007962                         
02-08-06 09:54 Raymond        Note Edited: 0007934                         
02-08-06 10:41 darkbrain      Note Added: 0007964                          
02-09-06 08:06 Raymond        Note Added: 0007970                          
02-09-06 08:11 Raymond        Note Edited: 0007970                         
02-09-06 10:37 Raymond        Note Deleted: 0007970                        
02-10-06 12:59 Raymond        Note Added: 0008002                          
02-10-06 15:29 darkbrain      Note Added: 0008005                          
02-11-06 02:38 Raymond        Note Added: 0008011                          

======================================================================

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642