[alsa-devel] [PATCH] ice1724 MIDI on PHASE 22 and PHASE 28 and a few minor fixes

Takashi Iwai tiwai at suse.de
Fri Aug 29 15:54:26 CEST 2008


At Fri, 29 Aug 2008 13:04:06 +0200,
I wrote:
> 
> At Thu, 28 Aug 2008 18:50:15 +0200,
> =?UTF-8?Q?Vedran_Mileti=C4=87?= wrote:
> > 
> > Hopefully this is it.
> 
> Sorry, no.  It's broken.  I guess you edited the patch manually?
> Regenerate the patch via git diff please.
> 
> > BTW, while at it, let's fix one more thing. In jack, this card (PHASE
> > 22) shows playback_1, playback_2, playback_3...playback_8. Last 6 are
> > useless because this card has only two analog outputs. They really
> > don't output anywhere. I would say that it's probably that PHASE 22
> > and PHASE 28 share that part of code, while they shouldn't.
> > 
> > Can you point to the code which creates those devices?
> 
> ice1724.c.

More to follow, the patch below might fix the problem.


Takashi

diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index 60119d2..7bb99df 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -942,7 +942,7 @@ static int snd_vt1724_playback_pro_open(struct snd_pcm_substream *substream)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct snd_ice1712 *ice = snd_pcm_substream_chip(substream);
-	int chs;
+	int chs, num_indeps;
 
 	runtime->private_data = (void *)&vt1724_playback_pro_reg;
 	ice->playback_pro_substream = substream;
@@ -952,7 +952,8 @@ static int snd_vt1724_playback_pro_open(struct snd_pcm_substream *substream)
 	set_rate_constraints(ice, substream);
 	mutex_lock(&ice->open_mutex);
 	/* calculate the currently available channels */
-	for (chs = 0; chs < 3; chs++) {
+	num_indeps = ice->num_total_dacs / 2 - 1;
+	for (chs = 0; chs < num_indeps; chs++) {
 		if (ice->pcm_reserved[chs])
 			break;
 	}


More information about the Alsa-devel mailing list