All of lore.kernel.org
 help / color / mirror / Atom feed
* Fixes for identifying VT1617 codec and MSI-7142 mobo
@ 2005-08-07 18:41 Philip Prindeville
  2005-08-07 19:27 ` Sergey Vlasov
  0 siblings, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-07 18:41 UTC (permalink / raw)
  To: alsa-devel

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

Hi.

Can we please commit this minor fixes to the tree?  I've been
using them and they seem to work fine.

Thanks,

-Philip


[-- Attachment #2: vt1617.patch --]
[-- Type: text/x-patch, Size: 2518 bytes --]

*** alsa-kernel/pci/via82xx.c.bak	2005-05-27 04:10:18.000000000 -0600
--- alsa-kernel/pci/via82xx.c	2005-07-25 20:33:51.000000000 -0600
***************
*** 2174,2179 ****
--- 2174,2180 ----
  		{ .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 */
  		{ .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */
+ 		{ .vendor = 0x1462, .device = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */
  		{ .vendor = 0x147b, .device = 0x1401, .action = VIA_DXS_ENABLE }, /* ABIT KD7(-RAID) */
  		{ .vendor = 0x147b, .device = 0x1411, .action = VIA_DXS_ENABLE }, /* ABIT VA-20 */
  		{ .vendor = 0x147b, .device = 0x1413, .action = VIA_DXS_ENABLE }, /* ABIT KV8 Pro */
*** alsa-kernel/pci/ac97/ac97_codec.c.bak	2005-04-25 04:22:20.000000000 -0600
--- alsa-kernel/pci/ac97/ac97_codec.c	2005-07-29 21:46:21.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-07-29 22:55:50.000000000 -0600
***************
*** 558,563 ****
--- 558,573 ----
  }
  
  /*
+  * VT1617A codec
+  */
+ int patch_vt1617a(ac97_t * ac97)
+ {
+ 	ac97->ext_id |= AC97_EI_SPDIF;	/* force the detection of spdif */
+ 	ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000;
+ 	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-07-29 21:43:28.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);

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-07 18:41 Fixes for identifying VT1617 codec and MSI-7142 mobo Philip Prindeville
@ 2005-08-07 19:27 ` Sergey Vlasov
  2005-08-08 16:16   ` Philip Prindeville
  0 siblings, 1 reply; 25+ messages in thread
From: Sergey Vlasov @ 2005-08-07 19:27 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

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

On Sun, Aug 07, 2005 at 12:41:38PM -0600, Philip Prindeville wrote:
> Can we please commit this minor fixes to the tree?  I've been
> using them and they seem to work fine.
> 
> Thanks,
> 
> -Philip
> 

> *** alsa-kernel/pci/via82xx.c.bak	2005-05-27 04:10:18.000000000 -0600
> --- alsa-kernel/pci/via82xx.c	2005-07-25 20:33:51.000000000 -0600
> ***************
> *** 2174,2179 ****
> --- 2174,2180 ----
>   		{ .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 */
>   		{ .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */
> + 		{ .vendor = 0x1462, .device = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */

Did you try VIA_DXS_SRC instead?  If it works, it gives more
capabilities (any sample rate - not discrete values, and separate
sample rates for all 4 DXS channels).

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-07 19:27 ` Sergey Vlasov
@ 2005-08-08 16:16   ` Philip Prindeville
  2005-08-08 16:42     ` Takashi Iwai
  0 siblings, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-08 16:16 UTC (permalink / raw)
  To: Sergey Vlasov; +Cc: alsa-devel

Sergey Vlasov wrote:

