Re: GPIO connections for the M-Audio Revolution 5.1

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

 



Hello Takashi,

On Tue, Aug 08, 2006 at 07:30:44PM +0200, Takashi Iwai wrote:
> > Is the last argument (mask) for AK_COMPOSE the maximum allowed mixer
> > value?  Is it ok if this is not a power of two?
> 
> Yes and yes.

Fine.  Slowly I am getting there.  Now I have something working,
which uses the following addition to snd_akm4xxx_build_controls:

	if (ak->type == SND_AK5365) {
		memset(ctl, 0, sizeof(*ctl));
		if (ak->channel_names == NULL) {
			strcpy(ctl->id.name, "ADC Volume");
		} else {
			strcpy(ctl->id.name, ak->channel_names[0]);
		}
		ctl->id.index = ak->idx_offset * 2;
		ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
		ctl->count = 1;
		ctl->info = snd_akm4xxx_stereo_volume_info;
		ctl->get = snd_akm4xxx_stereo_volume_get;
		ctl->put = snd_akm4xxx_stereo_volume_put;
		/* register 4 & 5 */
		ctl->private_value =
			AK_COMPOSE(0, 4, 0, 0x98);
		ctl->private_data = ak;
		err = snd_ctl_add(ak->card,
				  snd_ctl_new(ctl, SNDRV_CTL_ELEM_ACCESS_READ|
					      SNDRV_CTL_ELEM_ACCESS_WRITE));
		
		if (err < 0)
			goto __error;

		idx += 2;	/* always stereo */
	}

(I will post a complete patch later today.)

This gives me a beautiful (and working!) volume slider for the capture
channel.  Does this look ok to you?  The magic constant 0x98 is from
page 35 of the spec and I think is correct.  I did not imitate the
loop over idx which other parts of this function have.  I hope that
this is ok.

The card seems to have a separate mute control.  How do I create a
mixer element for this?  I would like alsamixer to place a little mute
box just under the slider bar.  I looked around, but could not find
anything similar to copy within the ice1723 directory.

Many thanks for your help,
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