From: Ulrik Kjems Subject: Writing an ASoC codec driver for Beaglebone McASP Date: Wed, 25 Apr 2012 14:20:41 +0100 (BST) Message-ID: <1335360041.4047.YahooMailNeo@web132406.mail.ird.yahoo.com> Reply-To: Ulrik Kjems Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from nm7-vm0.bullet.mail.ird.yahoo.com (nm7-vm0.bullet.mail.ird.yahoo.com [77.238.189.222]) by alsa0.perex.cz (Postfix) with SMTP id 90D8F104933 for ; Wed, 25 Apr 2012 15:20:42 +0200 (CEST) References: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: "alsa-devel@alsa-project.org" List-Id: alsa-devel@alsa-project.org I am working on connecting audio from the beaglebone McASP to a codec on an= eval board, supporting a general TDM format. I know for sure the setup is = viable because I have the system running in a bare-metal configuration usin= g Starterware. I want to make it work under Linux ALSA/ASoC. I am willing t= o share the source code if anyone is interested in working on this as well. To do this I need to configure/write a driver for ALSA/ASoC, and my goal is= to be able to perform multi-channel sound capture and playback using ALSA. The current kernel (3.2.14) davinci platform driver (davinci-evm.c) apparan= tly supports TI's AM3358 EVM board, which uses the same ARM3358 Sitara proc= essor as the Beaglebone. The EVM board uses a similar (but not identical) M= cASP config (and a TLV320AIC3x codec, I believe). When booting the kernel on the Beaglebone the ALSA driver fails to register= with the McASP. = I can see in soc-core.c around line 825 that four client devices must be fo= und: codec, codec_dai, platform, and platform_dai. By modifying sound/soc/d= avinci/davinci-evm.c to reflect the fact that for beaglebone McASP 0 is bei= ng used (as opposed to the EVM board where mcasp 1 is in use), I can make t= he platform register: static struct snd_soc_dai_link am335x_evm_dai =3D { =A0=A0=A0 .name =3D "TLV320AIC3X", =A0=A0=A0 .stream_name =3D "AIC3X", =A0=A0=A0 //=A0=A0=A0 .cpu_dai_name =3D "davinci-mcasp.1",=A0=A0 = =A0=A0=A0 .cpu_dai_name =3D "davinci-mcasp.0",=A0 // <<<<<<