>On Sun, Aug 07, 2005 at 12:41:38PM -0600, Philip Prindeville wrote:
>  
>
>>Can we please commit this minor fixes to the tree?  I've been
>>using them and they seem to work fine.
>>
>>Thanks,
>>
>>-Philip
>>
>>    
>>
>
>  
>
>>*** alsa-kernel/pci/via82xx.c.bak	2005-05-27 04:10:18.000000000 -0600
>>--- alsa-kernel/pci/via82xx.c	2005-07-25 20:33:51.000000000 -0600
>>***************
>>*** 2174,2179 ****
>>--- 2174,2180 ----
>>  		{ .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 */
>>  		{ .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */
>>+ 		{ .vendor = 0x1462, .device = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */
>>    
>>
>
>Did you try VIA_DXS_SRC instead?  If it works, it gives more
>capabilities (any sample rate - not discrete values, and separate
>sample rates for all 4 DXS channels).
>  
>

Ok.  I've built a new image that has that set (I've also added an entry
for the K8MM-ILSR which is an identical motherboard but missing
video).

How do I add the separate sample rates for the 4 DXS channels, and
how do I test all of this?

Thanks,

-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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-08 16:16   ` Philip Prindeville
@ 2005-08-08 16:42     ` Takashi Iwai
       [not found]       ` <42F8F69D.2050302@redfish-solutions.com>
  0 siblings, 1 reply; 25+ messages in thread
From: Takashi Iwai @ 2005-08-08 16:42 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: Sergey Vlasov, alsa-devel

At Mon, 08 Aug 2005 10:16:41 -0600,
Philip Prindeville wrote:
> 
> Sergey Vlasov wrote:
> 
> >On Sun, Aug 07, 2005 at 12:41:38PM -0600, Philip Prindeville wrote:
> >  
> >
> >>Can we please commit this minor fixes to the tree?  I've been
> >>using them and they seem to work fine.
> >>
> >>Thanks,
> >>
> >>-Philip
> >>
> >>    
> >>
> >
> >  
> >
> >>*** alsa-kernel/pci/via82xx.c.bak	2005-05-27 04:10:18.000000000 -0600
> >>--- alsa-kernel/pci/via82xx.c	2005-07-25 20:33:51.000000000 -0600
> >>***************
> >>*** 2174,2179 ****
> >>--- 2174,2180 ----
> >>  		{ .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 */
> >>  		{ .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */
> >>+ 		{ .vendor = 0x1462, .device = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */
> >>    
> >>
> >
> >Did you try VIA_DXS_SRC instead?  If it works, it gives more
> >capabilities (any sample rate - not discrete values, and separate
> >sample rates for all 4 DXS channels).
> >  
> >
> 
> Ok.  I've built a new image that has that set (I've also added an entry
> for the K8MM-ILSR which is an identical motherboard but missing
> video).
> 
> How do I add the separate sample rates for the 4 DXS channels, and
> how do I test all of this?

The best would be to prepare WAV files in different sapmle rates by
converting with sox.

I believe we can merge NO_VRA and SRC.  We've made them differently
just to be conservative.


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
       [not found]       ` <42F8F69D.2050302@redfish-solutions.com>
@ 2005-08-11 10:42         ` Takashi Iwai
  2005-08-11 19:21           ` Philip Prindeville
  0 siblings, 1 reply; 25+ messages in thread
From: Takashi Iwai @ 2005-08-11 10:42 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

At Tue, 09 Aug 2005 12:31:57 -0600,
Philip Prindeville wrote:
> 
> Takashi Iwai wrote:
> 
> >At Mon, 08 Aug 2005 10:16:41 -0600,
> >Philip Prindeville wrote:
> >  
> >
> >>Sergey Vlasov wrote:
> >>
> >>    
> >>
> >>>On Sun, Aug 07, 2005 at 12:41:38PM -0600, Philip Prindeville wrote:
> >>> 
> >>>
> >>>      
> >>>
> >>>>Can we please commit this minor fixes to the tree?  I've been
> >>>>using them and they seem to work fine.
> >>>>
> >>>>Thanks,
> >>>>
> >>>>-Philip
> >>>>
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>*** alsa-kernel/pci/via82xx.c.bak	2005-05-27 04:10:18.000000000 -0600
> >>>>--- alsa-kernel/pci/via82xx.c	2005-07-25 20:33:51.000000000 -0600
> >>>>***************
> >>>>*** 2174,2179 ****
> >>>>--- 2174,2180 ----
> >>>> 		{ .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 */
> >>>> 		{ .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */
> >>>>+ 		{ .vendor = 0x1462, .device = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>Did you try VIA_DXS_SRC instead?  If it works, it gives more
> >>>capabilities (any sample rate - not discrete values, and separate
> >>>sample rates for all 4 DXS channels).
> >>> 
> >>>
> >>>      
> >>>
> >>Ok.  I've built a new image that has that set (I've also added an entry
> >>for the K8MM-ILSR which is an identical motherboard but missing
> >>video).
> >>
> >>How do I add the separate sample rates for the 4 DXS channels, and
> >>how do I test all of this?
> >>    
> >>
> >
> >The best would be to prepare WAV files in different sapmle rates by
> >converting with sox.
> >
> >I believe we can merge NO_VRA and SRC.  We've made them differently
> >just to be conservative.
> >
> >
> >Takashi
> >  
> >
> 
> 
> Well, I'm a little stumped...  If I use "soundcard detection" on the 
> "lineout" jack,
> I can hear audio, but not on the SPDIF port.

Hmm, this sounds like an off-topic?  Does DXS_SRC work on your device?


>  However, when I use mplayer to
> play DVD's with:
> 
> -ao alsa:device=hw=0.1 -ac hwdts,hwac3,a52,pcm
> 
> then I get digital sound out the SPDIF just fine.

Don't do that.  The direct access to "hw" is not recommended at all
unless you know exactly what you're doing.
Use rather "spdif" PCM (aka "iec958").


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-11 10:42         ` Takashi Iwai
@ 2005-08-11 19:21           ` Philip Prindeville
  2005-08-12 14:40             ` Takashi Iwai
  0 siblings, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-11 19:21 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:

>At Tue, 09 Aug 2005 12:31:57 -0600,
>Philip Prindeville wrote:
>  
>
>>Takashi Iwai wrote:
>>
>>    
>>
>>>At Mon, 08 Aug 2005 10:16:41 -0600,
>>>Philip Prindeville wrote:
>>> 
>>>
>>>      
>>>
>>>>Sergey Vlasov wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>On Sun, Aug 07, 2005 at 12:41:38PM -0600, Philip Prindeville wrote:
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>Can we please commit this minor fixes to the tree?  I've been
>>>>>>using them and they seem to work fine.
>>>>>>
>>>>>>Thanks,
>>>>>>
>>>>>>-Philip
>>>>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>*** alsa-kernel/pci/via82xx.c.bak	2005-05-27 04:10:18.000000000 -0600
>>>>>>--- alsa-kernel/pci/via82xx.c	2005-07-25 20:33:51.000000000 -0600
>>>>>>***************
>>>>>>*** 2174,2179 ****
>>>>>>--- 2174,2180 ----
>>>>>>		{ .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 */
>>>>>>		{ .vendor = 0x1462, .device = 0x7120, .action = VIA_DXS_ENABLE }, /* MSI KT4V */
>>>>>>+ 		{ .vendor = 0x1462, .device = 0x7142, .action = VIA_DXS_ENABLE }, /* MSI K8MM-V */
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>Did you try VIA_DXS_SRC instead?  If it works, it gives more
>>>>>capabilities (any sample rate - not discrete values, and separate
>>>>>sample rates for all 4 DXS channels).
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Ok.  I've built a new image that has that set (I've also added an entry
>>>>for the K8MM-ILSR which is an identical motherboard but missing
>>>>video).
>>>>
>>>>How do I add the separate sample rates for the 4 DXS channels, and
>>>>how do I test all of this?
>>>>   
>>>>
>>>>        
>>>>
>>>The best would be to prepare WAV files in different sapmle rates by
>>>converting with sox.
>>>
>>>I believe we can merge NO_VRA and SRC.  We've made them differently
>>>just to be conservative.
>>>
>>>
>>>Takashi
>>> 
>>>
>>>      
>>>
>>Well, I'm a little stumped...  If I use "soundcard detection" on the 
>>"lineout" jack,
>>I can hear audio, but not on the SPDIF port.
>>    
>>
>
>Hmm, this sounds like an off-topic?  Does DXS_SRC work on your device?
>  
>

I tried:

aplay -v -D spdif /usr/share/system-config-soundcard/sound-sample.wav

and that worked ok (I got PCM sound out), but it was at 48kHz.  So I
tried with -D plug:spdif, and that was at the correct pitch...  But I'm
confused.  If I'm setting:

.action = VIA_DXS_SRC

and:

ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_CONTINUOUS;

shouldn't it be able to playback digitally at arbitrary rates?  What do 
I need
to change to get it to playback at 44100Hz for testing?


>  
>
>> However, when I use mplayer to
>>play DVD's with:
>>
>>-ao alsa:device=hw=0.1 -ac hwdts,hwac3,a52,pcm
>>
>>then I get digital sound out the SPDIF just fine.
>>    
>>
>
>Don't do that.  The direct access to "hw" is not recommended at all
>unless you know exactly what you're doing.
>Use rather "spdif" PCM (aka "iec958").
>
>
>Takashi
>  
>


Ok, I'll change this.  But what would the .asoundrc look like to default
everything through "spdif"?

Thanks,

-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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-11 19:21           ` Philip Prindeville
@ 2005-08-12 14:40             ` Takashi Iwai
  2005-08-12 14:49               ` Takashi Iwai
  2005-08-12 15:18               ` Philip Prindeville
  0 siblings, 2 replies; 25+ messages in thread
From: Takashi Iwai @ 2005-08-12 14:40 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

At Thu, 11 Aug 2005 13:21:56 -0600,
Philip Prindeville wrote:
> 
> I tried:
> 
> aplay -v -D spdif /usr/share/system-config-soundcard/sound-sample.wav
> 
> and that worked ok (I got PCM sound out), but it was at 48kHz.

Check /proc/asound/card0/pcm0p/sub3/hw_info whether it's really 48k.

>   So I
> tried with -D plug:spdif, and that was at the correct pitch...  But I'm
> confused.  If I'm setting:
> 
> .action = VIA_DXS_SRC
> 
> and:
> 
> ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_CONTINUOUS;
> 
> shouldn't it be able to playback digitally at arbitrary rates?

No.  SPDIF cannot play arbitrary rates.

> What do  I need
> to change to get it to playback at 44100Hz for testing?

It shoud work as it is.  Otherwise it's a bug.


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 14:40             ` Takashi Iwai
@ 2005-08-12 14:49               ` Takashi Iwai
  2005-08-12 17:08                 ` Philip Prindeville
  2005-08-12 15:18               ` Philip Prindeville
  1 sibling, 1 reply; 25+ messages in thread
From: Takashi Iwai @ 2005-08-12 14:49 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

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

At Fri, 12 Aug 2005 16:40:46 +0200,
私 wrote:
> 
> At Thu, 11 Aug 2005 13:21:56 -0600,
> Philip Prindeville wrote:
> > 
> > I tried:
> > 
> > aplay -v -D spdif /usr/share/system-config-soundcard/sound-sample.wav
> > 
> > and that worked ok (I got PCM sound out), but it was at 48kHz.
> 
> Check /proc/asound/card0/pcm0p/sub3/hw_info whether it's really 48k.
> 
> >   So I
> > tried with -D plug:spdif, and that was at the correct pitch...  But I'm
> > confused.  If I'm setting:
> > 
> > .action = VIA_DXS_SRC
> > 
> > and:
> > 
> > ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_CONTINUOUS;
> > 
> > shouldn't it be able to playback digitally at arbitrary rates?
> 
> No.  SPDIF cannot play arbitrary rates.
> 
> > What do  I need
> > to change to get it to playback at 44100Hz for testing?
> 
> It shoud work as it is.  Otherwise it's a bug.

Does the patch below fix your problem?


Takashi

[-- Attachment #2: Type: text/plain, Size: 861 bytes --]

Index: alsa-kernel/pci/via82xx.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/via82xx.c,v
retrieving revision 1.170
diff -u -r1.170 via82xx.c
--- alsa-kernel/pci/via82xx.c	3 Aug 2005 12:54:38 -0000	1.170
+++ alsa-kernel/pci/via82xx.c	12 Aug 2005 14:47:51 -0000
@@ -929,12 +929,12 @@
 
 	if ((rate_changed = via_lock_rate(&chip->rates[0], ac97_rate)) < 0)
 		return rate_changed;
-	if (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 (chip->spdif_on && viadev->reg_offset == 0x30)
+		snd_ac97_set_rate(chip->ac97, AC97_SPDIF, runtime->rate);
+
 	if (runtime->rate == 48000)
 		rbits = 0xfffff;
 	else

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 14:40             ` Takashi Iwai
  2005-08-12 14:49               ` Takashi Iwai
@ 2005-08-12 15:18               ` Philip Prindeville
  2005-08-12 15:26                 ` Lee Revell
  1 sibling, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-12 15:18 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:

>At Thu, 11 Aug 2005 13:21:56 -0600,
>Philip Prindeville wrote:
>  
>
>>I tried:
>>
>>aplay -v -D spdif /usr/share/system-config-soundcard/sound-sample.wav
>>
>>and that worked ok (I got PCM sound out), but it was at 48kHz.
>>    
>>
>
>Check /proc/asound/card0/pcm0p/sub3/hw_info whether it's really 48k.
>  
>

Yup:

access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 4096
buffer_size: 16384
tick_time: 1000


though I still don't understand why it would be that device and not 
pcm1p/sub0/
instead...

>  
>
>>  So I
>>tried with -D plug:spdif, and that was at the correct pitch...  But I'm
>>confused.  If I'm setting:
>>
>>.action = VIA_DXS_SRC
>>
>>and:
>>
>>ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_CONTINUOUS;
>>
>>shouldn't it be able to playback digitally at arbitrary rates?
>>    
>>
>
>No.  SPDIF cannot play arbitrary rates.
>  
>

But it can play 44100, right?


>>What do  I need
>>to change to get it to playback at 44100Hz for testing?
>>    
>>
>
>It shoud work as it is.  Otherwise it's a bug.
>
>
>Takashi
>  
>

I don't understand why it's device 0, subdevice 3.... instead of being
device 1, subdevice 0.

-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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 15:18               ` Philip Prindeville
@ 2005-08-12 15:26                 ` Lee Revell
  2005-08-12 15:28                   ` Philip Prindeville
                                     ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Lee Revell @ 2005-08-12 15:26 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: Takashi Iwai, alsa-devel

On Fri, 2005-08-12 at 09:18 -0600, Philip Prindeville wrote:
> I don't understand why it's device 0, subdevice 3.... instead of being
> device 1, subdevice 0.

Because you have one soundcard (VT1617) with multiple subdevices on it
(at least S/PDIF and analog).

Lee



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 15:26                 ` Lee Revell
@ 2005-08-12 15:28                   ` Philip Prindeville
  2005-08-12 15:29                   ` Philip Prindeville
  2005-08-12 15:33                   ` Takashi Iwai
  2 siblings, 0 replies; 25+ messages in thread
From: Philip Prindeville @ 2005-08-12 15:28 UTC (permalink / raw)
  To: Lee Revell; +Cc: Takashi Iwai, alsa-devel

Lee Revell wrote:

>On Fri, 2005-08-12 at 09:18 -0600, Philip Prindeville wrote:
>  
>
>>I don't understand why it's device 0, subdevice 3.... instead of being
>>device 1, subdevice 0.
>>    
>>
>
>Because you have one soundcard (VT1617) with multiple subdevices on it
>(at least S/PDIF and analog).
>
>Lee
>
>  
>

But that explains just having card 0.  The analog and digital portions are
separate devices, aren't they (on the same card)?

-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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 15:26                 ` Lee Revell
  2005-08-12 15:28                   ` Philip Prindeville
@ 2005-08-12 15:29                   ` Philip Prindeville
  2005-08-12 15:33                   ` Takashi Iwai
  2 siblings, 0 replies; 25+ messages in thread
From: Philip Prindeville @ 2005-08-12 15:29 UTC (permalink / raw)
  To: Lee Revell; +Cc: Takashi Iwai, alsa-devel

Lee Revell wrote:

>On Fri, 2005-08-12 at 09:18 -0600, Philip Prindeville wrote:
>  
>
>>I don't understand why it's device 0, subdevice 3.... instead of being
>>device 1, subdevice 0.
>>    
>>
>
>Because you have one soundcard (VT1617) with multiple subdevices on it
>(at least S/PDIF and analog).
>
>Lee
>
>  
>

Forgot to include:

[root@media SOURCES]# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: V8237 [VIA 8237], device 0: VIA 8237 [VIA 8237]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 0: V8237 [VIA 8237], device 1: VIA 8237 [VIA 8237]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[root@media SOURCES]#




-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 15:26                 ` Lee Revell
  2005-08-12 15:28                   ` Philip Prindeville
  2005-08-12 15:29                   ` Philip Prindeville
@ 2005-08-12 15:33                   ` Takashi Iwai
       [not found]                     ` <42FCD233.5010907@redfish-solutions.com>
  2 siblings, 1 reply; 25+ messages in thread
From: Takashi Iwai @ 2005-08-12 15:33 UTC (permalink / raw)
  To: Lee Revell; +Cc: Philip Prindeville, alsa-devel

At Fri, 12 Aug 2005 11:26:33 -0400,
Lee Revell wrote:
> 
> On Fri, 2005-08-12 at 09:18 -0600, Philip Prindeville wrote:
> > I don't understand why it's device 0, subdevice 3.... instead of being
> > device 1, subdevice 0.
> 
> Because you have one soundcard (VT1617) with multiple subdevices on it
> (at least S/PDIF and analog).

Well, the thing is a bit more complicated.

The device 0 is basically for DXS channels.  You can open multiple
streams with own DXS channel.  The fourth channel is a special one
which is used also for the dedicated SPDIF output when the register
bit is on.  That's why 0,3,0 is chosen for SPDIF.

The device 1 is for multi-channel outputs, i.e. 4.0 and 5.1 outputs.
This is an exclusive device, and the access to DXS channels are
disabled when this stream is used.  The SPDIF seems working casullay
with this device, too.


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
       [not found]                     ` <42FCD233.5010907@redfish-solutions.com>
@ 2005-08-12 16:52                       ` Takashi Iwai
  0 siblings, 0 replies; 25+ messages in thread
From: Takashi Iwai @ 2005-08-12 16:52 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

At Fri, 12 Aug 2005 10:45:39 -0600,
Philip Prindeville wrote:
> 
> Takashi Iwai wrote:
> 
> >At Fri, 12 Aug 2005 11:26:33 -0400,
> >Lee Revell wrote:
> >  
> >
> >>On Fri, 2005-08-12 at 09:18 -0600, Philip Prindeville wrote:
> >>    
> >>
> >>>I don't understand why it's device 0, subdevice 3.... instead of being
> >>>device 1, subdevice 0.
> >>>      
> >>>
> >>Because you have one soundcard (VT1617) with multiple subdevices on it
> >>(at least S/PDIF and analog).
> >>    
> >>
> >
> >Well, the thing is a bit more complicated.
> >
> >The device 0 is basically for DXS channels.  You can open multiple
> >streams with own DXS channel.  The fourth channel is a special one
> >which is used also for the dedicated SPDIF output when the register
> >bit is on.  That's why 0,3,0 is chosen for SPDIF.
> >
> >The device 1 is for multi-channel outputs, i.e. 4.0 and 5.1 outputs.
> >This is an exclusive device, and the access to DXS channels are
> >disabled when this stream is used.  The SPDIF seems working casullay
> >with this device, too.
> >
> >
> >Takashi
> >  
> >
> 
> Ok, last question...  I can't unload the "snd_via82xx" driver without 
> rebooting:
> 
> [root@media alsa-driver-1.0.9b]# lsmod | grep "^snd_via"
> snd_via82xx            35872  1
> [root@media alsa-driver-1.0.9b]# rmmod snd_via82xx
> ERROR: Module snd_via82xx is in use
> [root@media alsa-driver-1.0.9b]#
> 
> The use-count is 1, even though no modules are listed (on the right hand 
> side
> as having been associated with this module)...

It's totally off-topic :)

Check "fuser /dev/snd/pcmC0*" whether any devices are using the PCM.


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 14:49               ` Takashi Iwai
@ 2005-08-12 17:08                 ` Philip Prindeville
  2005-08-12 17:27                   ` Takashi Iwai
  0 siblings, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-12 17:08 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Well, this is what I get when I try the patch:

[root@media ~]# ./foo
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:spdif)
Hooks PCM
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 4096
period_time : 85333
tick_time : 1000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 4096
xfer_align : 4096
start_threshold : 16384
stop_threshold : 16384
silence_threshold: 0
silence_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 : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 4096
period_time : 85333
tick_time : 1000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 4096
xfer_align : 4096
start_threshold : 16384
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 4611686018427387904

access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 4096
buffer_size: 16384
tick_time: 1000
[root@media ~]#


I also noticed that it sounds like the first 200ms or so of sound is
being dropped consistently...

-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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 17:08                 ` Philip Prindeville
@ 2005-08-12 17:27                   ` Takashi Iwai
  2005-08-12 17:31                     ` Philip Prindeville
  0 siblings, 1 reply; 25+ messages in thread
From: Takashi Iwai @ 2005-08-12 17:27 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

At Fri, 12 Aug 2005 11:08:17 -0600,
Philip Prindeville wrote:
> 
> Well, this is what I get when I try the patch:

Hmm, what happens with "aplay -Dhw:0,0" ?
If this fails, the problem must be in the wrong DXS entry.


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 17:27                   ` Takashi Iwai
@ 2005-08-12 17:31                     ` Philip Prindeville
  2005-08-12 17:32                       ` Takashi Iwai
  0 siblings, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-12 17:31 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:

>At Fri, 12 Aug 2005 11:08:17 -0600,
>Philip Prindeville wrote:
>  
>
>>Well, this is what I get when I try the patch:
>>    
>>
>
>Hmm, what happens with "aplay -Dhw:0,0" ?
>If this fails, the problem must be in the wrong DXS entry.
>
>
>Takashi
>  
>

No sound at all.

-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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 17:31                     ` Philip Prindeville
@ 2005-08-12 17:32                       ` Takashi Iwai
  2005-08-12 17:38                         ` Philip Prindeville
  0 siblings, 1 reply; 25+ messages in thread
From: Takashi Iwai @ 2005-08-12 17:32 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

At Fri, 12 Aug 2005 11:31:19 -0600,
Philip Prindeville wrote:
> 
> Takashi Iwai wrote:
> 
> >At Fri, 12 Aug 2005 11:08:17 -0600,
> >Philip Prindeville wrote:
> >  
> >
> >>Well, this is what I get when I try the patch:
> >>    
> >>
> >
> >Hmm, what happens with "aplay -Dhw:0,0" ?
> >If this fails, the problem must be in the wrong DXS entry.
> >
> >
> >Takashi
> >  
> >
> 
> No sound at all.

This can't happen with a proper mixer setting if you can hear from
hw:0,1.

My question was whether aplay complains about the sample rate like
spdif PCM.


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 17:32                       ` Takashi Iwai
@ 2005-08-12 17:38                         ` Philip Prindeville
  2005-08-12 17:41                           ` Takashi Iwai
  0 siblings, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-12 17:38 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:

>At Fri, 12 Aug 2005 11:31:19 -0600,
>Philip Prindeville wrote:
>  
>
>>Takashi Iwai wrote:
>>
>>    
>>
>>>At Fri, 12 Aug 2005 11:08:17 -0600,
>>>Philip Prindeville wrote:
>>> 
>>>
>>>      
>>>
>>>>Well, this is what I get when I try the patch:
>>>>   
>>>>
>>>>        
>>>>
>>>Hmm, what happens with "aplay -Dhw:0,0" ?
>>>If this fails, the problem must be in the wrong DXS entry.
>>>
>>>
>>>Takashi
>>> 
>>>
>>>      
>>>
>>No sound at all.
>>    
>>
>
>This can't happen with a proper mixer setting if you can hear from
>hw:0,1.
>
>My question was whether aplay complains about the sample rate like
>spdif PCM.
>
>
>Takashi
>  
>

Actually, with "aplay -Dhw:0,1 ..." I don't hear any sound either.

BTW:  How does aplay detect which bitrates the card will support?  It keeps
telling me the card won't do 44100Hz:

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:spdif)
Hooks PCM

-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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 17:38                         ` Philip Prindeville
@ 2005-08-12 17:41                           ` Takashi Iwai
  2005-08-12 18:12                             ` Philip Prindeville
  0 siblings, 1 reply; 25+ messages in thread
From: Takashi Iwai @ 2005-08-12 17:41 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

At Fri, 12 Aug 2005 11:38:28 -0600,
Philip Prindeville wrote:
> 
> Takashi Iwai wrote:
> 
> >At Fri, 12 Aug 2005 11:31:19 -0600,
> >Philip Prindeville wrote:
> >  
> >
> >>Takashi Iwai wrote:
> >>
> >>    
> >>
> >>>At Fri, 12 Aug 2005 11:08:17 -0600,
> >>>Philip Prindeville wrote:
> >>> 
> >>>
> >>>      
> >>>
> >>>>Well, this is what I get when I try the patch:
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>Hmm, what happens with "aplay -Dhw:0,0" ?
> >>>If this fails, the problem must be in the wrong DXS entry.
> >>>
> >>>
> >>>Takashi
> >>> 
> >>>
> >>>      
> >>>
> >>No sound at all.
> >>    
> >>
> >
> >This can't happen with a proper mixer setting if you can hear from
> >hw:0,1.
> >
> >My question was whether aplay complains about the sample rate like
> >spdif PCM.
> >
> >
> >Takashi
> >  
> >
> 
> Actually, with "aplay -Dhw:0,1 ..." I don't hear any sound either.

Then it's a problem of mixer configuration or physical connection.
 
> BTW:  How does aplay detect which bitrates the card will support?

It checks the value of snd_pcm_hw_params_set_rate_near().

> It keeps
> telling me the card won't do 44100Hz:
> 
> 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:spdif)

Well I see this message in your ealier mail.  What about the result of
"aplay -Dhw0,0" regarding this?


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 17:41                           ` Takashi Iwai
@ 2005-08-12 18:12                             ` Philip Prindeville
  2005-08-12 18:29                               ` Takashi Iwai
  0 siblings, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-12 18:12 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:

>At Fri, 12 Aug 2005 11:38:28 -0600,
>Philip Prindeville wrote:
>  
>
>>Takashi Iwai wrote:
>>
>>    
>>
>>>At Fri, 12 Aug 2005 11:31:19 -0600,
>>>Philip Prindeville wrote:
>>> 
>>>
>>>      
>>>
>>>>Takashi Iwai wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>At Fri, 12 Aug 2005 11:08:17 -0600,
>>>>>Philip Prindeville wrote:
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>Well, this is what I get when I try the patch:
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>Hmm, what happens with "aplay -Dhw:0,0" ?
>>>>>If this fails, the problem must be in the wrong DXS entry.
>>>>>
>>>>>
>>>>>Takashi
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>No sound at all.
>>>>   
>>>>
>>>>        
>>>>
>>>This can't happen with a proper mixer setting if you can hear from
>>>hw:0,1.
>>>
>>>My question was whether aplay complains about the sample rate like
>>>spdif PCM.
>>>
>>>
>>>Takashi
>>> 
>>>
>>>      
>>>
>>Actually, with "aplay -Dhw:0,1 ..." I don't hear any sound either.
>>    
>>
>
>Then it's a problem of mixer configuration or physical connection.
>  
>

Ah, sorry...  Should I have been listening on an analogue input on
my receiver instead?  Ok, switched...  with -Dhw0,1 on an analogue
port (and keeping VIA_DXS_SRC) I hear signal.  My settings are:

[root@media ~]# amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 31 [100%] [on]
  Front Right: Playback 31 [100%] [on]
Simple mixer control 'Master Mono',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 31 [100%] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 22 [71%] [on]
  Front Right: Playback 22 [71%] [on]
Simple mixer control '3D Control - Center',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%]
Simple mixer control '3D Control - Depth',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%]
Simple mixer control '3D Control - Switch',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 23 [74%] [on]
  Front Right: Playback 23 [74%] [on]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 0 [0%] [off]
  Front Right: Playback 0 [0%] [off]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 0 [0%] [off]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 0 [0%] [off]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined 
cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 22 [71%] [on] Capture [off]
  Front Right: Playback 22 [71%] [on] Capture [off]
Simple mixer control 'CD',0
  Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined 
cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 22 [71%] [on] Capture [off]
  Front Right: Playback 22 [71%] [on] Capture [off]
Simple mixer control 'Mic',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch 
cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Mono
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono: Playback 0 [0%] [off]
  Front Left: Capture [on]
  Front Right: Capture [on]
Simple mixer control 'Mic Boost (+20dB)',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Mic Select',0
  Capabilities:
  Mono:
Simple mixer control 'Video',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'Phone',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch 
cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Mono
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono: Playback 22 [71%] [on]
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958 Output',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958 Playback AC97-SPSA',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Limits: 0 - 3
  Mono: 3 [100%]
Simple mixer control 'PC Speaker',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 15
  Mono: Playback 15 [100%] [on]
Simple mixer control 'Aux',0
  Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined 
cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 22 [71%] [on] Capture [off]
  Front Right: Playback 22 [71%] [on] Capture [off]
Simple mixer control 'Mono Output Select',0
  Capabilities:
  Mono:
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 15
  Front Left: Capture 0 [0%] [on]
  Front Right: Capture 0 [0%] [on]
Simple mixer control 'Mix',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'Mix Mono',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [off]
  Front Right: Capture [off]
