Re: [alsa-devel] [PATCH 2/9] ALSA: ac97: add an ac97 bus

2016-11-25 Thread Robert Jarzmik
Lars-Peter Clausen writes: ... Ok Lars, let's do this : I integrate as many of your remarks as I can, and I respin this serie, limited to patches 1, 2, 3, 4 and 5. Then we'll iterate, that will enable me to settle the serie, as I was on holidays and lost a bit my track. I'll send it hopefully ne

Re: [alsa-devel] [PATCH 2/9] ALSA: ac97: add an ac97 bus

2016-11-22 Thread Mark Brown
On Thu, Nov 10, 2016 at 12:38:40PM +0100, Lars-Peter Clausen wrote: > On 11/09/2016 10:27 PM, Robert Jarzmik wrote: > > here, ie. that the rescan is a bug, or if it's more an "Occam's razor" > > discussion ? > Maybe we can just leave the rescanning out for now and think about how to > best handle

Re: [alsa-devel] [PATCH 2/9] ALSA: ac97: add an ac97 bus

2016-11-10 Thread Lars-Peter Clausen
On 11/09/2016 10:27 PM, Robert Jarzmik wrote: [...] > +int snd_ac97_codec_driver_register(struct ac97_codec_driver *drv) > +{ > + int ret; > + > + drv->driver.bus = &ac97_bus_type; > + > + ret = driver_register(&drv->driver); > + if (!ret) > + ac97_rescan

Re: [alsa-devel] [PATCH 2/9] ALSA: ac97: add an ac97 bus

2016-11-09 Thread Robert Jarzmik
Lars-Peter Clausen writes: > On 11/08/2016 10:18 PM, Robert Jarzmik wrote: >>> I'd make the controller itself a struct dev, rather than just having the >>> pointer to the parent. This is more idiomatic and matches what other >>> subsystems do. It has several advantages, you get proper refcounting

Re: [alsa-devel] [PATCH 2/9] ALSA: ac97: add an ac97 bus

2016-11-09 Thread Lars-Peter Clausen
On 11/08/2016 10:18 PM, Robert Jarzmik wrote: [...] >>> +/** >>> + * struct ac97_controller - The AC97 controller of the AC-Link >>> + * @ops: the AC97 operations. >>> + * @controllers: linked list of all existing controllers. >>> + * @dev: the device providing the AC97 contro

Re: [alsa-devel] [PATCH 2/9] ALSA: ac97: add an ac97 bus

2016-11-08 Thread Robert Jarzmik
Lars-Peter Clausen writes: > On 10/26/2016 09:41 PM, Robert Jarzmik wrote: >> +#define to_ac97_device(d) container_of(d, struct ac97_codec_device, dev) >> +#define to_ac97_driver(d) container_of(d, struct ac97_codec_driver, driver) > > In my opinion these should be inline functions rather than ma

Re: [alsa-devel] [PATCH 2/9] ALSA: ac97: add an ac97 bus

2016-11-08 Thread Lars-Peter Clausen
On 10/26/2016 09:41 PM, Robert Jarzmik wrote: > AC97 is a bus for sound usage. It enables for a AC97 AC-Link to link one > controller to 0 to 4 AC97 codecs. > > The goal of this new implementation is to implement a device/driver > model for AC97, with an automatic scan of the bus and automatic > d