Last set of diffs for vt1617, etc.
Ok, so these are the changes for the changed PCI id for the K8MM-V motherboard and the VT1617A codec.
I still get the warnings, however, about the device not being able to accept 44.1kHz audio and having to send it at 48kHz instead. I suspect that this is a configuration file issue instead.
I tried forcing the patch_vt1617a() routing to set:
ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100;
and it still complained about:
[root@media ~]# aplay -v -Dhw:0,0 /usr/share/system-config-soundcard/sound-sample.wav
Playing WAVE '/usr/share/system-config-soundcard/sound-sample.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz)
please, try the plug plugin (-Dplug:hw:0,0)
Hardware PCM card 0 'VIA 8237' device 0 subdevice 0
so that might be an orthogonal issue.
-Philip
*** alsa-kernel/pci/via82xx.c.bak 2005-05-27 04:10:18.000000000 -0600
--- alsa-kernel/pci/via82xx.c 2005-08-12 13:50:42.000000000 -0600
***************
*** 932,943 ****
if ((rate_changed = via_lock_rate(&chip->rates[0], ac97_rate)) < 0)
return rate_changed;
! if (rate_changed) {
snd_ac97_set_rate(chip->ac97, AC97_PCM_FRONT_DAC_RATE,
chip->no_vra ? 48000 : runtime->rate);
! snd_ac97_set_rate(chip->ac97, AC97_SPDIF,
! chip->no_vra ? 48000 : runtime->rate);
! }
if (runtime->rate == 48000)
rbits = 0xfffff;
else
--- 932,943 ----
if ((rate_changed = via_lock_rate(&chip->rates[0], ac97_rate)) < 0)
return rate_changed;
! if (rate_changed)
snd_ac97_set_rate(chip->ac97, AC97_PCM_FRONT_DAC_RATE,
chip->no_vra ? 48000 : runtime->rate);
! if (chip->spdif_on && viadev->reg_offset == 0x30)
! snd_ac97_set_rate(chip->ac97, AC97_SPDIF, runtime->rate);
!
if (runtime->rate == 48000)
rbits = 0xfffff;
else
***************
*** 2170,2175 ****
--- 2170,2176 ----
{ .vendor = 0x1297, .device = 0xc160, .action = VIA_DXS_ENABLE }, /* Shuttle SK41G */ { .vendor = 0x1458, .device = 0xa002, .action = VIA_DXS_ENABLE }, /* Gigabyte GA-7VAXP */ { .vendor = 0x1462, .device = 0x0080, .action = VIA_DXS_SRC }, /* MSI K8T Neo-FIS2R */
+ { .vendor = 0x1462, .device = 0x0430, .action = VIA_DXS_SRC }, /* MSI K8MM-V onboard audio */
{ .vendor = 0x1462, .device = 0x3800, .action = VIA_DXS_ENABLE }, /* MSI KT266 */ { .vendor = 0x1462, .device = 0x5901, .action = VIA_DXS_NO_VRA }, /* MSI KT6 Delta-SR */ { .vendor = 0x1462, .device = 0x7023, .action = VIA_DXS_NO_VRA }, /* MSI K8T Neo2-FI */
*** alsa-kernel/pci/ac97/ac97_codec.c.bak 2005-04-25 04:22:20.000000000 -0600
--- alsa-kernel/pci/ac97/ac97_codec.c 2005-08-11 12:56:59.000000000 -0600
***************
*** 157,162 ****
--- 157,163 ----
{ 0x54524123, 0xffffffff, "TR28602", NULL, NULL }, // only guess --jk [TR28023 = eMicro EM28023 (new CT1297)]
{ 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL },
{ 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF
+ { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF
{ 0x57454301, 0xffffffff, "W83971D", NULL, NULL },
{ 0x574d4c00, 0xffffffff, "WM9701A", NULL, NULL },
{ 0x574d4C03, 0xffffffff, "WM9703,WM9707,WM9708,WM9717", patch_wolfson03, NULL},
*** alsa-kernel/pci/ac97/ac97_patch.c.bak 2005-05-27 03:42:45.000000000 -0600
--- alsa-kernel/pci/ac97/ac97_patch.c 2005-08-12 17:45:05.000000000 -0600
***************
*** 558,563 ****
--- 558,572 ----
}
/*
+ * VT1617A codec
+ */
+ int patch_vt1617a(ac97_t * ac97)
+ {
+ ac97->ext_id |= AC97_EI_SPDIF; /* force the detection of spdif */
+ return 0;
+ }
+
+ /*
* Sigmatel STAC97xx codecs
*/
static int patch_sigmatel_stac9700_3d(ac97_t * ac97)
*** alsa-kernel/pci/ac97/ac97_patch.h.bak 2005-04-07 08:53:20.000000000 -0600
--- alsa-kernel/pci/ac97/ac97_patch.h 2005-08-11 12:56:59.000000000 -0600
***************
*** 56,60 ****
--- 56,61 ----
int patch_cm9761(ac97_t * ac97);
int patch_cm9780(ac97_t * ac97);
int patch_vt1616(ac97_t * ac97);
+ int patch_vt1617a(ac97_t * ac97);
int patch_it2646(ac97_t * ac97);
int mpatch_si3036(ac97_t * ac97);
At Sat, 13 Aug 2005 15:22:35 -0600,
Quoted 8 lines · Philip Prindeville
Ok, so these are the changes for the changed PCI id for the K8MM-V motherboard and the VT1617A codec.
I still get the warnings, however, about the device not being able to accept 44.1kHz audio and having to send it at 48kHz instead. I suspect that this is a configuration file issue instead.
Quoted 5 lines
I tried forcing the
patch_vt1617a()routing to set:ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100;and it still complained about:
The rates for SPDIF are detected in snd_ac97_determine_spdif_rates() regarless what you write in that part of patch.
It means that the codec really unlikely supports non-48k Hz for SPDIF, or a bug in snd_ac97_determine_spdif_rates() function.
Most of your patches are already in CVS. Please update your CVS tree and make a unified diff (-u) as a patch, togeter with signed-off-by line.
thanks,
Takashi
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
A message that is not in the archive (sent off-list or not yet received): [email protected]
At Mon, 15 Aug 2005 13:08:37 -0600,
Quoted 3 lines · Philip Prindeville
Even though I've run "aclocal" and "autoconf" previously. It seems it needs to be run every time???
No, once you update the tree and run cvscompile, you need to run only make after that.
Quoted 3 lines
And the version of
/usr/share/gettext/gettext.hon
FC3 isn't compatible withalsa-utils/include/gettext.hbecause the N_ macro isn't defined.
It's not that package. Did you install gettext-devel.rpm?
Quoted 9 lines
Not sure what the first paragraph is about.
So I've tried all of this, with the diffs attached, and I still have problems
playing 44.1kHz sound.The next question is, how do we go about figuring out if the codec doesn't like 44.1kHz, or if there really is a bug in
snd_ac97_determine_spdif_rates()?
Needs a datasheet.
As a test, you can add the line to force to reset the SPDIF_RATES value after the line calling snd_ac97_determine_spdif_rates(), and try aplay again.
Quoted 6 lines
Thanks,
-Philip
P.S. I've turned off "oss" in the diffs just because I'm trying to isolate ALSA.
Use "cvs diff". Also, use -u option to get the unified diff style.
Takashi
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Quoted 47 lines · Takashi Iwai
At Mon, 15 Aug 2005 13:08:37 -0600,
Quoted 4 lines · Philip Prindeville
Even though I've run "aclocal" and "autoconf" previously. It seems it needs to be run every time???
No, once you update the tree and run cvscompile, you need to run only make after that.
Quoted 5 lines
And the version of
/usr/share/gettext/gettext.hon
FC3 isn't compatible withalsa-utils/include/gettext.hbecause the N_ macro isn't defined.It's not that package. Did you install gettext-devel.rpm?
Quoted 9 lines
Not sure what the first paragraph is about.
So I've tried all of this, with the diffs attached, and I still have problems playing 44.1kHz sound.
The next question is, how do we go about figuring out if the codec doesn't like 44.1kHz, or if there really is a bug in
snd_ac97_determine_spdif_rates()?Needs a datasheet.
As a test, you can add the line to force to reset the
SPDIF_RATESvalue after the line callingsnd_ac97_determine_spdif_rates(), and try aplay again.Quoted 4 lines
Thanks,
-Philip
Quoted 10 lines
Quoted 3 lines
P.S. I've turned off "oss" in the diffs just because I'm trying to isolate ALSA.Use "cvs diff". Also, use -u option to get the unified diff style.
Takashi
I applied the following "patch":
[root@media alsa]# diff -u alsa-driver/pci/ac97/ac97_codec.c.bak alsa-driver/pci/ac97/ac97_codec.c
pci/ac97/ac97_codec.c 2005-08-17 17:57:01.000000000 -0600 renamed from pci/ac97/ac97_codec.c.bak 2005-08-15 10:27:41.000000000 -0600 +0 -0
@@ -1521,6 +1521,8 @@ /* consumer,PCM audio,no copyright,no
preemphasis,PCM coder,original,48000Hz */
snd_ac97_write_cache(ac97, AC97_SPDIF, 0x2a20);
ac97->rates[AC97_RATES_SPDIF] =
snd_ac97_determine_spdif_rates(ac97);
+// tweak...
+ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100;
}
ac97->spdif_status = SNDRV_PCM_DEFAULT_CON_SPDIF;
}[root@media alsa]#
and when I ran "aplay", this is what I got:
[root@media alsa]# aplay -v -D spdif /usr/share/system-config-soundcard/sound-sample.wav
Playing WAVE '/usr/share/system-config-soundcard/sound-sample.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Hooks PCM
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16buffer_size : 16384period_size : 4096period_time : 92879tick_time : 1000tstamp_mode : NONEperiod_step : 1sleep_min : 0avail_min : 4096xfer_align : 4096start_threshold : 16384stop_threshold : 16384silence_threshold: 0silence_size : 0
boundary : 4611686018427387904
Slave: Hardware PCM card 0 'VIA 8237' device 0 subdevice 3
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16buffer_size : 16384period_size : 4096period_time : 92879tick_time : 1000tstamp_mode : NONEperiod_step : 1sleep_min : 0avail_min : 4096xfer_align : 4096start_threshold : 16384stop_threshold : 16384silence_threshold: 0silence_size : 0
boundary : 4611686018427387904
[root@media alsa]#
However my receiver says "PCM [48kHz]" in the LED display.
I'm wondering if there might be other things that need to be changed as well... Config files?
-Philip
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
At Wed, 17 Aug 2005 18:06:58 -0600,
Quoted 141 lines · Philip Prindeville
Quoted 54 lines · Takashi Iwai
At Mon, 15 Aug 2005 13:08:37 -0600,
Quoted 4 lines · Philip Prindeville
Even though I've run "aclocal" and "autoconf" previously. It seems it needs to be run every time???
No, once you update the tree and run cvscompile, you need to run only make after that.
Quoted 5 lines
And the version of
/usr/share/gettext/gettext.hon
FC3 isn't compatible withalsa-utils/include/gettext.hbecause the N_ macro isn't defined.It's not that package. Did you install gettext-devel.rpm?
Quoted 11 lines
Not sure what the first paragraph is about.
So I've tried all of this, with the diffs attached, and I still have problems
playing 44.1kHz sound.The next question is, how do we go about figuring out if the codec doesn't like 44.1kHz, or if there really is a bug in
snd_ac97_determine_spdif_rates()?Needs a datasheet.
As a test, you can add the line to force to reset the
SPDIF_RATESvalue after the line callingsnd_ac97_determine_spdif_rates(), and try aplay again.Quoted 8 lines
Thanks,
-Philip
P.S. I've turned off "oss" in the diffs just because I'm trying to isolate ALSA.Quoted 6 lines
Use "cvs diff". Also, use -u option to get the unified diff style.
Takashi
I applied the following "patch":
[root@media alsa]# diff -u alsa-driver/pci/ac97/ac97_codec.c.bak
alsa-driver/pci/ac97/ac97_codec.c
--- alsa-driver/pci/ac97/ac97_codec.c.bak 2005-08-15
10:27:41.000000000 -0600
+++alsa-driver/pci/ac97/ac97_codec.c2005-08-17 17:57:01.000000000 -0600pci/ac97/ac97_codec.c 2005-08-17 17:57:01.000000000 -0600 renamed from pci/ac97/ac97_codec.c.bak 2005-08-15 10:27:41.000000000 -0600 +0
-0@@ -1521,6 +1521,8 @@ /* consumer,PCM audio,no copyright,nopreemphasis,PCM coder,original,48000Hz */
snd_ac97_write_cache(ac97, AC97_SPDIF, 0x2a20); ac97->rates[AC97_RATES_SPDIF] =
snd_ac97_determine_spdif_rates(ac97);(quoted diff) +2
-0+// tweak... +ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100; } ac97->spdif_status = SNDRV_PCM_DEFAULT_CON_SPDIF; }[root@media alsa]#
and when I ran "aplay", this is what I got:
[root@media alsa]# aplay -v -D spdif
/usr/share/system-config-soundcard/sound-sample.wavPlaying WAVE '/usr/share/system-config-soundcard/sound-sample.wav' :
Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Hooks PCM
Its setup is:
stream : PLAYBACK
access :RW_INTERLEAVED
format :S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16buffer_size: 16384period_size: 4096period_time: 92879tick_time: 1000tstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 4096xfer_align: 4096start_threshold: 16384stop_threshold: 16384silence_threshold: 0silence_size: 0
boundary : 4611686018427387904
Slave: Hardware PCM card 0 'VIA 8237' device 0 subdevice 3Its setup is:
stream : PLAYBACK
access :RW_INTERLEAVED
format :S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16buffer_size: 16384period_size: 4096period_time: 92879tick_time: 1000tstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 4096xfer_align: 4096start_threshold: 16384stop_threshold: 16384silence_threshold: 0silence_size: 0
boundary : 4611686018427387904
[root@media alsa]#
Quoted 4 lines
However my receiver says "PCM [48kHz]" in the LED display.
I'm wondering if there might be other things that need to be changed as well... Config files?
No, I think the codec simply doesn't support non-48k...
Takashi
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf