From: Mark Brown <broonie@kernel.org>
To: "Paweł Anikiel" <pan@semihalf.com>
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, lgirdwood@gmail.com,
perex@perex.cz, tiwai@suse.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, dinguyen@kernel.org,
lars@metafoo.de, nuno.sa@analog.com, upstream@semihalf.com
Subject: Re: [PATCH 1/9] ASoC: Add Chameleon v3 audio
Date: Tue, 25 Apr 2023 17:27:01 +0100 [thread overview]
Message-ID: <c42ea55b-fb2f-417e-882a-a06f7660ea22@sirena.org.uk> (raw)
In-Reply-To: <CAF9_jYTyhJZaCk1zN93Rr5AXAmpk4nu6z0Z9+RQb4HxGQ=zZLQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2564 bytes --]
On Tue, Apr 25, 2023 at 05:59:52PM +0200, Paweł Anikiel wrote:
> > > +config SND_SOC_CHV3
> > > + tristate "SoC Audio support for Chameleon v3"
> > > + select SND_SOC_SSM2602
> > > + select SND_SOC_SSM2602_I2C
> > > + help
> > > + Say Y if you want to add audio support for the Chameleon v3.
> > It woudl be better to have a separate selectable symbol for each drier.
> I'm not sure about this. If I disable just one driver, the entire card
> fails to probe (even if some audio device doesn't need that driver).
> Does it then make sense to be able to deselect some drivers? Please
> correct me if I'm misunderstanding.
Consider what happens if someone for example reuses the I2S controller
in a different board.
> Having said that, I did try to remove that logic and simply delay
> hw_pointer by one frame, and it appears to work (the playback seems
> fine and without glitches). However, I'm worried about calling
> snd_pcm_period_elapsed() and then reporting that the hw_pointer hasn't
> actually reached the end of the period. Is that ok to do?
It should be fine, things should be working off the hw_pointer.
> > > + reg = readl(i2s->iobase_irq + I2S_IRQ_CLR);
> > > + if (!reg)
> > > + return IRQ_NONE;
> > > + if (reg & I2S_IRQ_RX_BIT)
> > > +
> > > + if (reg & I2S_IRQ_TX_BIT) {
> > > + writel(reg, i2s->iobase_irq + I2S_IRQ_CLR);
> > > +
> > > + return IRQ_HANDLED;
> > > +}
> > Really we should only ack things that were handled here and report
> > appropriately, that's defensive against bugs causing interrupts to
> > scream and shared interrupts.
> What do you mean by handled? Should I check the hardware pointer and
> check if a period really has elapsed?
The driver is checking for specific bits in the status register but
blindly acknowledging all bits that are set, and reporting IRQ_HANDLED
even if none are set.
> > why is it not being added as a CODEC?
> Do you mean I should put it in sound/soc/codecs/?
Yes.
> Also, I used the name of the HDMI receiver chip (IT68051), but really
> this goes through some extra processing in an FPGA, so the result has
> little in common with the chip itself. Do you have any advice on how
> it should be named?
If it's genuinely unrelated to the capabilities of the actual chip then
just putting a standalone driver in the platform directory is fine, but
the code should be clear about that otherwise it looks like the code for
the device could be shared.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-04-25 16:27 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 14:01 [PATCH 0/9] Add Chameleon v3 ASoC audio Paweł Anikiel
2023-04-14 14:01 ` [PATCH 1/9] ASoC: Add Chameleon v3 audio Paweł Anikiel
2023-04-14 16:57 ` Krzysztof Kozlowski
2023-04-14 17:19 ` Mark Brown
2023-04-25 15:59 ` Paweł Anikiel
2023-04-25 16:27 ` Mark Brown [this message]
2023-04-14 14:01 ` [PATCH 2/9] dt-bindings: ASoC: Add chv3-i2s Paweł Anikiel
2023-04-14 17:00 ` Krzysztof Kozlowski
2023-04-25 16:01 ` Paweł Anikiel
2023-04-26 13:15 ` Krzysztof Kozlowski
2023-04-14 14:01 ` [PATCH 3/9] dt-bindings: ASoC: Add chv3-audio Paweł Anikiel
2023-04-14 18:37 ` Rob Herring
2023-04-17 20:41 ` Rob Herring
2023-04-25 16:01 ` Paweł Anikiel
2023-04-14 14:01 ` [PATCH 4/9] dt-bindings: ASoC: Add it68051 Paweł Anikiel
2023-04-14 17:01 ` Krzysztof Kozlowski
2023-04-14 18:37 ` Rob Herring
2023-04-14 14:01 ` [PATCH 5/9] ASoC: ssm2602: Add workaround for playback with external MCLK Paweł Anikiel
2023-04-14 17:35 ` Mark Brown
2023-04-25 16:02 ` Paweł Anikiel
2023-04-25 16:42 ` Mark Brown
2023-04-14 14:02 ` [PATCH 6/9] ASoC: ssm2602: Add support for CLKDIV2 Paweł Anikiel
2023-04-14 14:02 ` [PATCH 7/9] ASoC: ssm2602: Add mute gpio Paweł Anikiel
2023-04-14 17:47 ` Mark Brown
2023-04-14 14:02 ` [PATCH 8/9] dt-bindings: ASoC: Add mute-gpio to ssm2602 Paweł Anikiel
2023-04-14 14:02 ` [PATCH 9/9] ARM: dts: chameleonv3: Add ssm2603 mute gpio Paweł Anikiel
2023-04-14 16:47 ` [PATCH 0/9] Add Chameleon v3 ASoC audio Mark Brown
2023-04-25 15:58 ` Paweł Anikiel
2023-04-25 17:06 ` Mark Brown
2023-04-17 19:28 ` (subset) " Mark Brown
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=c42ea55b-fb2f-417e-882a-a06f7660ea22@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=devicetree@vger.kernel.org \
--cc=dinguyen@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=pan@semihalf.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
--cc=upstream@semihalf.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
all inboxes | Powered by JetHome®