From: Takashi Iwai <tiwai@suse.de>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: intel8x0 has stopped working.
Date: Fri, 06 Feb 2004 12:29:43 +0100 [thread overview]
Message-ID: <s5hekt88mzc.wl@alsa2.suse.de> (raw)
In-Reply-To: <4022C373.7060601@superbug.demon.co.uk>
[-- Attachment #1: Type: text/plain, Size: 880 bytes --]
At Thu, 05 Feb 2004 22:28:03 +0000,
James Courtier-Dutton wrote:
>
> I checked out a new anonymouse cvs of alsa-driver/alsa-kernel, applied
> your patch, and attach the output from doing modprobe snd-intel8x0.
>
> I can only see printf's in the patch, so I don't see how it could have
> fixes the VRA.
no, it doesn't fix yet.
> Feb 5 22:22:53 new kernel: determined VRA rates: 0xfe
> Feb 5 22:22:53 new kernel: determined VRA rates: 0xfe
> Feb 5 22:22:53 new kernel: determined SPDIF rates: 0xe0
> Feb 5 22:22:53 new kernel: determined SDAC rates: 0x80
> Feb 5 22:22:53 new kernel: determined LDAC rates: 0x80
here's the problem. surround and LFE DAC sample rates are not
detected properly.
i don't figure out yet why...
does the attached patch have influence? check the messages above.
(it doesn't contain the patch to ac97_pcm.c. it's not needed now.)
Takashi
[-- Attachment #2: Type: text/plain, Size: 4638 bytes --]
Index: alsa-kernel/pci/ac97/ac97_codec.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v
retrieving revision 1.107
diff -u -r1.107 ac97_codec.c
--- alsa-kernel/pci/ac97/ac97_codec.c 5 Feb 2004 11:30:02 -0000 1.107
+++ alsa-kernel/pci/ac97/ac97_codec.c 6 Feb 2004 11:26:41 -0000
@@ -1526,38 +1526,40 @@
return 0;
}
-static int snd_ac97_test_rate(ac97_t *ac97, int reg, int rate)
+static int snd_ac97_test_rate(ac97_t *ac97, int reg, int shadow_reg, int rate)
{
unsigned short val;
unsigned int tmp;
tmp = ((unsigned int)rate * ac97->bus->clock) / 48000;
snd_ac97_write_cache(ac97, reg, tmp & 0xffff);
+ if (shadow_reg)
+ snd_ac97_write_cache(ac97, shadow_reg, tmp & 0xffff);
val = snd_ac97_read(ac97, reg);
return val == (tmp & 0xffff);
}
-static void snd_ac97_determine_rates(ac97_t *ac97, int reg, unsigned int *r_result)
+static void snd_ac97_determine_rates(ac97_t *ac97, int reg, int shadow_reg, unsigned int *r_result)
{
unsigned int result = 0;
/* test a non-standard rate */
- if (snd_ac97_test_rate(ac97, reg, 11000))
+ if (snd_ac97_test_rate(ac97, reg, shadow_reg, 11000))
result |= SNDRV_PCM_RATE_CONTINUOUS;
/* let's try to obtain standard rates */
- if (snd_ac97_test_rate(ac97, reg, 8000))
+ if (snd_ac97_test_rate(ac97, reg, shadow_reg, 8000))
result |= SNDRV_PCM_RATE_8000;
- if (snd_ac97_test_rate(ac97, reg, 11025))
+ if (snd_ac97_test_rate(ac97, reg, shadow_reg, 11025))
result |= SNDRV_PCM_RATE_11025;
- if (snd_ac97_test_rate(ac97, reg, 16000))
+ if (snd_ac97_test_rate(ac97, reg, shadow_reg, 16000))
result |= SNDRV_PCM_RATE_16000;
- if (snd_ac97_test_rate(ac97, reg, 22050))
+ if (snd_ac97_test_rate(ac97, reg, shadow_reg, 22050))
result |= SNDRV_PCM_RATE_22050;
- if (snd_ac97_test_rate(ac97, reg, 32000))
+ if (snd_ac97_test_rate(ac97, reg, shadow_reg, 32000))
result |= SNDRV_PCM_RATE_32000;
- if (snd_ac97_test_rate(ac97, reg, 44100))
+ if (snd_ac97_test_rate(ac97, reg, shadow_reg, 44100))
result |= SNDRV_PCM_RATE_44100;
- if (snd_ac97_test_rate(ac97, reg, 48000))
+ if (snd_ac97_test_rate(ac97, reg, shadow_reg, 48000))
result |= SNDRV_PCM_RATE_48000;
*r_result = result;
}
@@ -1866,8 +1868,10 @@
if (ac97->ext_id & 0x0189) /* L/R, MIC, SDAC, LDAC VRA support */
snd_ac97_write_cache(ac97, AC97_EXTENDED_STATUS, ac97->ext_id & 0x0189);
if (ac97->ext_id & AC97_EI_VRA) { /* VRA support */
- snd_ac97_determine_rates(ac97, AC97_PCM_FRONT_DAC_RATE, &ac97->rates[AC97_RATES_FRONT_DAC]);
- snd_ac97_determine_rates(ac97, AC97_PCM_LR_ADC_RATE, &ac97->rates[AC97_RATES_ADC]);
+ snd_ac97_determine_rates(ac97, AC97_PCM_FRONT_DAC_RATE, 0, &ac97->rates[AC97_RATES_FRONT_DAC]);
+ printk(KERN_DEBUG "determined VRA rates: 0x%x\n", ac97->rates[AC97_RATES_FRONT_DAC]);
+ snd_ac97_determine_rates(ac97, AC97_PCM_LR_ADC_RATE, 0, &ac97->rates[AC97_RATES_ADC]);
+ printk(KERN_DEBUG "determined VRA rates: 0x%x\n", ac97->rates[AC97_RATES_ADC]);
} else {
ac97->rates[AC97_RATES_FRONT_DAC] = SNDRV_PCM_RATE_48000;
ac97->rates[AC97_RATES_ADC] = SNDRV_PCM_RATE_48000;
@@ -1882,19 +1886,23 @@
ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000 |
SNDRV_PCM_RATE_44100 |
SNDRV_PCM_RATE_32000;
+ printk(KERN_DEBUG "determined SPDIF rates: 0x%x\n", ac97->rates[AC97_RATES_SPDIF]);
}
if (ac97->ext_id & AC97_EI_VRM) { /* MIC VRA support */
- snd_ac97_determine_rates(ac97, AC97_PCM_MIC_ADC_RATE, &ac97->rates[AC97_RATES_MIC_ADC]);
+ snd_ac97_determine_rates(ac97, AC97_PCM_MIC_ADC_RATE, 0, &ac97->rates[AC97_RATES_MIC_ADC]);
+ printk(KERN_DEBUG "determined MIC rates: 0x%x\n", ac97->rates[AC97_RATES_MIC_ADC]);
} else {
ac97->rates[AC97_RATES_MIC_ADC] = SNDRV_PCM_RATE_48000;
}
if (ac97->ext_id & AC97_EI_SDAC) { /* SDAC support */
- snd_ac97_determine_rates(ac97, AC97_PCM_SURR_DAC_RATE, &ac97->rates[AC97_RATES_SURR_DAC]);
+ snd_ac97_determine_rates(ac97, AC97_PCM_SURR_DAC_RATE, AC97_PCM_FRONT_DAC_RATE, &ac97->rates[AC97_RATES_SURR_DAC]);
ac97->scaps |= AC97_SCAP_SURROUND_DAC;
+ printk(KERN_DEBUG "determined SDAC rates: 0x%x\n", ac97->rates[AC97_RATES_SURR_DAC]);
}
if (ac97->ext_id & AC97_EI_LDAC) { /* LDAC support */
- snd_ac97_determine_rates(ac97, AC97_PCM_LFE_DAC_RATE, &ac97->rates[AC97_RATES_LFE_DAC]);
+ snd_ac97_determine_rates(ac97, AC97_PCM_LFE_DAC_RATE, AC97_PCM_FRONT_DAC_RATE, &ac97->rates[AC97_RATES_LFE_DAC]);
ac97->scaps |= AC97_SCAP_CENTER_LFE_DAC;
+ printk(KERN_DEBUG "determined LDAC rates: 0x%x\n", ac97->rates[AC97_RATES_LFE_DAC]);
}
/* additional initializations */
if (bus->init)
next prev parent reply other threads:[~2004-02-06 11:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-02 17:41 intel8x0 has stopped working James Courtier-Dutton
2004-02-02 17:59 ` Takashi Iwai
2004-02-02 19:34 ` Prakash K. Cheemplavam
2004-02-02 19:42 ` James Courtier-Dutton
2004-02-02 23:12 ` [PATCH] Fixes: " James Courtier-Dutton
2004-02-03 16:22 ` Jaroslav Kysela
2004-02-03 22:21 ` James Courtier-Dutton
2004-02-05 11:01 ` Jaroslav Kysela
2004-02-05 19:15 ` Glenn Maynard
2004-02-05 19:25 ` Takashi Iwai
2004-02-05 19:38 ` Jaroslav Kysela
2004-02-05 19:58 ` Glenn Maynard
2004-02-05 20:44 ` James Courtier-Dutton
2004-02-04 19:35 ` Takashi Iwai
2004-02-04 23:03 ` James Courtier-Dutton
2004-02-05 18:49 ` Takashi Iwai
2004-02-05 19:42 ` Takashi Iwai
2004-02-05 22:28 ` James Courtier-Dutton
2004-02-06 11:29 ` Takashi Iwai [this message]
2004-02-06 20:05 ` James Courtier-Dutton
2004-02-09 10:56 ` 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=s5hekt88mzc.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=James@superbug.demon.co.uk \
--cc=alsa-devel@alsa-project.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox