All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Please help in adding ams-delta support to ASoC
Date: Wed, 27 May 2009 16:52:46 +0200	[thread overview]
Message-ID: <4A1D53BE.6040805@tis.icnet.pl> (raw)
In-Reply-To: <20090527104711.GA1970@sirena.org.uk>

Hi Mark,

On Wed, May 27, 2009 at 12:47, Mark Brown wrote:
> On Tue, May 26, 2009 at 03:17:23PM +0200, Janusz Krzysztofik wrote:
>> ... aplay  
>> and arecord wait forever, cat to/from /dev/dsp breaks with hardware  
> Do they really wait for ever or do they eventually time out?  The
> default for both programs is to give up after 10 seconds if there's no
> DMA happening.

That was more than 10 seconds for sure.

> ... A few comments below.
> 
>> +#include <sound/ac97_codec.h>
>> +#include <sound/initval.h>
>> +#include <sound/soc.h>
>> +
>> +#include "cx20442.h"
> 
> Shouldn't need ac97_codec.h if it's not an AC97 CODEC.

Yes, I am going to clean up the code if it ever starts working.

>> +static int cx20442_soc_probe(struct platform_device *pdev)
>> +{
>> +	struct snd_soc_device *socdev = platform_get_drvdata(pdev);
>> +	struct snd_soc_codec *codec;
>> +	int ret = 0;
>> +
>> +	codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL);
>> +	if (codec == NULL)
>> +		return -ENOMEM;
>> +	mutex_init(&codec->mutex);
>> +	codec->name = "CX20442";
>> +	codec->owner = THIS_MODULE;
>> +	codec->dai = &cx20442_dai;
>> +	codec->num_dai = 1;
> 
> It'd be nice to switch this over to registering the CODEC as a platform
> device rather than using the old style ASoC probing - see something line
> WM8731 for a relatively simple example.

OK, I'll follow it.

>> +MODULE_DESCRIPTION("ASoC cx20442 driver");
>> +MODULE_AUTHOR("Cliff Cai ");
> 
> You possibly want to update this one :)

Sure.

> Basically, the CODEC driver looks fine from an ASoC point of view.

Fine.

