2009-04-17 21:54:14     Help: Add AC97 device for Blackfin?

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-04-17 21:54:14     Help: Add AC97 device for Blackfin?

Tony Liu (CHINA)

Message: 72809   

 

I'm working on WM9707 for Blackfin system.

 

Kernel Version: Linux version 2.6.28.9-ADI-2009R1-pre-svn6244

 

Step 1: Modify  sound/soc/blackfin   KConfig & Makefile to support WM9707

 

Step2: Add WM9707.c to  sound/soc/codec

 

             Add bf5xx-wm9707.c to sound/soc/blackfin

 

Step3: Modify bf5xx-sport.c suite for WM9707 AC97 link protocol.

 

Build the driver in kernel, start message as below:

 

[17179569.620000] Advanced Linux Sound Architecture Driver Version 1.0.18rc3.

[17179569.636000] ASoC version 0.13.2

[17179569.644000] bf5xx_ac97_probe funciton

[17179569.648000] dma rx:3 tx:4, err irq:11, regs:ffc00900

[17179569.672000] dma_alloc_init: dma_page @ 0x01869000 - 1024 pages at 0x01c00000

[17179569.676000] Enter sport_config_rx function

[17179569.680000] Enter sport_config_tx function

[17179569.684000] WM9707 SoC Audio Codec

[17179569.700000] asoc: AC97 <-> bf5xx-ac97 mapping ok

[17179569.704000] Msg: Register new pcm successful.

[17179569.708000] AC97 link successful.

[17179569.712000] AC97_VENDOR ID1 574d ID2 4c03.

[17179569.716000] Msg: Get WM9707 Vendor ID Successful.

[17179569.728000] Msg: Register WM9707 sound card successful.

[17179569.732000] ALSA device list:

[17179569.732000]   #0: Dummy 1

[17179569.736000]   #1: bf5xx-board (WM9707)

 

The driver read the Audio Codec VEndor ID successful. But in the /dev directory not found the device node(under 2008R1.5RC3 can get the device node under /dev ). Why?

 

cat /sys/devices/platform/soc-audio/codec_reg get the codec register & check is ok.

 

cat /proc/kmsg the get the information:

 

<7>[17179569.620000] device class 'sound': registering

<6>[17179569.620000] Advanced Linux Sound Architecture Driver Version 1.0.18rc3.

<7>[17179569.624000] device: 'timer': device_add

<7>[17179569.624000] PM: Adding info for No Bus:timer

<7>[17179569.624000] bus: 'platform': add driver snd_dummy

<7>[17179569.628000] Registering platform device 'snd_dummy.0'. Parent at platform

<7>[17179569.628000] device: 'snd_dummy.0': device_add

<7>[17179569.628000] bus: 'platform': add device snd_dummy.0

<7>[17179569.628000] PM: Adding info for platform:snd_dummy.0

<7>[17179569.628000] bus: 'platform': driver_probe_device: matched device snd_dummy.0 with driver snd_dummy

<7>[17179569.628000] bus: 'platform': really_probe: probing driver snd_dummy with device snd_dummy.0

<7>[17179569.628000] device: 'card0': device_add

<7>[17179569.628000] PM: Adding info for No Bus:card0

<7>[17179569.628000] device: 'pcmC0D0p': device_add

<7>[17179569.628000] PM: Adding info for No Bus:pcmC0D0p

<7>[17179569.632000] device: 'pcmC0D0c': device_add

<7>[17179569.632000] PM: Adding info for No Bus:pcmC0D0c

<7>[17179569.632000] device: 'dsp': device_add

<7>[17179569.632000] PM: Adding info for No Bus:dsp

<7>[17179569.632000] device: 'audio': device_add

<7>[17179569.632000] PM: Adding info for No Bus:audio

<7>[17179569.632000] device: 'controlC0': device_add

<7>[17179569.632000] PM: Adding info for No Bus:controlC0

<7>[17179569.636000] device: 'mixer': device_add

<7>[17179569.636000] PM: Adding info for No Bus:mixer

<7>[17179569.636000] driver: 'snd_dummy.0': driver_bound: bound to device 'snd_dummy'

<7>[17179569.636000] bus: 'platform': really_probe: bound device snd_dummy.0 to driver snd_dummy

<6>[17179569.636000] ASoC version 0.13.2

<7>[17179569.640000] bus: 'platform': add driver soc-audio

<7>[17179569.640000] Registering platform device 'soc-audio'. Parent at platform

<7>[17179569.640000] device: 'soc-audio': device_add

<7>[17179569.640000] bus: 'platform': add device soc-audio

<7>[17179569.640000] PM: Adding info for platform:soc-audio

<7>[17179569.640000] bus: 'platform': driver_probe_device: matched device soc-audio with driver soc-audio

<7>[17179569.644000] bus: 'platform': really_probe: probing driver soc-audio with device soc-audio

<6>[17179569.644000] bf5xx_ac97_probe funciton

<3>[17179569.648000] dma rx:3 tx:4, err irq:11, regs:ffc00900

<6>[17179569.672000] dma_alloc_init: dma_page @ 0x01869000 - 1024 pages at 0x01c00000

<6>[17179569.676000] Enter sport_config_rx function

<6>[17179569.680000] Enter sport_config_tx function

<6>[17179569.684000] WM9707 SoC Audio Codec

<6>[17179569.700000] asoc: AC97 <-> bf5xx-ac97 mapping ok

<6>[17179569.704000] Msg: Register new pcm successful.

<6>[17179569.708000] AC97 link successful.

<6>[17179569.712000] AC97_VENDOR ID1 574d ID2 4c03.

<6>[17179569.716000] Msg: Get WM9707 Vendor ID Successful.

<7>[17179569.720000] device: 'card1': device_add

<7>[17179569.720000] PM: Adding info for No Bus:card1

<7>[17179569.720000] device: 'pcmC1D0p': device_add

<7>[17179569.720000] PM: Adding info for No Bus:pcmC1D0p

<7>[17179569.720000] device: 'pcmC1D0c': device_add

<7>[17179569.720000] PM: Adding info for No Bus:pcmC1D0c

<7>[17179569.724000] device: 'dsp1': device_add

<7>[17179569.724000] PM: Adding info for No Bus:dsp1

<7>[17179569.724000] device: 'audio1': device_add

<7>[17179569.724000] PM: Adding info for No Bus:audio1

<7>[17179569.724000] device: 'controlC1': device_add

<7>[17179569.724000] PM: Adding info for No Bus:controlC1

<7>[17179569.724000] device: 'mixer1': device_add

<7>[17179569.724000] PM: Adding info for No Bus:mixer1

<6>[17179569.728000] Msg: Register WM9707 sound card successful.

<7>[17179569.732000] driver: 'soc-audio': driver_bound: bound to device 'soc-audio'

<7>[17179569.732000] bus: 'platform': really_probe: bound device soc-audio to driver soc-audio

<6>[17179569.732000] ALSA device list:

<6>[17179569.732000]   #0: Dummy 1

<6>[17179569.736000]   #1: bf5xx-board (WM9707)

 

 

Why & How to do?

 

Thanks!

 

 

 

 

 

 

 

QuoteReplyEditDelete

 

 

2009-04-19 22:51:36     Re: Help: Add AC97 device for Blackfin?

Cliff Cai (CHINA)

Message: 72829   

 

From your /proc/kmsg,everything is OK.

 

pcmC1D0p,pcmC1D0c,ControlC1,dsp1,mixer1....

 

 

 

Cliff

QuoteReplyEditDelete

 

 

2009-04-19 23:51:45     Re: Help: Add AC97 device for Blackfin?

Tony Liu (CHINA)

Message: 72831   

 

Dear Cliff ,thanks!

 

The new version bf5xx-ac97*.* created by you is very good!

 

 

QuoteReplyEditDelete

 

 

2009-04-20 07:53:25     Re: Help: Add AC97 device for Blackfin?

Robin Getz (UNITED STATES)

Message: 72865   

 

Tony:

 

You need to read the help for the "AC-97" Kconfig:

 

config SND_BF5XX_AC97

        tristate "SoC AC97 Audio for the ADI BF5xx chip"

        depends on BLACKFIN && SND_SOC

        help

          Say Y or M if you want to add support for codecs attached to

          the Blackfin SPORT (synchronous serial ports) interface in slot 16

          mode (pseudo AC97 interface).

          You will also need to select the audio interfaces to support below.

 

          Note:

          AC97 codecs which do not implment the slot-16 mode will not function

          properly with this driver. This driver is known to work with the

          Analog Devices line of AC97 codecs.

-------------

 

It is likely that this will never work with any other part, except the ADI codecs. For a short description of slot-16 - see the AD1885 datasheet:

 

  www.analog.com/static/imported-files/data_sheets/AD1885.pdf

 

-Robin

Attachments

    Outcomes