* Re: [PATCH v2]ASoC:blackfin:add ad73311 card driver name
2011-09-13 18:59 [PATCH v2]ASoC:blackfin:add ad73311 card driver name Scott Jiang
@ 2011-09-13 10:53 ` Mark Brown
2011-09-14 3:27 ` Scott Jiang
2011-09-13 16:11 ` Liam Girdwood
1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2011-09-13 10:53 UTC (permalink / raw)
To: Scott Jiang; +Cc: Takashi Iwai, uclinux-dist-devel, alsa-devel
On Tue, Sep 13, 2011 at 02:59:26PM -0400, Scott Jiang wrote:
> Add driver_name in snd_soc_card, asoc will copy this name to driver field of snd_card.
> ALSA lib need this info to load the proper card config.
> static struct snd_soc_card bf5xx_ad73311 = {
> .name = "bfin-ad73311",
> + .driver_name = "AD73311",
All my comments about the previous revision of the patch continue to
apply here. The changlog doesn't explain the issue well (the driver
should already end up with a unique name) and the name you've picked
is less distinctive than the existing name.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2]ASoC:blackfin:add ad73311 card driver name
2011-09-13 18:59 [PATCH v2]ASoC:blackfin:add ad73311 card driver name Scott Jiang
2011-09-13 10:53 ` Mark Brown
@ 2011-09-13 16:11 ` Liam Girdwood
1 sibling, 0 replies; 7+ messages in thread
From: Liam Girdwood @ 2011-09-13 16:11 UTC (permalink / raw)
To: Scott Jiang; +Cc: Takashi Iwai, uclinux-dist-devel, alsa-devel, Mark Brown
On Tue, 2011-09-13 at 14:59 -0400, Scott Jiang wrote:
> Add driver_name in snd_soc_card, asoc will copy this name to driver field of snd_card.
> ALSA lib need this info to load the proper card config.
>
> Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
> ---
> sound/soc/blackfin/bf5xx-ad73311.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/sound/soc/blackfin/bf5xx-ad73311.c b/sound/soc/blackfin/bf5xx-ad73311.c
> index 732a247..975c6e8 100644
> --- a/sound/soc/blackfin/bf5xx-ad73311.c
> +++ b/sound/soc/blackfin/bf5xx-ad73311.c
> @@ -192,6 +192,7 @@ static struct snd_soc_dai_link bf5xx_ad73311_dai[] = {
>
> static struct snd_soc_card bf5xx_ad73311 = {
> .name = "bfin-ad73311",
> + .driver_name = "AD73311",
> .probe = bf5xx_probe,
> .dai_link = &bf5xx_ad73311_dai[CONFIG_SND_BF5XX_SPORT_NUM],
> .num_links = 1,
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2]ASoC:blackfin:add ad73311 card driver name
@ 2011-09-13 18:59 Scott Jiang
2011-09-13 10:53 ` Mark Brown
2011-09-13 16:11 ` Liam Girdwood
0 siblings, 2 replies; 7+ messages in thread
From: Scott Jiang @ 2011-09-13 18:59 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown; +Cc: uclinux-dist-devel, alsa-devel, Scott Jiang
Add driver_name in snd_soc_card, asoc will copy this name to driver field of snd_card.
ALSA lib need this info to load the proper card config.
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
---
sound/soc/blackfin/bf5xx-ad73311.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/sound/soc/blackfin/bf5xx-ad73311.c b/sound/soc/blackfin/bf5xx-ad73311.c
index 732a247..975c6e8 100644
--- a/sound/soc/blackfin/bf5xx-ad73311.c
+++ b/sound/soc/blackfin/bf5xx-ad73311.c
@@ -192,6 +192,7 @@ static struct snd_soc_dai_link bf5xx_ad73311_dai[] = {
static struct snd_soc_card bf5xx_ad73311 = {
.name = "bfin-ad73311",
+ .driver_name = "AD73311",
.probe = bf5xx_probe,
.dai_link = &bf5xx_ad73311_dai[CONFIG_SND_BF5XX_SPORT_NUM],
.num_links = 1,
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2]ASoC:blackfin:add ad73311 card driver name
2011-09-13 10:53 ` Mark Brown
@ 2011-09-14 3:27 ` Scott Jiang
2011-09-15 10:00 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Scott Jiang @ 2011-09-14 3:27 UTC (permalink / raw)
To: Mark Brown; +Cc: Takashi Iwai, uclinux-dist-devel, alsa-devel
2011/9/13 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Tue, Sep 13, 2011 at 02:59:26PM -0400, Scott Jiang wrote:
>
>> Add driver_name in snd_soc_card, asoc will copy this name to driver field of snd_card.
>> ALSA lib need this info to load the proper card config.
>
>> static struct snd_soc_card bf5xx_ad73311 = {
>> .name = "bfin-ad73311",
>> + .driver_name = "AD73311",
>
> All my comments about the previous revision of the patch continue to
> apply here. The changlog doesn't explain the issue well (the driver
> should already end up with a unique name)
>
in alsa lib snd_config_hook_load_for_all_cards(), use
sndrv_ctl_card_info->driver to determine card config,
not sndrv_ctl_card_info->name, though card name contains enough info.
> and the name you've picked
> is less distinctive than the existing name.
>
I know the name is not good enough, but it is a historical result.
Asoc copy codec name to card->driver before, cause all cards config
file in alsa lib conf dir have this kind of name.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2]ASoC:blackfin:add ad73311 card driver name
2011-09-14 3:27 ` Scott Jiang
@ 2011-09-15 10:00 ` Mark Brown
2011-09-16 3:53 ` Scott Jiang
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2011-09-15 10:00 UTC (permalink / raw)
To: Scott Jiang; +Cc: Takashi Iwai, uclinux-dist-devel, alsa-devel
On Wed, Sep 14, 2011 at 11:27:28AM +0800, Scott Jiang wrote:
> 2011/9/13 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> > On Tue, Sep 13, 2011 at 02:59:26PM -0400, Scott Jiang wrote:
> > All my comments about the previous revision of the patch continue to
> > apply here. The changlog doesn't explain the issue well (the driver
> > should already end up with a unique name)
> in alsa lib snd_config_hook_load_for_all_cards(), use
> sndrv_ctl_card_info->driver to determine card config,
> not sndrv_ctl_card_info->name, though card name contains enough info.
So the issue isn't that the driver doesn't have a name, it's that you
don't like the name it was given. The changelog needs to explain this,
and also explain why this is an issue in this one driver.
> > and the name you've picked
> > is less distinctive than the existing name.
> I know the name is not good enough, but it is a historical result.
> Asoc copy codec name to card->driver before, cause all cards config
> file in alsa lib conf dir have this kind of name.
This sounds like you should fix userspace. It does go back to the issue
I regularly raise with the Blackfin code constantly assuming that there
can be a single driver which covers all combinations of a Blackfin CPU
with a given CODEC.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2]ASoC:blackfin:add ad73311 card driver name
2011-09-15 10:00 ` Mark Brown
@ 2011-09-16 3:53 ` Scott Jiang
2011-09-16 9:47 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Scott Jiang @ 2011-09-16 3:53 UTC (permalink / raw)
To: Mark Brown; +Cc: Takashi Iwai, uclinux-dist-devel, alsa-devel
2011/9/15 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Wed, Sep 14, 2011 at 11:27:28AM +0800, Scott Jiang wrote:
>> 2011/9/13 Mark Brown <broonie@opensource.wolfsonmicro.com>:
>> > On Tue, Sep 13, 2011 at 02:59:26PM -0400, Scott Jiang wrote:
>
>> > All my comments about the previous revision of the patch continue to
>> > apply here. The changlog doesn't explain the issue well (the driver
>> > should already end up with a unique name)
>
>> in alsa lib snd_config_hook_load_for_all_cards(), use
>> sndrv_ctl_card_info->driver to determine card config,
>> not sndrv_ctl_card_info->name, though card name contains enough info.
>
> So the issue isn't that the driver doesn't have a name, it's that you
> don't like the name it was given.
Do you mean alsa lib needs to modify its way to determine which card
config to load?
I don't think alsa lib guys will agree.
>The changelog needs to explain this,
> and also explain why this is an issue in this one driver.
>
Not only for this one driver, it's a problem for all drivers under
asoc. Because sndrv_ctl_card_info->driver is an empty string now.
>> > and the name you've picked
>> > is less distinctive than the existing name.
>
>> I know the name is not good enough, but it is a historical result.
>> Asoc copy codec name to card->driver before, cause all cards config
>> file in alsa lib conf dir have this kind of name.
>
> This sounds like you should fix userspace. It does go back to the issue
> I regularly raise with the Blackfin code constantly assuming that there
> can be a single driver which covers all combinations of a Blackfin CPU
> with a given CODEC.
>
As I have said it was caused by ASoC before. It is not a guilt of blackfin.
All drivers under ASoC must name their card config the same as their
codec driver's name because asoc copy codec name to snd_card->driver
and alsa lib get it through sndrv_ctl_card_info->driver. They must
match.
Now ASoC doesn't copy codec name to snd_card->driver so we can rename
it to bfin-ad73311 if you like this kind of name style.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2]ASoC:blackfin:add ad73311 card driver name
2011-09-16 3:53 ` Scott Jiang
@ 2011-09-16 9:47 ` Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2011-09-16 9:47 UTC (permalink / raw)
To: Scott Jiang; +Cc: Takashi Iwai, uclinux-dist-devel, alsa-devel
On Fri, Sep 16, 2011 at 11:53:16AM +0800, Scott Jiang wrote:
> 2011/9/15 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> > On Wed, Sep 14, 2011 at 11:27:28AM +0800, Scott Jiang wrote:
> >> in alsa lib snd_config_hook_load_for_all_cards(), use
> >> sndrv_ctl_card_info->driver to determine card config,
> >> not sndrv_ctl_card_info->name, though card name contains enough info.
> > So the issue isn't that the driver doesn't have a name, it's that you
> > don't like the name it was given.
> Do you mean alsa lib needs to modify its way to determine which card
> config to load?
> I don't think alsa lib guys will agree.
Well, that's one option.
> >The changelog needs to explain this,
> > and also explain why this is an issue in this one driver.
> Not only for this one driver, it's a problem for all drivers under
> asoc. Because sndrv_ctl_card_info->driver is an empty string now.
So if that's the case then it seems very clear that a driver specific
change isn't a good way of addressing the issue. If the driver name is
null it actually seems like modifying userspace should be very easy, we
simply need to fall back to reading the card name if the driver name is
empty.
> > This sounds like you should fix userspace. It does go back to the issue
> > I regularly raise with the Blackfin code constantly assuming that there
> > can be a single driver which covers all combinations of a Blackfin CPU
> > with a given CODEC.
> As I have said it was caused by ASoC before. It is not a guilt of blackfin.
> All drivers under ASoC must name their card config the same as their
> codec driver's name because asoc copy codec name to snd_card->driver
> and alsa lib get it through sndrv_ctl_card_info->driver. They must
> match.
Right, but if the Blackfin community had been alert to the idea that not
all machines using a given CODEC are the same it should have been
obvious that this was a poor identifier to use for this and something
was wrong.
> Now ASoC doesn't copy codec name to snd_card->driver so we can rename
> it to bfin-ad73311 if you like this kind of name style.
No, doing something that requires updates to every single machine driver
isn't good (unless you're going to go through and update every one of
them I guess, but even then it's not great).
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-09-16 9:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13 18:59 [PATCH v2]ASoC:blackfin:add ad73311 card driver name Scott Jiang
2011-09-13 10:53 ` Mark Brown
2011-09-14 3:27 ` Scott Jiang
2011-09-15 10:00 ` Mark Brown
2011-09-16 3:53 ` Scott Jiang
2011-09-16 9:47 ` Mark Brown
2011-09-13 16:11 ` Liam Girdwood
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).