Skip to contentSkip to conversation

Wyse Winterm CS5535 Driver

DISCUSSION Darryl Bond 2 participants 5 messages Oct 31, 2007 – Nov 5, 2007

lore
Share & tools
lore
#0 lore raw

I have a Wyse S50 terminal that I am booting diskless. I have been trying to get sound working. The box has a cs5535 chipset.

After much fiddling in the kernel source (2.6.22.5 <http://2.6.22.5> ) I have been able to make it work. I'm not sure if it is a cs5535 problem as the code that fixes it is in ac97_pcm.c.

It would appear that the card is getting passed an unexpected rate. The function sound/pci/ac97/ac97_pcm.c snd_ac97_set_rate()
has a section:
case AC97_PCM_FRONT_DAC_RATE:
case AC97_PCM_LR_ADC_RATE:

if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRA) == 0) /* VRA */

                        if (rate != 48000 && rate != 96000)
                                 return -EINVAL;
               break;

If I use 'aplay wavfile' the rate passed to this function is 44100. I I changethe code to:
if (rate != 48000 && rate != 96000 && rate != 44100)

it plays but at a slightly incorrect rate.

If I use the Citrix ICA client (which is what I really want to work) the rate passed in is 8000. If I add 8000 to the test, it works, but is far too fast.

Any hints as to what I should try?

Regards
Darryl Bond
__________________________________________________________________________________
DISCLAIMER

The contents of this electronic message and any attachments are intended only for the addressee and may contain legally privileged, personal, sensitive or confidential information. If you are not the intended addressee, and have received this email, any transmission, distribution, downloading, printing or photocopying of the contents of this message or attachments is strictly prohibited. Any legal privilege or confidentiality attached to this message and attachments is not waived, lost or destroyed by reason of delivery to any person other than intended addressee. If you have received this message and are not the intended addressee you should notify the sender by return email and destroy all copies of the message and any attachments. Unless expressly attributed, the views expressed in this email do not necessarily represent the views of the company.

#1 lore raw

At Wed, 31 Oct 2007 11:08:06 +1000,

Quoted 15 lines · Darryl Bond

I have a Wyse S50 terminal that I am booting diskless. I have been trying to get sound working. The box has a cs5535 chipset.

After much fiddling in the kernel source (2.6.22.5 <http://2.6.22.5> ) I have been able to make it work. I'm not sure if it is a cs5535 problem as the code that fixes it is in ac97_pcm.c.

It would appear that the card is getting passed an unexpected rate. The function sound/pci/ac97/ac97_pcm.c snd_ac97_set_rate()
has a section:
case AC97_PCM_FRONT_DAC_RATE:
case AC97_PCM_LR_ADC_RATE:

if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRA) == 0) /* VRA */

Quoted 8 lines
                        if (rate != 48000 && rate != 96000)
                                 return -EINVAL;
               break;

If I use 'aplay wavfile' the rate passed to this function is 44100. I I changethe code to:
if (rate != 48000 && rate != 96000 && rate != 44100)

it plays but at a slightly incorrect rate.

Apparently your codec doesn't support VRA, so it cannot work except for 48kHz (or 96kHz in some cases). Usually other rates are converted via alsa-lib plugin. In the recent versions, the default PCM "default" does such conversions automagically (unless you specify explicitly the non-conversion, e.g., passing the device 'hw").

Takashi

#2 lore raw
Quoted 27 lines · Takashi Iwai

At Wed, 31 Oct 2007 11:08:06 +1000,

Quoted 14 lines · Darryl Bond

I have a Wyse S50 terminal that I am booting diskless. I have been trying to get sound working. The box has a cs5535 chipset.

After much fiddling in the kernel source (2.6.22.5 <http://2.6.22.5> ) I have been able to make it work. I'm not sure if it is a cs5535 problem as the code that fixes it is in ac97_pcm.c.

It would appear that the card is getting passed an unexpected rate. The function sound/pci/ac97/ac97_pcm.c snd_ac97_set_rate()
has a section:
case AC97_PCM_FRONT_DAC_RATE:
case AC97_PCM_LR_ADC_RATE:

if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRA) == 0) /* VRA */

Quoted 9 lines
                        if (rate != 48000 && rate != 96000)
                                 return -EINVAL;
               break;

If I use 'aplay wavfile' the rate passed to this function is 44100. I I changethe code to:
if (rate != 48000 && rate != 96000 && rate != 44100)

it plays but at a slightly incorrect rate.

Quoted 9 lines

Apparently your codec doesn't support VRA, so it cannot work except for 48kHz (or 96kHz in some cases). Usually other rates are converted via alsa-lib plugin. In the recent versions, the default PCM "default" does such conversions automagically (unless you specify explicitly the non-conversion, e.g., passing the device 'hw").

Takashi

The main application I need to run (Citrix ICA client) uses OSS sound. It works fine with other sound cards and drivers. In this case it passes 8000 to snd_ac97_set_rate().

Do I need to make sure that I have a recent Alsalibs? It would appear that I am using 1.0.10-0.
Does OSS use the alsalibs?

Darryl

__________________________________________________________________________________
DISCLAIMER

The contents of this electronic message and any attachments are intended only for the addressee and may contain legally privileged, personal, sensitive or confidential information. If you are not the intended addressee, and have received this email, any transmission, distribution, downloading, printing or photocopying of the contents of this message or attachments is strictly prohibited. Any legal privilege or confidentiality attached to this message and attachments is not waived, lost or destroyed by reason of delivery to any person other than intended addressee. If you have received this message and are not the intended addressee you should notify the sender by return email and destroy all copies of the message and any attachments. Unless expressly attributed, the views expressed in this email do not necessarily represent the views of the company.

