[alsa-devel] about ALC203 linux driver
Hi all,
At present, there is a ALC203 AC97 codec in my Winbond ARM board, and I am programming the audio driver based on ALSA, Who can tell me whether the current ALSA is supporting the ALC203 driver?how to enable it?
Thanks!
On Sun, May 09, 2010 at 10:40:07PM +0800, Wan ZongShun wrote:
At present, there is a ALC203 AC97 codec in my Winbond ARM board, and I am programming the audio driver based on ALSA, Who can tell me whether the current ALSA is supporting the ALC203 driver?how to enable it?
You need a driver for the AC97 controller your system is using (for most ARM systems this is part of the CPU). Since AC97 provides a standard register interface for CODECs Linux does not require specific support for individual AC97 CODECs in order to get core functionality working.
You can check if there's any specific CODEC support in sound/pci/ac97.
Dear Mark,
2010/5/9 Mark Brown broonie@opensource.wolfsonmicro.com:
On Sun, May 09, 2010 at 10:40:07PM +0800, Wan ZongShun wrote:
At present, there is a ALC203 AC97 codec in my Winbond ARM board, and I am programming the audio driver based on ALSA, Who can tell me whether the current ALSA is supporting the ALC203 driver?how to enable it?
You need a driver for the AC97 controller your system is using (for most ARM systems this is part of the CPU). Since AC97 provides a standard register interface for CODECs Linux does not require specific support for individual AC97 CODECs in order to get core functionality working.
There is AC97 support for my chip, and I have implemented the nuc900_ac97.c ,nuc900_pcm.c and machine board c file drivers.The three main structure definitions as following:
static struct snd_soc_dai_link nuc900evb_ac97_dai = { .name = "AC97", .stream_name = "AC97 HiFi", .cpu_dai = &nuc900_ac97_dai, .codec_dai = &ac97_dai, };
static struct snd_soc_card nuc900evb_audio_machine = { .name = "NUC900EVB_AC97", .dai_link = &nuc900evb_ac97_dai, .num_links = 1, .platform = &nuc900_soc_platform, };
static struct snd_soc_device nuc900evb_ac97_devdata = { .card = &nuc900evb_audio_machine, .codec_dev = &soc_codec_dev_ac97, };
here, I used the file named ac97.c which is located in linux-2.6\sound\soc\codecs. I am sure that it can call the '\sound\pci\ac97ac97_codec.c' file and identify the ALC203 (like the log file shows 'nuc900 AC'97 codec is ALC203',but sometimes the return value by reading one AC97 register, which is not same as the writing value to the AC97 register, that is not my expected result, but sometimes they are same.
any suggestions?
You can check if there's any specific CODEC support in sound/pci/ac97.
On Sun, May 09, 2010 at 11:34:28PM +0800, Wan ZongShun wrote:
here, I used the file named ac97.c which is located in linux-2.6\sound\soc\codecs. I am sure that it can call the '\sound\pci\ac97ac97_codec.c' file and identify the ALC203 (like the log file shows 'nuc900 AC'97 codec is ALC203',but sometimes the return value by reading one AC97 register, which is not same as the writing value to the AC97 register, that is not my expected result, but sometimes they are same.
any suggestions?
Not all AC97 registers are writable so check that you're writing to registers that the CODEC supports writing to but in general you're going to need to debug your controller driver here. Make sure you're interacting well with any cache the controller has and that you are properly synchronising with the controller during reads (which are fairly slow operations on AC97).
Also make sure that the CODEC is properly clocked.
On Sun, May 09, 2010 at 11:34:28PM +0800, Wan ZongShun wrote:
Dear Mark,
2010/5/9 Mark Brown broonie@opensource.wolfsonmicro.com:
On Sun, May 09, 2010 at 10:40:07PM +0800, Wan ZongShun wrote:
At present, there is a ALC203 AC97 codec in my Winbond ARM board, and I am programming the audio driver based on ALSA, Who can tell me whether the current ALSA is supporting the ALC203 driver?how to enable it?
You need a driver for the AC97 controller your system is using (for most ARM systems this is part of the CPU). Since AC97 provides a standard register interface for CODECs Linux does not require specific support for individual AC97 CODECs in order to get core functionality working.
There is AC97 support for my chip, and I have implemented the nuc900_ac97.c ,nuc900_pcm.c and machine board c file drivers.The three main structure definitions as following:
does you SoC require any other configurations in other blocks that may aslo affect this, such as gpio configuratioon for the ac97 pins or some sort of clock setup?
participants (3)
-
Ben Dooks
-
Mark Brown
-
Wan ZongShun