From: Richard Zhao <hidden> Date: 2012-02-02 02:12:00
sdma device names vary for different SoC. So we just check
whether it includes "sdma" substring.
Signed-off-by: Richard Zhao <redacted>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/plat-mxc/include/mach/dma.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
From: Richard Zhao <hidden> Date: 2012-02-02 02:12:01
- add DEF_CLK_1B to define clocks using one bit gate
- add cko1 clock and set ahb as the default parent
imx6q-sabrelite board use it as audio codec clock.
Signed-off-by: Richard Zhao <redacted>
---
arch/arm/mach-imx/clock-imx6q.c | 74 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 73 insertions(+), 1 deletions(-)
@@ -184,36 +195,75 @@ int mxc_audmux_v2_configure_port(unsigned int port, unsigned int ptcr,}EXPORT_SYMBOL_GPL(mxc_audmux_v2_configure_port);-staticintmxc_audmux_v2_init(void)+staticint__initmxc_audmux_v2_probe(structplatform_device*pdev){-intret;-if(cpu_is_mx51()){-audmux_base=MX51_IO_ADDRESS(MX51_AUDMUX_BASE_ADDR);-}elseif(cpu_is_mx31()){-audmux_base=MX31_IO_ADDRESS(MX31_AUDMUX_BASE_ADDR);-}elseif(cpu_is_mx35()){-audmux_clk=clk_get(NULL,"audmux");-if(IS_ERR(audmux_clk)){-ret=PTR_ERR(audmux_clk);-printk(KERN_ERR"%s: cannot get clock: %d\n",__func__,-ret);-returnret;-}-audmux_base=MX35_IO_ADDRESS(MX35_AUDMUX_BASE_ADDR);-}elseif(cpu_is_mx25()){-audmux_clk=clk_get(NULL,"audmux");-if(IS_ERR(audmux_clk)){-ret=PTR_ERR(audmux_clk);-printk(KERN_ERR"%s: cannot get clock: %d\n",__func__,-ret);-returnret;-}-audmux_base=MX25_IO_ADDRESS(MX25_AUDMUX_BASE_ADDR);+structresource*res;+resource_size_tres_size;++res=platform_get_resource(pdev,IORESOURCE_MEM,0);+if(!res){+dev_err(&pdev->dev,"can't get device resources\n");+return-ENOENT;+}++res_size=resource_size(res);++if(!request_mem_region(res->start,res_size,DRIVER_NAME)){+dev_err(&pdev->dev,"request_mem_region failed\n");+return-EBUSY;+}++audmux_base=ioremap(res->start,res_size);++if(!audmux_base){+dev_err(&pdev->dev,"ioremap failed\n");+release_mem_region(res->start,resource_size(res));+return-EIO;+}++audmux_clk=clk_get(&pdev->dev,"audmux");+if(IS_ERR(audmux_clk)){+dev_warn(&pdev->dev,"cannot get clock: %ld\n",+PTR_ERR(audmux_clk));+audmux_clk=NULL;}audmux_debugfs_init();+audmux_res=res;return0;}-postcore_initcall(mxc_audmux_v2_init);+staticint__exitmxc_audmux_v2_remove(structplatform_device*pdev)+{+audmux_debugfs_remove();+clk_put(audmux_clk);+iounmap(audmux_base);+release_mem_region(audmux_res->start,resource_size(audmux_res));++return0;+}++staticstructplatform_drivermxc_audmux_v2_driver={+.remove=__exit_p(mxc_audmux_v2_remove),+.driver={+.name=DRIVER_NAME,+.owner=THIS_MODULE,+}+};++staticint__initmxc_audmux_v2_init(void)+{+returnplatform_driver_probe(&mxc_audmux_v2_driver,+mxc_audmux_v2_probe);+}+subsys_initcall(mxc_audmux_v2_init);++staticvoid__exitmxc_audmux_v2_exit(void)+{+platform_driver_unregister(&mxc_audmux_v2_driver);+}+module_exit(mxc_audmux_v2_exit);++MODULE_LICENSE("GPL");+MODULE_ALIAS("platform:"DRIVER_NAME);
@@ -17,10 +17,14 @@ config SND_MXC_SOC_FIQconfigSND_MXC_SOC_MX2tristate+configSND_MXC_SOC_AUDMUXV2+tristate+configSND_MXC_SOC_WM1133_EV1tristate"Audio on the the i.MX31ADS with WM1133-EV1 fitted"depends onMACH_MX31ADS_WM1133_EV1&&EXPERIMENTALselectSND_SOC_WM8350+selectSND_MXC_SOC_AUDMUXV2selectSND_MXC_SOC_FIQhelpEnablesupportforaudioonthei.MX31ADSwiththeWM1133-EV1
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/sound/soc/imx/audmux-v2.csimilarity index 100%rename from arch/arm/plat-mxc/audmux-v2.crename to sound/soc/imx/audmux-v2.c
--
1.7.5.4
Hmm, let's see who are actually using mxc_audmux_v2_configure_port().
$ git grep -n mxc_audmux_v2_configure_port arch/arm/
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:246: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:254: mxc_audmux_v2_configure_port(4,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:257: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:265: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:365: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:371: mxc_audmux_v2_configure_port(0,
$ git grep -n mxc_audmux_v2_configure_port sound/soc/imx/
sound/soc/imx/wm1133-ev1.c:277: mxc_audmux_v2_configure_port(MX31_AUDMUX_PORT1_SSI0, ptcr, pdcr);
sound/soc/imx/wm1133-ev1.c:281: mxc_audmux_v2_configure_port(MX31_AUDMUX_PORT5_SSI_PINS_5, ptcr, pdcr);
I guess audmux device needs to be added for all these users. And for
sake of bisect, it should be added as part of patch #5.
--
Regards,
Shawn
There are 4 more occurrences of the symbol to be removed together.
arch/arm/mach-imx/Kconfig:58: select ARCH_MXC_AUDMUX_V2
arch/arm/mach-imx/Kconfig:75: select ARCH_MXC_AUDMUX_V2
arch/arm/mach-imx/Kconfig:83: select ARCH_MXC_AUDMUX_V2
arch/arm/mach-imx/Kconfig:92: select ARCH_MXC_AUDMUX_V2
Regards,
Shawn
@@ -17,10 +17,14 @@ config SND_MXC_SOC_FIQconfigSND_MXC_SOC_MX2tristate+configSND_MXC_SOC_AUDMUXV2+tristate+configSND_MXC_SOC_WM1133_EV1tristate"Audio on the the i.MX31ADS with WM1133-EV1 fitted"depends onMACH_MX31ADS_WM1133_EV1&&EXPERIMENTALselectSND_SOC_WM8350+selectSND_MXC_SOC_AUDMUXV2selectSND_MXC_SOC_FIQhelpEnablesupportforaudioonthei.MX31ADSwiththeWM1133-EV1
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/sound/soc/imx/audmux-v2.csimilarity index 100%rename from arch/arm/plat-mxc/audmux-v2.crename to sound/soc/imx/audmux-v2.c
--
Hmm, let's see who are actually using mxc_audmux_v2_configure_port().
$ git grep -n mxc_audmux_v2_configure_port arch/arm/
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:246: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:254: mxc_audmux_v2_configure_port(4,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:257: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:265: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:365: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:371: mxc_audmux_v2_configure_port(0,
As we are moving audmux into sound/soc/imx, it makes less sense to
still keep these calls in board files. Instead, I prefer to call it
from machine driver like what wm1133-ev1 does below. Or we can simply
make the it a audmux-self call with 3 parameters it needs retrieved
from platform_data or device tree, so that machine driver does not
even bother with the call. Makes sense?
Regards,
Shawn
$ git grep -n mxc_audmux_v2_configure_port sound/soc/imx/
sound/soc/imx/wm1133-ev1.c:277: mxc_audmux_v2_configure_port(MX31_AUDMUX_PORT1_SSI0, ptcr, pdcr);
sound/soc/imx/wm1133-ev1.c:281: mxc_audmux_v2_configure_port(MX31_AUDMUX_PORT5_SSI_PINS_5, ptcr, pdcr);
I guess audmux device needs to be added for all these users. And for
sake of bisect, it should be added as part of patch #5.
Hmm, let's see who are actually using mxc_audmux_v2_configure_port().
$ git grep -n mxc_audmux_v2_configure_port arch/arm/
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:246: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:254: mxc_audmux_v2_configure_port(4,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:257: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:265: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:365: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:371: mxc_audmux_v2_configure_port(0,
I didn't grep arch/arm. where is pc043 asoc machine file?
quoted
As we are moving audmux into sound/soc/imx, it makes less sense to
still keep these calls in board files.
It don't corrupt git bisect. We don't have to include it in this patch.
Instead, I prefer to call it
from machine driver like what wm1133-ev1 does below.
Maybe pass the info as asoc machine driver pdata.
Or we can simply
make the it a audmux-self call with 3 parameters it needs retrieved
from platform_data or device tree, so that machine driver does not
even bother with the call. Makes sense?
audux configuration may change after initial set. For example, it may use
one configuration for audio playback, but use another when you connect a
BT audio device.
There are 4 more occurrences of the symbol to be removed together.
arch/arm/mach-imx/Kconfig:58: select ARCH_MXC_AUDMUX_V2
arch/arm/mach-imx/Kconfig:75: select ARCH_MXC_AUDMUX_V2
arch/arm/mach-imx/Kconfig:83: select ARCH_MXC_AUDMUX_V2
arch/arm/mach-imx/Kconfig:92: select ARCH_MXC_AUDMUX_V2
I would like to test your audio support patch on mx6sabrelite, but the
missing sound/soc/imx-sgtl5000.c does not allow me to do it.
I think you would better introduce sound/soc/imx-sgtl5000.c first (on
separate patch series) so that people could test this patch without
using the imx-sgtl5000.c implementation from the Linaro kernel.
Without imx-sgtl5000.c in place, this patch only introduces dead code
at the moment.
Regards,
Fabio Estevam
Since the audmux is a part of the SoC silicon shouldn't the SoC just
register the device without individual boards having to do anything
(possibly conditional on ASoC being selected in Kconfig or something)?
It's going to be connected in exactly the same fashion on any system
using the SoC.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120202/18cd0d76/attachment.sig>
Hmm, let's see who are actually using mxc_audmux_v2_configure_port().
$ git grep -n mxc_audmux_v2_configure_port arch/arm/
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:246: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:254: mxc_audmux_v2_configure_port(4,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:257: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:265: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:365: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:371: mxc_audmux_v2_configure_port(0,
I didn't grep arch/arm. where is pc043 asoc machine file?
It seems to be sound/soc/imx/phycore-ac97.c.
quoted
quoted
As we are moving audmux into sound/soc/imx, it makes less sense to
still keep these calls in board files.
It don't corrupt git bisect. We don't have to include it in this patch.
It's logically part of this series.
quoted
Instead, I prefer to call it
from machine driver like what wm1133-ev1 does below.
Maybe pass the info as asoc machine driver pdata.
Sounds good.
quoted
Or we can simply
make the it a audmux-self call with 3 parameters it needs retrieved
from platform_data or device tree, so that machine driver does not
even bother with the call. Makes sense?
audux configuration may change after initial set. For example, it may use
one configuration for audio playback, but use another when you connect a
BT audio device.
Since the audmux is a part of the SoC silicon shouldn't the SoC just
register the device without individual boards having to do anything
(possibly conditional on ASoC being selected in Kconfig or something)?
It's going to be connected in exactly the same fashion on any system
using the SoC.
Hmm, we are trying to save adding the device for those boards which do
not route any audmux pins out at all.
--
Regards,
Shawn
From: Mark Brown <hidden> Date: 2012-02-02 13:26:18
On Thu, Feb 02, 2012 at 09:17:18PM +0800, Shawn Guo wrote:
On Thu, Feb 02, 2012 at 12:09:01PM +0000, Mark Brown wrote:
quoted
Since the audmux is a part of the SoC silicon shouldn't the SoC just
register the device without individual boards having to do anything
(possibly conditional on ASoC being selected in Kconfig or something)?
It's going to be connected in exactly the same fashion on any system
using the SoC.
Hmm, we are trying to save adding the device for those boards which do
not route any audmux pins out at all.
I would like to test your audio support patch on mx6sabrelite, but the
missing sound/soc/imx-sgtl5000.c does not allow me to do it.
I have a test branch. I'll push to my linaro git on git.linaro.org tomorrow.
I think you would better introduce sound/soc/imx-sgtl5000.c first (on
separate patch series) so that people could test this patch without
using the imx-sgtl5000.c implementation from the Linaro kernel.
Without imx-sgtl5000.c in place, this patch only introduces dead code
at the moment.
Each patch make sense too without sgtl5000.
Thanks
Richard
Hmm, let's see who are actually using mxc_audmux_v2_configure_port().
$ git grep -n mxc_audmux_v2_configure_port arch/arm/
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:246: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:254: mxc_audmux_v2_configure_port(4,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:257: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:265: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:365: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:371: mxc_audmux_v2_configure_port(0,
I didn't grep arch/arm. where is pc043 asoc machine file?
It seems to be sound/soc/imx/phycore-ac97.c.
You see, we're not famaliar with the boards.
quoted
quoted
quoted
As we are moving audmux into sound/soc/imx, it makes less sense to
still keep these calls in board files.
It don't corrupt git bisect. We don't have to include it in this patch.
It's logically part of this series.
I don't know much about the above boards and I can not test either. I think I
have to leave it to other volunteers. I mainly focus on audmux itself.
quoted
quoted
Instead, I prefer to call it
from machine driver like what wm1133-ev1 does below.
Maybe pass the info as asoc machine driver pdata.
Sounds good.
quoted
quoted
Or we can simply
make the it a audmux-self call with 3 parameters it needs retrieved
from platform_data or device tree, so that machine driver does not
even bother with the call. Makes sense?
audux configuration may change after initial set. For example, it may use
one configuration for audio playback, but use another when you connect a
BT audio device.
On Thu, Feb 02, 2012 at 01:26:18PM +0000, Mark Brown wrote:
On Thu, Feb 02, 2012 at 09:17:18PM +0800, Shawn Guo wrote:
quoted
On Thu, Feb 02, 2012 at 12:09:01PM +0000, Mark Brown wrote:
quoted
quoted
Since the audmux is a part of the SoC silicon shouldn't the SoC just
register the device without individual boards having to do anything
(possibly conditional on ASoC being selected in Kconfig or something)?
It's going to be connected in exactly the same fashion on any system
using the SoC.
quoted
Hmm, we are trying to save adding the device for those boards which do
not route any audmux pins out at all.
That's why I'm saying perhaps make it conditional on having ASoC built
(or even on having the AUDMUX driver built).
Do you mean by having the below in some place like function
imx31_soc_init()?
#ifdef CONFIG_SND_MXC_SOC_AUDMUXV2
imx_add_platform_device("audmux-v2", 0,
audmux_res, ARRAY_SIZE(audmux_res), NULL, 0);
#endif
I do not think it's nice and consistent to the way that imx
sub-architecture adds platform device.
Furthermore, when a DT based board boots here, the code is broken.
Explicitly adding the device by individual board as needed can easily
align with DT based boards. By default, the audmux node in <soc>.dtsi
file has status = "disabled", and any board that needs audmux device
only need to overwrite status property of audmux node as 'okay' in its
<board>.dts. Then DT core will add the audmux device when the board
boots.
--
Regards,
Shawn
Without imx-sgtl5000.c in place, this patch only introduces dead code
at the moment.
Each patch make sense too without sgtl5000.
Well, as this patch goal is to provide audio support to mx6sabrelite,
we need imx-sgtl5000 in place to test it, right? How can we know that
don't get a kernel oops or something?
Regards,
Fabio Estevam
Yes (you need to check for module too, there's a macro for that the name
of which escapes me right now).
I do not think it's nice and consistent to the way that imx
sub-architecture adds platform device.
Well, the i.MX thus far has had relatively few of these always present
type devices - it makes sense to make things conditional for devices
with external signals but for things entirely within the SoC the above
is less work.
Furthermore, when a DT based board boots here, the code is broken.
Explicitly adding the device by individual board as needed can easily
align with DT based boards. By default, the audmux node in <soc>.dtsi
file has status = "disabled", and any board that needs audmux device
only need to overwrite status property of audmux node as 'okay' in its
<board>.dts. Then DT core will add the audmux device when the board
boots.
Hmm, let's see who are actually using mxc_audmux_v2_configure_port().
$ git grep -n mxc_audmux_v2_configure_port arch/arm/
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:246: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:254: mxc_audmux_v2_configure_port(4,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:257: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:265: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:365: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:371: mxc_audmux_v2_configure_port(0,
I didn't grep arch/arm. where is pc043 asoc machine file?
It seems to be sound/soc/imx/phycore-ac97.c.
You see, we're not famaliar with the boards.
It does not need to be familiar with the board to find that out. I'm
not familiar with the board either, but I gave the answer.
quoted
quoted
quoted
quoted
As we are moving audmux into sound/soc/imx, it makes less sense to
still keep these calls in board files.
It don't corrupt git bisect. We don't have to include it in this patch.
It's logically part of this series.
I don't know much about the above boards and I can not test either. I think I
have to leave it to other volunteers. I mainly focus on audmux itself.
Since you get there, you should be the one cleaning that up. You will
need to touch those board files anyway, since you need to add audmux
device for those boards. So no hardware for testing is not an excuse.
For those boards, all you need to do are:
* Change and compile-test the code
* Cc board maintainers when submitting the patch
We will wait for board maintainers to respond for a reasonable period
of time. If we do not get any response during the time, we will send
patch upstream anyway.
--
Regards,
Shawn
From: Richard Zhao <hidden> Date: 2012-02-02 14:41:18
On Thu, Feb 02, 2012 at 12:15:52PM -0200, Fabio Estevam wrote:
On 2/2/12, Richard Zhao [off-list ref] wrote:
quoted
quoted
Without imx-sgtl5000.c in place, this patch only introduces dead code
at the moment.
Each patch make sense too without sgtl5000.
Well, as this patch goal is to provide audio support to mx6sabrelite,
we need imx-sgtl5000 in place to test it, right?
My goal seem less important here. You see I'm adding more and more things
into the patch series, which is out of my goal. The maintainers only
consider right patch go to right git.
How can we know that
don't get a kernel oops or something?
patch pass building is possible go to upstream too.
Hmm, let's see who are actually using mxc_audmux_v2_configure_port().
$ git grep -n mxc_audmux_v2_configure_port arch/arm/
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:246: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:254: mxc_audmux_v2_configure_port(4,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:257: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:265: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:365: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:371: mxc_audmux_v2_configure_port(0,
It's machine specific code, though audmux driver is common. Might be ok?
The asoc machine file for the above 3 boards is not platform driver, and
don't get any plat info.
Sascha, Any suggestion? I saw pcm043 board was added by you.
quoted
quoted
I didn't grep arch/arm. where is pc043 asoc machine file?
It seems to be sound/soc/imx/phycore-ac97.c.
You see, we're not famaliar with the boards.
quoted
quoted
quoted
quoted
As we are moving audmux into sound/soc/imx, it makes less sense to
still keep these calls in board files.
It don't corrupt git bisect. We don't have to include it in this patch.
It's logically part of this series.
I don't know much about the above boards and I can not test either. I think I
have to leave it to other volunteers. I mainly focus on audmux itself.
quoted
quoted
quoted
Instead, I prefer to call it
from machine driver like what wm1133-ev1 does below.
Maybe pass the info as asoc machine driver pdata.
Sorry, they're not platform drivers.
quoted
Sounds good.
quoted
quoted
Or we can simply
make the it a audmux-self call with 3 parameters it needs retrieved
from platform_data or device tree, so that machine driver does not
even bother with the call. Makes sense?
audux configuration may change after initial set. For example, it may use
one configuration for audio playback, but use another when you connect a
BT audio device.
On Thu, Feb 02, 2012 at 09:09:03PM +0800, Shawn Guo wrote:
On Thu, Feb 02, 2012 at 05:24:28PM +0800, Richard Zhao wrote:
quoted
On Thu, Feb 02, 2012 at 05:11:34PM +0800, Shawn Guo wrote:
...
quoted
quoted
Or we can simply
make the it a audmux-self call with 3 parameters it needs retrieved
from platform_data or device tree, so that machine driver does not
even bother with the call. Makes sense?
audux configuration may change after initial set. For example, it may use
one configuration for audio playback, but use another when you connect a
BT audio device.
Right. I forgot this point.
With a second thought on this, we can still do this as long as we have
mxc_audmux_v2_configure_port() exported. For init-time setup, we can
just do it in audmux driver probe function.
--
Regards,
Shawn
Hmm, let's see who are actually using mxc_audmux_v2_configure_port().
$ git grep -n mxc_audmux_v2_configure_port arch/arm/
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:246: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c:254: mxc_audmux_v2_configure_port(4,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:257: mxc_audmux_v2_configure_port(0,
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c:265: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:365: mxc_audmux_v2_configure_port(3,
arch/arm/mach-imx/mach-pcm043.c:371: mxc_audmux_v2_configure_port(0,
It's machine specific code, though audmux driver is common. Might be ok?
With audmux driver moved out, it's not ok to me to have board file
call this function.
The asoc machine file for the above 3 boards is not platform driver, and
don't get any plat info.
It can be nicely solved if we do these initial setup in audmux driver
probe function with the configuration data retrieved from audmux
platform data or device tree.
--
Regards,
Shawn
It's machine specific code, though audmux driver is common. Might be
ok?
With audmux driver moved out, it's not ok to me to have board file
call this function.
quoted
The asoc machine file for the above 3 boards is not platform driver,
and
quoted
don't get any plat info.
It can be nicely solved if we do these initial setup in audmux driver
probe function with the configuration data retrieved from audmux
platform data or device tree.
no, it is asoc machine driver to have machine specific code.
the machine driver do not correspond to any hw device, which cause hard to bind dt or create platform device.
It's machine specific code, though audmux driver is common. Might be
ok?
With audmux driver moved out, it's not ok to me to have board file
call this function.
quoted
The asoc machine file for the above 3 boards is not platform driver,
and
quoted
don't get any plat info.
It can be nicely solved if we do these initial setup in audmux driver
probe function with the configuration data retrieved from audmux
platform data or device tree.
no, it is asoc machine driver to have machine specific code.
the machine driver do not correspond to any hw device, which cause hard
to bind dt or create platform device.
I'll have to keep audmux driver in arch/, till ASOC machine driver
has a way to get platfrom parameters.
Thanks
Richard
From: Mark Brown <hidden> Date: 2012-02-14 06:06:28
On Tue, Feb 14, 2012 at 09:35:07AM +0800, Richard Zhao wrote:
On Sun, Feb 05, 2012 at 12:50:15PM +0800, Richard Zhao wrote:
quoted
no, it is asoc machine driver to have machine specific code.
the machine driver do not correspond to any hw device, which cause hard
to bind dt or create platform device.
I'll have to keep audmux driver in arch/, till ASOC machine driver
has a way to get platfrom parameters.
Machine drivers can easily get platform data, they're just regular
drivers of whatever type so can get platform data in the same way that
any other driver for their bus can.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120213/8c785d8b/attachment.sig>
From: Richard Zhao <hidden> Date: 2012-02-14 07:34:15
On Mon, Feb 13, 2012 at 10:06:28PM -0800, Mark Brown wrote:
On Tue, Feb 14, 2012 at 09:35:07AM +0800, Richard Zhao wrote:
quoted
On Sun, Feb 05, 2012 at 12:50:15PM +0800, Richard Zhao wrote:
quoted
quoted
no, it is asoc machine driver to have machine specific code.
the machine driver do not correspond to any hw device, which cause hard
to bind dt or create platform device.
quoted
I'll have to keep audmux driver in arch/, till ASOC machine driver
has a way to get platfrom parameters.
Machine drivers can easily get platform data, they're just regular
drivers of whatever type so can get platform data in the same way that
any other driver for their bus can.
Machine drivers don't correspond to any hw devices. If we create a
virtual platform device, it'll be hard for DT binding.
Thanks
Richard
From: Mark Brown <hidden> Date: 2012-02-14 17:23:43
On Tue, Feb 14, 2012 at 03:34:15PM +0800, Richard Zhao wrote:
On Mon, Feb 13, 2012 at 10:06:28PM -0800, Mark Brown wrote:
quoted
Machine drivers can easily get platform data, they're just regular
drivers of whatever type so can get platform data in the same way that
any other driver for their bus can.
Machine drivers don't correspond to any hw devices. If we create a
virtual platform device, it'll be hard for DT binding.
As has been discussed repeatedly and at some considerable length the
board design for audio is considered sufficiently interesting to be
worth representing in the device tree directly, there are plenty of
choices made during board design. There is absolutely no technical
problem from doing this on the device tree side.
People working on device tree really need to talk to each other more...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120214/e4642b63/attachment.sig>