#3 lore raw

At Thu, 01 Nov 2007 08:15:57 +1000,

Quoted 38 lines · Darryl Bond
Quoted 34 lines · Takashi Iwai

At Wed, 31 Oct 2007 11:08:06 +1000,

Quoted 14 lines · Darryl Bond

I have a Wyse S50 terminal that I am booting diskless. I have been trying to get sound working. The box has a cs5535 chipset.

After much fiddling in the kernel source (2.6.22.5 <http://2.6.22.5> ) I have been able to make it work. I'm not sure if it is a cs5535 problem as the code that fixes it is in ac97_pcm.c.

It would appear that the card is getting passed an unexpected rate. The function sound/pci/ac97/ac97_pcm.c snd_ac97_set_rate()
has a section:
case AC97_PCM_FRONT_DAC_RATE:
case AC97_PCM_LR_ADC_RATE:

if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRA) == 0) /* VRA */

Quoted 9 lines
                        if (rate != 48000 && rate != 96000)
                                 return -EINVAL;
               break;

If I use 'aplay wavfile' the rate passed to this function is 44100. I I changethe code to:
if (rate != 48000 && rate != 96000 && rate != 44100)

it plays but at a slightly incorrect rate.

Apparently your codec doesn't support VRA, so it cannot work except for 48kHz (or 96kHz in some cases). Usually other rates are converted via alsa-lib plugin. In the recent versions, the default PCM "default" does such conversions automagically (unless you specify explicitly the non-conversion, e.g., passing the device 'hw").

Quoted 5 lines
Quoted 2 lines

Takashi

The main application I need to run (Citrix ICA client) uses OSS sound. It works fine with other sound cards and drivers. In this case it passes 8000 to snd_ac97_set_rate().

OSS emulation also allows the automatic rate conversion, so it should work regardless whether the chip supports non-48kHz or not.

Quoted 3 lines

Do I need to make sure that I have a recent Alsalibs? It would appear that I am using 1.0.10-0.
Does OSS use the alsalibs?

Depends. If it's a user-space emulation, then yes. If it's a kerne-space emulation, then no.

Takashi

#4 lore raw
Quoted 58 lines · Takashi Iwai

At Thu, 01 Nov 2007 08:15:57 +1000,

Quoted 38 lines · Darryl Bond
Quoted 35 lines · Takashi Iwai

At Wed, 31 Oct 2007 11:08:06 +1000,

Quoted 14 lines · Darryl Bond

I have a Wyse S50 terminal that I am booting diskless. I have been trying to get sound working. The box has a cs5535 chipset.

After much fiddling in the kernel source (2.6.22.5 <http://2.6.22.5> ) I have been able to make it work. I'm not sure if it is a cs5535 problem as the code that fixes it is in ac97_pcm.c.

It would appear that the card is getting passed an unexpected rate. The function sound/pci/ac97/ac97_pcm.c snd_ac97_set_rate()
has a section:
case AC97_PCM_FRONT_DAC_RATE:
case AC97_PCM_LR_ADC_RATE:

if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRA) == 0) /* VRA */

Quoted 10 lines
                        if (rate != 48000 && rate != 96000)
                                 return -EINVAL;
               break;

If I use 'aplay wavfile' the rate passed to this function is 44100. I I changethe code to:
if (rate != 48000 && rate != 96000 && rate != 44100)

it plays but at a slightly incorrect rate.

Apparently your codec doesn't support VRA, so it cannot work except for 48kHz (or 96kHz in some cases). Usually other rates are converted via alsa-lib plugin. In the recent versions, the default PCM "default" does such conversions automagically (unless you specify explicitly the non-conversion, e.g., passing the device 'hw").

Quoted 7 lines
Quoted 3 lines

Takashi

The main application I need to run (Citrix ICA client) uses OSS sound. It works fine with other sound cards and drivers. In this case it passes 8000 to snd_ac97_set_rate().

OSS emulation also allows the automatic rate conversion, so it should work regardless whether the chip supports non-48kHz or not.

Quoted 4 lines

Do I need to make sure that I have a recent Alsalibs? It would appear that I am using 1.0.10-0.
Does OSS use the alsalibs?

Quoted 6 lines

Depends. If it's a user-space emulation, then yes. If it's a kerne-space emulation, then no.

Takashi

I updated the alsalibs to the latest version. There was no difference. Might be kernel emulation?
The alsa sound demo files are encoded at 48000Hz and work perfectly with the default kernel drivers etc. Anything encoded at any other rate does not. Your reference to the codec, does this mean the cs5535 driver? That is the only thing that is different with this terminal.
I boot many terminals with different sound cards with this boot image, the others work.

What do you suggest I do?

Regards
Darryl
__________________________________________________________________________________
DISCLAIMER

The contents of this electronic message and any attachments are intended only for the addressee and may contain legally privileged, personal, sensitive or confidential information. If you are not the intended addressee, and have received this email, any transmission, distribution, downloading, printing or photocopying of the contents of this message or attachments is strictly prohibited. Any legal privilege or confidentiality attached to this message and attachments is not waived, lost or destroyed by reason of delivery to any person other than intended addressee. If you have received this message and are not the intended addressee you should notify the sender by return email and destroy all copies of the message and any attachments. Unless expressly attributed, the views expressed in this email do not necessarily represent the views of the company.