ASoC:blackfin:add ad73311 card driver name
PATCH 1/1 ASoC:blackfin:add ad73311 card driver name
ASoC doesn't copy codec name to card driver now.
ALSA lib need this info to find the proper card config.
So add card name in snd_soc_card, asoc will copy this name to snd_card.
--- sound/soc/blackfin/bf5xx-ad73311.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/blackfin/bf5xx-ad73311.c +1 -0
@@ -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 ,
Signature · 1 line
1.7.0.4
Quoted 3 lines · Scott Jiang
ASoC doesn't copy codec name to card driver now.
ALSA lib need this info to find the proper card config.
So add card name insnd_soc_card, asoc will copy this name tosnd_card.
Your changelog doesn't correspond to your code:
sound/soc/blackfin/bf5xx-ad73311.c static struct snd_soc_dai_link bf5xx_ad73311_dai[] = { · line 195
Quoted 3 lines
static struct
snd_soc_cardbf5xx_ad73311= {sound/soc/blackfin/bf5xx-ad73311.c +1
-0.name = "bfin-ad73311", + .driver_name = "AD73311",
You're not adding a card name, you're adding a driver name, and the existing card name already contains the name of the CODEC. There should already be enough information available to userspace to identify that the card is a Blackfin card with ad73311. Since the driver_name you're setting only contains the name of the CODEC it looks likely to cause more collisions anyway as other systems may use the same CODEC.
2011/9/6 Mark Brown <[email protected]>:
Quoted 5 lines · Scott Jiang
Quoted 3 lines
ASoC doesn't copy codec name to card driver now.
ALSA lib need this info to find the proper card config.
So add card name insnd_soc_card, asoc will copy this name tosnd_card.
Quoted 9 lines
Your changelog doesn't correspond to your code:
Quoted 3 lines
static struct
snd_soc_cardbf5xx_ad73311= {
.name = "bfin-ad73311",
+ .driver_name = "AD73311",There should already be enough information available to userspace to identify that the card is a Blackfin card with ad73311.
Yes, card name contains enough info, but alsa lib doesn't use it. My alsa lib version is 1.0.24. It uses driver name to find card config not short name nor long name.
Quoted 3 lines
Since the
driver_nameyou're setting only contains the name of the CODEC it looks likely to cause more collisions anyway as other systems may use the same CODEC.
It is a historical result. all cards config of blackfin in alsa lib use these names.
one more question, I found nobody changed this in their drivers. Do their cards config in alsa lib acctually take effect?