Simple mixer control 'External Amplifier',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Input Source Select',0
  Capabilities:
  Mono:
Simple mixer control 'Input Source Select',1
  Capabilities:
  Mono:
[root@media ~]#

Also get signal with -Dhw0,0 on an analogue port...


(Still the same warning about the rate mismatch, though...)


> 
>  
>
>>BTW:  How does aplay detect which bitrates the card will support?
>>    
>>
>
>It checks the value of snd_pcm_hw_params_set_rate_near().
>  
>

I tried not changing ac97->rates[AC97_RATES_SPDIF] at all, but that
didn't make any difference...

 

>  
>
>>It keeps
>>telling me the card won't do 44100Hz:
>>
>>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:spdif)
>>    
>>
>
>Well I see this message in your ealier mail.  What about the result of
>"aplay -Dhw0,0" regarding this?
>
>
>Takashi
>  
>

Ditto:

[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

Its setup is:
stream       : PLAYBACK
access       : RW_INTERLEAVED
format       : S16_LE
subformat    : STD
channels     : 2
rate         : 48000
exact rate   : 48000 (48000/1)
msbits       : 16
buffer_size  : 16384
period_size  : 4096
period_time  : 85333
tick_time    : 1000
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 4096
xfer_align   : 4096
start_threshold  : 16384
stop_threshold   : 16384
silence_threshold: 0
silence_size : 0
boundary     : 4611686018427387904
[root@media ~]#





-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 18:12                             ` Philip Prindeville
@ 2005-08-12 18:29                               ` Takashi Iwai
  2005-08-12 19:37                                 ` Philip Prindeville
  0 siblings, 1 reply; 25+ messages in thread
From: Takashi Iwai @ 2005-08-12 18:29 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

At Fri, 12 Aug 2005 12:12:28 -0600,
Philip Prindeville wrote:
> 
> >Well I see this message in your ealier mail.  What about the result of
> >"aplay -Dhw0,0" regarding this?
> >
> >
> >Takashi
> >  
> >
> 
> Ditto:
> 
> [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

This means that dxs_support is still set to DXS_48K, not DXS_SRC as
expected.


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 18:29                               ` Takashi Iwai
@ 2005-08-12 19:37                                 ` Philip Prindeville
  2005-08-12 19:49                                   ` Philip Prindeville
  0 siblings, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-12 19:37 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:

>At Fri, 12 Aug 2005 12:12:28 -0600,
>Philip Prindeville wrote:
>  
>
>>>Well I see this message in your ealier mail.  What about the result of
>>>"aplay -Dhw0,0" regarding this?
>>>
>>>
>>>Takashi
>>> 
>>>
>>>      
>>>
>>Ditto:
>>
>>[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
>>    
>>
>
>This means that dxs_support is still set to DXS_48K, not DXS_SRC as
>expected.
>
>
>Takashi
>  
>

Zowie, you're right:

[root@media alsa]# lspci -v -n -s 0:11.5
00:11.5 Class 0401: 1106:3059 (rev 60)
        Subsystem: 1462:0430
        Flags: medium devsel, IRQ 185
        I/O ports at ec00 [size=256]
        Capabilities: [c0] Power Management version 2

[root@media alsa]#

So for whatever reason, the sound device has a different ID than the
motherboard...

via82xx: pci-id 0x1462:0x430
via82xx: Assuming DXS channels with 48k fixed sample rate.
         Please try dxs_support=1 or dxs_support=4 option
         and report if it works on your machine.

Ok, so I patched the PCI id, and now I'm not seeing the above warning
any more, but I *still* get:

[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
Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz)
         please, try the plug plugin (-Dplug:spdif)
Hooks PCM
...

But when I play hw:0,0 out an analogue port, it works:

[root@media alsa]# 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
Hardware PCM card 0 'VIA 8237' device 0 subdevice 0

Its setup is:
stream       : PLAYBACK
access       : RW_INTERLEAVED
format       : S16_LE
subformat    : STD
channels     : 2
rate         : 44100
exact rate   : 44100 (44100/1)
msbits       : 16
buffer_size  : 16384
period_size  : 4096
period_time  : 92879
tick_time    : 1000
tstamp_mode  : NONE
period_step  : 1
sleep_min    : 0
avail_min    : 4096
xfer_align   : 4096
start_threshold  : 16384
stop_threshold   : 16384
silence_threshold: 0
silence_size : 0
boundary     : 4611686018427387904
[root@media alsa]#


I took out the setting of the speed from patch_vt1617a:

+ int patch_vt1617a(ac97_t * ac97)
+ {
+       ac97->ext_id |= AC97_EI_SPDIF;  /* force the detection of spdif */
+       return 0;
+ }
+
+ /*

so now it defaults to 32kHz, 44.1kHz, and 48kHz....  no idea why playing
via -D spdif should fail, unless the config files in /etc/alsa/ are wrong.

-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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 19:37                                 ` Philip Prindeville
@ 2005-08-12 19:49                                   ` Philip Prindeville
  2005-08-15 12:35                                     ` Takashi Iwai
  0 siblings, 1 reply; 25+ messages in thread
From: Philip Prindeville @ 2005-08-12 19:49 UTC (permalink / raw)
  Cc: Takashi Iwai, alsa-devel

Philip Prindeville wrote:

> I took out the setting of the speed from patch_vt1617a:
>
> + int patch_vt1617a(ac97_t * ac97)
> + {
> +       ac97->ext_id |= AC97_EI_SPDIF;  /* force the detection of 
> spdif */
> +       return 0;
> + }
> +
> + /*
>
> so now it defaults to 32kHz, 44.1kHz, and 48kHz....  no idea why playing
> via -D spdif should fail, unless the config files in /etc/alsa/ are 
> wrong.
>
> -Philip


Sorry... wrong language.  It doesn't fail.  It continues to play, but at
48kHz and not at the desired 44.1kHz.

-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

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Fixes for identifying VT1617 codec and MSI-7142 mobo
  2005-08-12 19:49                                   ` Philip Prindeville
@ 2005-08-15 12:35                                     ` Takashi Iwai
  0 siblings, 0 replies; 25+ messages in thread
From: Takashi Iwai @ 2005-08-15 12:35 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: alsa-devel

At Fri, 12 Aug 2005 13:49:58 -0600,
Philip Prindeville wrote:
> 
> Philip Prindeville wrote:
> 
> > I took out the setting of the speed from patch_vt1617a:
> >
> > + int patch_vt1617a(ac97_t * ac97)
> > + {
> > +       ac97->ext_id |= AC97_EI_SPDIF;  /* force the detection of 
> > spdif */
> > +       return 0;
> > + }
> > +
> > + /*
> >
> > so now it defaults to 32kHz, 44.1kHz, and 48kHz....  no idea why playing
> > via -D spdif should fail, unless the config files in /etc/alsa/ are 
> > wrong.
> >
> > -Philip
> 
> 
> Sorry... wrong language.  It doesn't fail.  It continues to play, but at
> 48kHz and not at the desired 44.1kHz.

You need the patch I sent earlier.


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

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2005-08-15 12:35 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-07 18:41 Fixes for identifying VT1617 codec and MSI-7142 mobo Philip Prindeville
2005-08-07 19:27 ` Sergey Vlasov
2005-08-08 16:16   ` Philip Prindeville
2005-08-08 16:42     ` Takashi Iwai
     [not found]       ` <42F8F69D.2050302@redfish-solutions.com>
2005-08-11 10:42         ` Takashi Iwai
2005-08-11 19:21           ` Philip Prindeville
2005-08-12 14:40             ` Takashi Iwai
2005-08-12 14:49               ` Takashi Iwai
2005-08-12 17:08                 ` Philip Prindeville
2005-08-12 17:27                   ` Takashi Iwai
2005-08-12 17:31                     ` Philip Prindeville
2005-08-12 17:32                       ` Takashi Iwai
2005-08-12 17:38                         ` Philip Prindeville
2005-08-12 17:41                           ` Takashi Iwai
2005-08-12 18:12                             ` Philip Prindeville
2005-08-12 18:29                               ` Takashi Iwai
2005-08-12 19:37                                 ` Philip Prindeville
2005-08-12 19:49                                   ` Philip Prindeville
2005-08-15 12:35                                     ` Takashi Iwai
2005-08-12 15:18               ` Philip Prindeville
2005-08-12 15:26                 ` Lee Revell
2005-08-12 15:28                   ` Philip Prindeville
2005-08-12 15:29                   ` Philip Prindeville
2005-08-12 15:33                   ` Takashi Iwai
     [not found]                     ` <42FCD233.5010907@redfish-solutions.com>
2005-08-12 16:52                       ` Takashi Iwai

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.