From: Matt Flax <flatmax@flatmax.org>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH] ASoc: wm8580: Add the wm8581 codec to the driver
Date: Thu, 20 Oct 2016 10:22:53 +1100 [thread overview]
Message-ID: <b023d208-c97c-fd51-303e-a9480e51719c@flatmax.org> (raw)
In-Reply-To: <20161019092227.GJ3207@localhost.localdomain>
On 19/10/16 20:22, Charles Keepax wrote:
> On Wed, Oct 19, 2016 at 05:24:35AM +1100, Matt Flax wrote:
>> This patch adds support for the wm8581 codec to the wm8580 driver.
>> The wm8581 codec hardware adds a fourth DAC and otherwise is
>> compatible with the wm8580 codec.
>>
>> of_device_id data is used to allow the driver to select the
>> suitable DAC count specified in the device tree codec selection.
>> The wm8580_driver_data struct is used to store the number of DACs.
>>
>> The snd_soc_dai_driver no longer lists the channels_max for the
>> playback substream. This variable is set during the i2c probe
>> from the of_device_id supplied wm8580_driver_data struct.
>>
>> With knowledge of the number of DACs in use, the DAC4 controls,
>> widgets and routes are added as required for DAC4.
>>
>> The device tree documentation for the wm8580 is altered to list
>> the wm8581 codec support, as is the Kconfig file.
>>
>> Signed-off-by: Matt Flax <flatmax@flatmax.org>
>> ---
> When doing a respin of a patch its usually considered good
> practice to do something like [PATCH v2] in the subject line,
> lets people clearly see that its a new version not a resend.
OK - I see that I should use in-reply-to with the message id next time.
>> Documentation/devicetree/bindings/sound/wm8580.txt | 4 +-
>> sound/soc/codecs/Kconfig | 2 +-
>> sound/soc/codecs/wm8580.c | 98 ++++++++++++++++++++--
>> 3 files changed, 92 insertions(+), 12 deletions(-)
> <snip>
>> @@ -65,6 +68,8 @@
>> #define WM8580_DIGITAL_ATTENUATION_DACR2 0x17
>> #define WM8580_DIGITAL_ATTENUATION_DACL3 0x18
>> #define WM8580_DIGITAL_ATTENUATION_DACR3 0x19
>> +#define WM8580_DIGITAL_ATTENUATION_DACL4 0x1A
>> +#define WM8580_DIGITAL_ATTENUATION_DACR4 0x1B
> Apologies my fault for still not being clear these two new
> defines would still be best called WM8581...
>
> <snip>
>> +static int wm8580_playback_startup(struct snd_pcm_substream *substream,
>> + struct snd_soc_dai *dai)
>> +{
>> + struct snd_soc_codec *codec = dai->codec;
>> + struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
>> +
>> + return snd_pcm_hw_constraint_single(substream->runtime,
>> + SNDRV_PCM_HW_PARAM_CHANNELS, wm8580->drvdata->num_dacs * 2);
> Won't this limit us to exactly num_dacs * 2 channels? I would
> have expected a contraint_minmax, I haven't checked the core
> code but would be good to know you have tested smaller numbers
> of channels and they are working. Bearing in mind that some
> user-space applications will do things like pad out to the number
> of channels the hardware claims to require. For example for aplay
> I believe -v will show you if it does any conversion and
> --disable-channels will stop it attempting to convert the number
> of channels.
> Apart from those very small comments this all looks fine to me.
OK, I will use minmax to fix this problem ... I didn't see it at first,
thanks for pointing it out.
Matt
>
> Thanks,
> Charles
next prev parent reply other threads:[~2016-10-19 23:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-18 18:24 [PATCH] ASoc: wm8580: Add the wm8581 codec to the driver Matt Flax
2016-10-19 9:22 ` Charles Keepax
2016-10-19 23:22 ` Matt Flax [this message]
2016-10-19 23:29 ` [PATCH v3] " Matt Flax
2016-10-20 9:45 ` Charles Keepax
2016-10-24 17:24 ` Mark Brown
2016-10-24 17:25 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2016-10-16 22:42 [PATCH] " Matt Flax
2016-10-17 10:37 ` Charles Keepax
2016-10-17 10:46 ` Matt Flax
2016-10-17 10:59 ` Charles Keepax
2016-10-17 19:14 ` Matt Flax
2016-10-17 19:15 ` Matt Flax
2016-10-18 7:56 ` Charles Keepax
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=b023d208-c97c-fd51-303e-a9480e51719c@flatmax.org \
--to=flatmax@flatmax.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=patches@opensource.wolfsonmicro.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).