Message ID | 874n3n90qt.wl%kuninori.morimoto.gx@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Feb 24, 2014 at 10:15:25PM -0800, Kuninori Morimoto wrote: > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > This patch adds struct snd_soc_dai_ops :: set_sysclk. > But, it do nothing, since rsnd sysclk is controlled by ADG. > Without this patch, simple-card init will be failed > if DT case. We should fix the simple-card code so that it does not need this rather than adding empty functions to all the drivers - I'd expect it to handle -ENOTSUPP as not an error.
Hi Mark > > This patch adds struct snd_soc_dai_ops :: set_sysclk. > > But, it do nothing, since rsnd sysclk is controlled by ADG. > > Without this patch, simple-card init will be failed > > if DT case. > > We should fix the simple-card code so that it does not need this rather > than adding empty functions to all the drivers - I'd expect it to handle > -ENOTSUPP as not an error. Ahh... Current simple-card will get sysclk absolutely in normal (?) way. Can you see end of asoc_simple_card_sub_parse_of() ? rsnd got sysclk from it, but it is "module" clock, not "sysclk". I guess I can avoid this issue if dtsi has system-clock-frequency = 0; but it is strange.
Hi Mark again > > > This patch adds struct snd_soc_dai_ops :: set_sysclk. > > > But, it do nothing, since rsnd sysclk is controlled by ADG. > > > Without this patch, simple-card init will be failed > > > if DT case. > > > > We should fix the simple-card code so that it does not need this rather > > than adding empty functions to all the drivers - I'd expect it to handle > > -ENOTSUPP as not an error. > > Ahh... > > Current simple-card will get sysclk absolutely in normal (?) way. > Can you see end of asoc_simple_card_sub_parse_of() ? > > rsnd got sysclk from it, but it is "module" clock, not "sysclk". > > I guess I can avoid this issue if dtsi has > > system-clock-frequency = 0; > > but it is strange. Oops, I was misunderstanding. I see, I will add -ENOTSUPP support.
Hi Mark again > > > We should fix the simple-card code so that it does not need this rather > > > than adding empty functions to all the drivers - I'd expect it to handle > > > -ENOTSUPP as not an error. (snip) > Oops, I was misunderstanding. > I see, I will add -ENOTSUPP support. Current mark/topic/simple already has -ENOTSUPP support. Thank you
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index f0745af..98771f7 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -571,9 +571,17 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) return 0; } +static int rsnd_soc_dai_set_sysclk(struct snd_soc_dai *codec_dai, + int clk_id, unsigned int freq, int dir) +{ + /* rsnd sysclk is controlled by ADG */ + return 0; +} + static const struct snd_soc_dai_ops rsnd_soc_dai_ops = { .trigger = rsnd_soc_dai_trigger, .set_fmt = rsnd_soc_dai_set_fmt, + .set_sysclk = rsnd_soc_dai_set_sysclk, }; static int rsnd_dai_probe(struct platform_device *pdev,