Skip to contentSkip to conversation

ASoC: simple-card: Add asoc_simple_card_data for the simple card driver data

RFC PATCH In review Xiubo Li 3 participants 5 messages Jan 14, 2014

Subsystems (3)
lore
Share & tools
lore

Xiubo Li

author
#0 lore raw

RFC PATCH 1/1 ASoC: simple-card: Add asoc_simple_card_data for the simple card driver data

Whether the dt is used or not, almost all the simple card information for the DAI link and sound card are initialized in the simple card driver.

And for the platform caller, the snd_link and snd_card are of no use, so move them from struct asoc_simple_card_info to struct asoc_simple_card_data.

And now only one DAI link is supported for simple card.

---
 include/sound/simple_card.h     |   4 --
 sound/soc/generic/simple-card.c | 115 +++++++++++++++++++++-------------------
 2 files changed, 60 insertions(+), 59 deletions(-)
include/sound/simple_card.h +0 -4
index 6c74527..e1ac996 100644
@@ -29,10 +29,6 @@ struct asoc_simple_card_info {
 	unsigned int daifmt;
 	struct asoc_simple_dai cpu_dai;
 	struct asoc_simple_dai codec_dai;
-
-	/* used in simple-card.c */
-	struct snd_soc_dai_link snd_link;
-	struct snd_soc_card snd_card;
 };
 
 #endif /* __SIMPLE_CARD_H */
sound/soc/generic/simple-card.c +60 -55

218 lines not on this page · raw message

Signature · 1 line
1.8.4
#1 lore raw

Hi Xiubo

Thank you for your patch

Quoted 11 lines

Whether the dt is used or not, almost all the simple card information for the DAI link and sound card are initialized in the simple card driver.

And for the platform caller, the snd_link and snd_card are of no use, so move them from struct asoc_simple_card_info to struct asoc_simple_card_data.

And now only one DAI link is supported for simple card.

---

This patch seems have many this kind of lines
- info->xxx
+ sdata->info->xxx

But, how about add this line to each function ?

     struct asoc_simple_card_info *info = &sdata->info;

Patch will be more readable

Best regards
---
Kuninori Morimoto

#2 lore raw
Quoted 17 lines
Quoted 4 lines

Whether the dt is used or not, almost all the simple card information for the DAI link and sound card are initialized in the simple card driver.

Quoted 8 lines

And for the platform caller, the snd_link and snd_card are of no use, so move them from struct asoc_simple_card_info to struct asoc_simple_card_data.

And now only one DAI link is supported for simple card.

---

This patch seems have many this kind of lines
- info->xxx
+ sdata->info->xxx

Quoted 6 lines

But, how about add this line to each function ?

     struct asoc_simple_card_info *info = &sdata->info;

Patch will be more readable

Yes, that's looks perfect.

See the next version please.

Thanks,

--
Best Regards,
Xiubo

#3 lore raw
Quoted 19 lines · On Tue, 14 Jan 2014 07:56:32 +0000 "[email protected]"…
Quoted 19 lines
Quoted 4 lines

Whether the dt is used or not, almost all the simple card information for the DAI link and sound card are initialized in the simple card driver.

Quoted 8 lines

And for the platform caller, the snd_link and snd_card are of no use, so move them from struct asoc_simple_card_info to struct asoc_simple_card_data.

And now only one DAI link is supported for simple card.

---

This patch seems have many this kind of lines
- info->xxx
+ sdata->info->xxx

But, how about add this line to each function ?

Quoted 8 lines
Quoted 4 lines
     struct asoc_simple_card_info *info = &sdata->info;

Patch will be more readable

Yes, that's looks perfect.

See the next version please.

Please, don't work on an other version. I am preparing an other patch which will do quite the same as yours, but which will be easier to extend to many DAI links.

Signature · 2 lines
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
#4 lore raw

Hi Jean-Francios,

I do think split the muti-issues into deferent patches will be easier to upstream code, and the risk will be lower.

So this patch is just the first step.

Thanks,