>> +/*
>> + * File:         sound/soc/codec/cx20442.h
>> + * Based on:     sound/soc/codec/ad73311.h
>> + * Author:       Cliff Cai <cliff.cai@analog.com>
>> + *
>> + * Created:      Thur Sep 25, 2008
>> + * Description:  definitions for cx20442 registers
>> + *
>> + *
>> + * Modified:
>> + *               Copyright 2006 Analog Devices Inc.
>> + *
>> + * Bugs:         Enter bugs at http://blackfin.uclinux.org/
> 
> These comments have cut'n'paste issues too, and the register definitions
> should all be removed.

Yes, only extern struct declarations required here, I think.

>> +static int ams_delta_startup(struct snd_pcm_substream *substream)
>> +{
>> +	ams_delta_latch2_write(AMS_DELTA_LATCH2_MODEM_CODEC, 0);
>> +	return clk_enable(cx20442_mclk);
>> +}
>> +
>> +static void ams_delta_shutdown(struct snd_pcm_substream *substream)
>> +{
>> +	clk_disable(cx20442_mclk);
> 
> Possibly not an issue with this device but you might want to move the
> MCLK handling to your machine set_bias_level() function.  That will
> mean that your MCLK will be left running for a while after audio stops,
> ensuring that the DAC has had time to clock out the final sample.
> Without that sometimes you can end up causing an audible artefact when
> starting the next playback.

OK, I'll look at this, but first I have to learn what MCLK really is ;)

Thanks,
Janusz

  reply	other threads:[~2009-05-27 14:52 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 13:17 Please help in adding ams-delta support to ASoC Janusz Krzysztofik
2009-05-27  5:57 ` Peter Ujfalusi
2009-05-27 13:07   ` Janusz Krzysztofik
2009-06-02  5:47     ` Peter Ujfalusi
2009-06-02 11:38       ` Janusz Krzysztofik
2009-05-27  6:59 ` Jarkko Nikula
2009-05-27 14:33   ` Janusz Krzysztofik
2009-05-27 15:19     ` Jarkko Nikula
2009-05-27 15:19     ` Jarkko Nikula
2009-05-27 14:33   ` Janusz Krzysztofik
2009-05-27 18:58   ` Janusz Krzysztofik
2009-06-01 12:41     ` Janusz Krzysztofik
2009-06-01 12:41     ` Janusz Krzysztofik
2009-06-01 18:04       ` Jarkko Nikula
2009-06-02  6:08         ` Peter Ujfalusi
2009-06-02  6:08         ` Peter Ujfalusi
2009-06-02  6:22         ` Jarkko Nikula
2009-06-02 13:35           ` Janusz Krzysztofik
2009-06-02 17:32             ` Jarkko Nikula
2009-06-03  7:24               ` Janusz Krzysztofik
2009-06-05 13:55                 ` Jarkko Nikula
2009-06-05 13:55                 ` Jarkko Nikula
2009-06-05 22:28                   ` Janusz Krzysztofik
2009-06-05 22:45                     ` [alsa-devel] " Mark Brown
2009-06-06 17:42                       ` Janusz Krzysztofik
2009-06-07  9:40                         ` Mark Brown
2009-06-09  7:12                         ` Peter Ujfalusi
2009-06-09 15:17                           ` [alsa-devel] " Janusz Krzysztofik
2009-06-10  8:12                             ` Peter Ujfalusi
2009-06-10 10:27                               ` [alsa-devel] " Janusz Krzysztofik
2009-06-10 10:53                                 ` Peter Ujfalusi
2009-06-10 10:53                                 ` [alsa-devel] " Peter Ujfalusi
2009-06-10 12:20                                   ` Janusz Krzysztofik
2009-06-10 12:20                                   ` [alsa-devel] " Janusz Krzysztofik
2009-06-10 18:05                                   ` Janusz Krzysztofik
2009-06-10 18:05                                   ` Janusz Krzysztofik
2009-06-10 10:27                               ` Janusz Krzysztofik
2009-06-10 14:20                             ` [alsa-devel] " Janusz Krzysztofik
2009-06-10 14:20                             ` Janusz Krzysztofik
2009-06-08  6:40                     ` Jarkko Nikula
2009-06-09 15:00                       ` Janusz Krzysztofik
2009-06-09 15:00                       ` Janusz Krzysztofik
2009-06-15 13:22                         ` Janusz Krzysztofik
2009-06-15 13:22                         ` Janusz Krzysztofik
2009-06-15 15:16                           ` Jarkko Nikula
2009-06-16 14:43                             ` Janusz Krzysztofik
2009-06-17 14:12                               ` Progress in adding ams-delta support to ASoC? Janusz Krzysztofik
2009-06-18  9:02                                 ` Peter Ujfalusi
2009-06-18  9:02                                 ` Peter Ujfalusi
2009-06-18  7:58                                   ` Tony Lindgren
2009-06-18  7:58                                   ` Tony Lindgren
2009-06-18 11:51                                     ` Janusz Krzysztofik
2009-06-18 11:51                                     ` Janusz Krzysztofik
2009-06-18 10:21                                       ` Tony Lindgren
2009-06-18 10:21                                       ` Tony Lindgren
2009-06-17 14:12                               ` Janusz Krzysztofik
2009-06-18  6:07                               ` Please help in adding ams-delta support to ASoC Jarkko Nikula
2009-06-18 11:40                                 ` Janusz Krzysztofik
2009-06-19  3:50                                   ` Arun K S
2009-06-19 11:20                                     ` Janusz Krzysztofik
2009-06-19 11:20                                     ` Janusz Krzysztofik
2009-06-19 18:55                                       ` Arun K S
2009-06-19 18:55                                       ` Arun K S
2009-06-19  3:50                                   ` Arun K S
2009-06-22 11:47                                   ` Jarkko Nikula
2009-06-22 11:47                                   ` Jarkko Nikula
2009-06-23 11:58                                     ` Janusz Krzysztofik
2009-06-23 11:58                                     ` Janusz Krzysztofik
2009-06-18 11:40                                 ` Janusz Krzysztofik
2009-06-18  6:07                               ` Jarkko Nikula
2009-06-16 14:43                             ` Janusz Krzysztofik
2009-06-15 15:16                           ` Jarkko Nikula
2009-06-08  6:40                     ` Jarkko Nikula
2009-06-05 22:28                   ` Janusz Krzysztofik
2009-06-02 17:32             ` Jarkko Nikula
2009-06-02 10:50         ` *SPAM* " Janusz Krzysztofik
2009-06-03  5:28           ` Peter Ujfalusi
2009-06-03  8:28             ` Janusz Krzysztofik
2009-06-03  8:28             ` Janusz Krzysztofik
2009-06-03  5:28           ` Peter Ujfalusi
2009-06-02 10:50         ` Janusz Krzysztofik
2009-06-01 18:04       ` Jarkko Nikula
2009-05-27 18:58   ` Janusz Krzysztofik
2009-05-27 10:47 ` Mark Brown
2009-05-27 14:52   ` Janusz Krzysztofik [this message]
2009-06-02  7:24   ` Janusz Krzysztofik
2009-06-02  9:37     ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2009-05-26 13:17 Janusz Krzysztofik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1D53BE.6040805@tis.icnet.pl \
    --to=jkrzyszt@tis.icnet.pl \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=postmaster@icnet.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.