* [PATCH 0/2] ASoC: fsl_asrc: neatening @ 2017-11-16 16:25 Joe Perches 2017-11-16 16:25 ` [PATCH 1/2] ASoC: fsl_asrc: Fix line continuation format Joe Perches 2017-11-16 16:25 ` [PATCH 2/2] ASoC: fsl_asrc: constify some arrays Joe Perches 0 siblings, 2 replies; 5+ messages in thread From: Joe Perches @ 2017-11-16 16:25 UTC (permalink / raw) To: Fabio Estevam, alsa-devel, linuxppc-dev Cc: Timur Tabi, Nicolin Chen, Xiubo Li, Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, linux-kernel Joe Perches (2): ASoC: fsl_asrc: Fix line continuation format ASoC: fsl_asrc: constify some arrays sound/soc/fsl/fsl_asrc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 2.15.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ASoC: fsl_asrc: Fix line continuation format 2017-11-16 16:25 [PATCH 0/2] ASoC: fsl_asrc: neatening Joe Perches @ 2017-11-16 16:25 ` Joe Perches 2017-11-16 19:01 ` Nicolin Chen 2017-11-16 16:25 ` [PATCH 2/2] ASoC: fsl_asrc: constify some arrays Joe Perches 1 sibling, 1 reply; 5+ messages in thread From: Joe Perches @ 2017-11-16 16:25 UTC (permalink / raw) To: Timur Tabi, Nicolin Chen, Xiubo Li, Fabio Estevam Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, alsa-devel, linuxppc-dev, linux-kernel Line continuations with excess spacing causes unexpected output Signed-off-by: Joe Perches <joe@perches.com> --- sound/soc/fsl/fsl_asrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 806d39927318..ed683fe8b94a 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -288,8 +288,8 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair) if ((outrate > 8000 && outrate < 30000) && (outrate/inrate > 24 || inrate/outrate > 8)) { - pair_err("exceed supported ratio range [1/24, 8] for \ - inrate/outrate: %d/%d\n", inrate, outrate); + pair_err("exceed supported ratio range [1/24, 8] for inrate/outrate: %d/%d\n", + inrate, outrate); return -EINVAL; } -- 2.15.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ASoC: fsl_asrc: Fix line continuation format 2017-11-16 16:25 ` [PATCH 1/2] ASoC: fsl_asrc: Fix line continuation format Joe Perches @ 2017-11-16 19:01 ` Nicolin Chen 0 siblings, 0 replies; 5+ messages in thread From: Nicolin Chen @ 2017-11-16 19:01 UTC (permalink / raw) To: Joe Perches Cc: Timur Tabi, Xiubo Li, Fabio Estevam, Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, alsa-devel, linuxppc-dev, linux-kernel On Thu, Nov 16, 2017 at 08:25:46AM -0800, Joe Perches wrote: > Line continuations with excess spacing causes unexpected output > > Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> > --- > sound/soc/fsl/fsl_asrc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c > index 806d39927318..ed683fe8b94a 100644 > --- a/sound/soc/fsl/fsl_asrc.c > +++ b/sound/soc/fsl/fsl_asrc.c > @@ -288,8 +288,8 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair) > > if ((outrate > 8000 && outrate < 30000) && > (outrate/inrate > 24 || inrate/outrate > 8)) { > - pair_err("exceed supported ratio range [1/24, 8] for \ > - inrate/outrate: %d/%d\n", inrate, outrate); > + pair_err("exceed supported ratio range [1/24, 8] for inrate/outrate: %d/%d\n", > + inrate, outrate); > return -EINVAL; > } > > -- > 2.15.0 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] ASoC: fsl_asrc: constify some arrays 2017-11-16 16:25 [PATCH 0/2] ASoC: fsl_asrc: neatening Joe Perches 2017-11-16 16:25 ` [PATCH 1/2] ASoC: fsl_asrc: Fix line continuation format Joe Perches @ 2017-11-16 16:25 ` Joe Perches 2017-11-17 4:09 ` Nicolin Chen 1 sibling, 1 reply; 5+ messages in thread From: Joe Perches @ 2017-11-16 16:25 UTC (permalink / raw) To: Timur Tabi, Nicolin Chen, Xiubo Li, Fabio Estevam Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, alsa-devel, linuxppc-dev, linux-kernel Using const reduces data. $ size sound/soc/fsl/fsl_asrc.o* text data bss dec hex filename 21691 5872 192 27755 6c6b sound/soc/fsl/fsl_asrc.o.new 21435 6128 192 27755 6c6b sound/soc/fsl/fsl_asrc.o.old Signed-off-by: Joe Perches <joe@perches.com> --- sound/soc/fsl/fsl_asrc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index ed683fe8b94a..641724c9b3f8 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -49,12 +49,12 @@ static const u8 process_option[][12][2] = { }; /* Corresponding to process_option */ -static int supported_input_rate[] = { +static const int supported_input_rate[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 176400, 192000, }; -static int supported_asrc_rate[] = { +static const int supported_asrc_rate[] = { 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 176400, 192000, }; @@ -62,26 +62,26 @@ static int supported_asrc_rate[] = { * The following tables map the relationship between asrc_inclk/asrc_outclk in * fsl_asrc.h and the registers of ASRCSR */ -static unsigned char input_clk_map_imx35[] = { +static const unsigned char input_clk_map_imx35[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, }; -static unsigned char output_clk_map_imx35[] = { +static const unsigned char output_clk_map_imx35[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, }; /* i.MX53 uses the same map for input and output */ -static unsigned char input_clk_map_imx53[] = { +static const unsigned char input_clk_map_imx53[] = { /* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf */ 0x0, 0x1, 0x2, 0x7, 0x4, 0x5, 0x6, 0x3, 0x8, 0x9, 0xa, 0xb, 0xc, 0xf, 0xe, 0xd, }; -static unsigned char output_clk_map_imx53[] = { +static const unsigned char output_clk_map_imx53[] = { /* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf */ 0x8, 0x9, 0xa, 0x7, 0xc, 0x5, 0x6, 0xb, 0x0, 0x1, 0x2, 0x3, 0x4, 0xf, 0xe, 0xd, }; -static unsigned char *clk_map[2]; +static const unsigned char *clk_map[2]; /** * Request ASRC pair -- 2.15.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ASoC: fsl_asrc: constify some arrays 2017-11-16 16:25 ` [PATCH 2/2] ASoC: fsl_asrc: constify some arrays Joe Perches @ 2017-11-17 4:09 ` Nicolin Chen 0 siblings, 0 replies; 5+ messages in thread From: Nicolin Chen @ 2017-11-17 4:09 UTC (permalink / raw) To: Joe Perches Cc: Timur Tabi, Xiubo Li, Fabio Estevam, Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, alsa-devel, linuxppc-dev, linux-kernel On Thu, Nov 16, 2017 at 08:25:47AM -0800, Joe Perches wrote: > Using const reduces data. > > $ size sound/soc/fsl/fsl_asrc.o* > text data bss dec hex filename > 21691 5872 192 27755 6c6b sound/soc/fsl/fsl_asrc.o.new > 21435 6128 192 27755 6c6b sound/soc/fsl/fsl_asrc.o.old > > Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> > --- > sound/soc/fsl/fsl_asrc.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c > index ed683fe8b94a..641724c9b3f8 100644 > --- a/sound/soc/fsl/fsl_asrc.c > +++ b/sound/soc/fsl/fsl_asrc.c > @@ -49,12 +49,12 @@ static const u8 process_option[][12][2] = { > }; > > /* Corresponding to process_option */ > -static int supported_input_rate[] = { > +static const int supported_input_rate[] = { > 5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, > 96000, 176400, 192000, > }; > > -static int supported_asrc_rate[] = { > +static const int supported_asrc_rate[] = { > 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 176400, 192000, > }; > > @@ -62,26 +62,26 @@ static int supported_asrc_rate[] = { > * The following tables map the relationship between asrc_inclk/asrc_outclk in > * fsl_asrc.h and the registers of ASRCSR > */ > -static unsigned char input_clk_map_imx35[] = { > +static const unsigned char input_clk_map_imx35[] = { > 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, > }; > > -static unsigned char output_clk_map_imx35[] = { > +static const unsigned char output_clk_map_imx35[] = { > 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, > }; > > /* i.MX53 uses the same map for input and output */ > -static unsigned char input_clk_map_imx53[] = { > +static const unsigned char input_clk_map_imx53[] = { > /* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf */ > 0x0, 0x1, 0x2, 0x7, 0x4, 0x5, 0x6, 0x3, 0x8, 0x9, 0xa, 0xb, 0xc, 0xf, 0xe, 0xd, > }; > > -static unsigned char output_clk_map_imx53[] = { > +static const unsigned char output_clk_map_imx53[] = { > /* 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf */ > 0x8, 0x9, 0xa, 0x7, 0xc, 0x5, 0x6, 0xb, 0x0, 0x1, 0x2, 0x3, 0x4, 0xf, 0xe, 0xd, > }; > > -static unsigned char *clk_map[2]; > +static const unsigned char *clk_map[2]; > > /** > * Request ASRC pair > -- > 2.15.0 > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-17 4:10 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-11-16 16:25 [PATCH 0/2] ASoC: fsl_asrc: neatening Joe Perches 2017-11-16 16:25 ` [PATCH 1/2] ASoC: fsl_asrc: Fix line continuation format Joe Perches 2017-11-16 19:01 ` Nicolin Chen 2017-11-16 16:25 ` [PATCH 2/2] ASoC: fsl_asrc: constify some arrays Joe Perches 2017-11-17 4:09 ` Nicolin Chen
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).