All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: tsw@johana.com
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: M-Audio Revolution 7.1 card hangups
Date: Thu, 11 Sep 2003 11:20:52 +0200	[thread overview]
Message-ID: <s5h8yovbs0b.wl@alsa2.suse.de> (raw)
In-Reply-To: <20030911062637.83666.qmail@web21507.mail.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

At Wed, 10 Sep 2003 23:26:37 -0700 (PDT),
Tom Watson wrote:
> 
> [1  <text/plain; us-ascii (7bit)>]
> More information about the 'missing sound' on the 'other' (not left
> front/right front) channels:

the attachech patch will fix this problem.


Takashi

[-- Attachment #2: revo-fix2.dif --]
[-- Type: application/octet-stream, Size: 3975 bytes --]

Index: alsa-kernel/i2c/other/ak4xxx-adda.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/i2c/other/ak4xxx-adda.c,v
retrieving revision 1.4
diff -u -r1.4 ak4xxx-adda.c
--- alsa-kernel/i2c/other/ak4xxx-adda.c	14 Jul 2003 10:24:23 -0000	1.4
+++ alsa-kernel/i2c/other/ak4xxx-adda.c	11 Sep 2003 08:59:32 -0000
@@ -84,12 +84,14 @@
 		/* FIXME: needed for ak4529? */
 		break;
 	case SND_AK4355:
-		snd_akm4xxx_write(ak, 0, 0x01, state ? 0x02 : 0x01);
-		if (state)
+		if (state) {
+			snd_akm4xxx_write(ak, 0, 0x01, 0x02); /* reset and soft-mute */
 			return;
-		for (reg = 0x00; reg < 0x0a; reg++)
+		}
+		for (reg = 0x00; reg < 0x0b; reg++)
 			if (reg != 0x01)
 				snd_akm4xxx_write(ak, 0, reg, snd_akm4xxx_get(ak, 0, reg));
+		snd_akm4xxx_write(ak, 0, 0x01, 0x01); /* un-reset, unmute */
 		break;
 	case SND_AK4381:
 		for (chip = 0; chip < ak->num_dacs/2; chip++) {
@@ -151,8 +153,8 @@
 	static unsigned char inits_ak4355[] = {
 		0x01, 0x02, /* 1: reset and soft-mute */
 		0x00, 0x06, /* 0: mode3(i2s), disable auto-clock detect, disable DZF, sharp roll-off, RSTN#=0 */
-		// 0x02, 0x0e, /* 2: DA's power up, normal speed, RSTN#=0 */
-		0x02, 0x2e,
+		0x02, 0x0e, /* 2: DA's power up, normal speed, RSTN#=0 */
+		// 0x02, 0x2e, /* quad speed */
 		0x03, 0x01, /* 3: de-emphasis off */
 		0x04, 0x00, /* 4: LOUT1 volume muted */
 		0x05, 0x00, /* 5: ROUT1 volume muted */
@@ -166,8 +168,8 @@
 	};
 	static unsigned char inits_ak4381[] = {
 		0x00, 0x0c, /* 0: mode3(i2s), disable auto-clock detect */
-		// 0x01, 0x02, /* 1: de-emphasis off, normal speed, sharp roll-off, DZF off */
-		0x01, 0x12,
+		0x01, 0x02, /* 1: de-emphasis off, normal speed, sharp roll-off, DZF off */
+		// 0x01, 0x12, /* quad speed */
 		0x02, 0x00, /* 2: DZF disabled */
 		0x03, 0x00, /* 3: LATT 0 */
 		0x04, 0x00, /* 4: RATT 0 */
@@ -340,7 +342,7 @@
 
 int snd_akm4xxx_build_controls(akm4xxx_t *ak)
 {
-	unsigned int idx;
+	unsigned int idx, num_emphs;
 	int err;
 
 	for (idx = 0; idx < ak->num_dacs; ++idx) {
@@ -382,7 +384,7 @@
 		snd_kcontrol_t ctl;
 		memset(&ctl, 0, sizeof(ctl));
 		strcpy(ctl.id.name, "ADC Volume");
-		ctl.id.index = idx;
+		ctl.id.index = idx + ak->idx_offset * 2;
 		ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 		ctl.count = 1;
 		ctl.info = snd_akm4xxx_volume_info;
@@ -394,7 +396,7 @@
 			return err;
 		memset(&ctl, 0, sizeof(ctl));
 		strcpy(ctl.id.name, "IPGA Analog Capture Volume");
-		ctl.id.index = idx;
+		ctl.id.index = idx + ak->idx_offset * 2;
 		ctl.id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 		ctl.count = 1;
 		ctl.info = snd_akm4xxx_ipga_gain_info;
@@ -405,7 +407,11 @@
 		if ((err = snd_ctl_add(ak->card, snd_ctl_new(&ctl, SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE))) < 0)
 			return err;
 	}
-	for (idx = 0; idx < ak->num_dacs/2; idx++) {
+	if (ak->type == SND_AK4355)
+		num_emphs = 1;
+	else
+		num_emphs = ak->num_dacs / 2;
+	for (idx = 0; idx < num_emphs; idx++) {
 		snd_kcontrol_t ctl;
 		memset(&ctl, 0, sizeof(ctl));
 		strcpy(ctl.id.name, "Deemphasis");
Index: alsa-kernel/pci/ice1712/revo.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ice1712/revo.c,v
retrieving revision 1.3
diff -u -r1.3 revo.c
--- alsa-kernel/pci/ice1712/revo.c	4 Jun 2003 11:00:16 -0000	1.3
+++ alsa-kernel/pci/ice1712/revo.c	11 Sep 2003 08:58:32 -0000
@@ -69,7 +69,8 @@
 	tmp = snd_akm4xxx_get(ak, 0, reg);
 	tmp &= ~(0x03 << shift);
 	tmp |= dfs << shift;
-	snd_akm4xxx_write(ak, 0, reg, tmp);
+	// snd_akm4xxx_write(ak, 0, reg, tmp);
+	snd_akm4xxx_set(ak, 0, reg, tmp); /* the value is written in reset(0) */
 	snd_akm4xxx_reset(ak, 0);
 }
 
@@ -134,7 +135,7 @@
 	}
 
 	/* second stage of initialization, analog parts and others */
-	ak = ice->akm = kmalloc(sizeof(akm4xxx_t) * 2, GFP_KERNEL);
+	ak = ice->akm = snd_kcalloc(sizeof(akm4xxx_t) * 2, GFP_KERNEL);
 	if (! ak)
 		return -ENOMEM;
 	ice->akm_codecs = 2;

  reply	other threads:[~2003-09-11  9:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E19xKBy-0005gx-00@sc8-sf-list2.sourceforge.net>
2003-09-11  6:26 ` M-Audio Revolution 7.1 card hangups Tom Watson
2003-09-11  9:20   ` Takashi Iwai [this message]
2003-09-11  6:41 Denis Sbragion
     [not found] <E19xB9b-00044R-00@sc8-sf-list2.sourceforge.net>
2003-09-10 21:37 ` Tom Watson
  -- strict thread matches above, loose matches on Subject: below --
2003-09-10 17:30 Tom Watson
2003-09-10 17:59 ` Takashi Iwai
     [not found]   ` <5.1.0.14.1.20030911083510.03a91120@pop3.infotecna.lcl>
2003-09-11  9:22     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h8yovbs0b.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=tsw@johana.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.