Re: [RFC] Add dB scale information to AK4xxx codec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Takashi,

On Thu, Sep 07, 2006 at 04:52:58PM +0200, Takashi Iwai wrote:
> I confirmed that the same behavior appears on AK4524.
> So, it makes much more sense to combine ADC and IPGA controls to a
> single control.
Great, this should simplify things considerably.

> The patch below is the final version I have on my local tree.
> Please check whether it works for you.
It works nice.  I now get

    Simple mixer control 'PCM',0
      Capabilities: pvolume cvolume cswitch cswitch-joined
      Playback channels: Front Left - Front Right
      Capture channels: Front Left - Front Right
      Limits: Playback 0 - 127 Capture 0 - 151
      Front Left: Playback 127 [100%] Capture 0 [0%] [on]
      Front Right: Playback 127 [100%] Capture 151 [100%] [on]

One remaining problem: Unfortunatly left and right volume are
exchanged when recording.  When I record with the setting above (using
arecord) and then replay the recording with aplay all the sound comes
from the left (!)  speaker.

I reactivated my register write spying patch and got

    reg4 <- 00
    reg5 <- 98

for the setting above.  So the actual register writes seem to be ok.
It seems that register 5 corresponds to the left channel (and 4 to the
right channel) on the revolution 5.1 card.

Otherwise everything seems fine.


Minor nit: the code (from ak4xxx-adda.c)

		/* register 4 & 5 */
		if (ak->type == SND_AK5365)
			knew.private_value =
				AK_COMPOSE(idx/2, (idx%2) + 4, 0, 151) |
				AK_VOL_CVT | AK_IPGA;
		else
			knew.private_value =
				AK_COMPOSE(idx/2, (idx%2) + 4, 0, 163) |
				AK_VOL_CVT | AK_IPGA;

looks unnecessarily complicated.  The AK5365 has just two channels, so
shouldn't it be just as follows?

		/* register 4 & 5 */
		if (ak->type == SND_AK5365)
			knew.private_value =
				AK_COMPOSE(0, idx + 4, 0, 151) |
				AK_VOL_CVT | AK_IPGA;
		else
			knew.private_value =
				AK_COMPOSE(idx/2, (idx%2) + 4, 0, 163) |
				AK_VOL_CVT | AK_IPGA;

> FYI, the second patch is for envy24control to make it work correctly
> after changing ADC ranges.
I only tried envy24control a long time ago.  Then it didn't recognise my
card and I ignored it afterwards.  Is it useful?  Should I give this a try?

Many thanks,
Jochen
-- 
http://seehuhn.de/

Attachment: signature.asc
Description: Digital signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux