Patch IMX audmux debugfs.
Subsystems (3)
$ mount -t debugfs debugfs /sys/kernel/debug $ cd /sys/kernel/debug/audmux $ cat * [crashes when accessing ssi7]
The index is one based, but the register map is zero based. So the ssi1 is actually sending info for ssi2. Also, the ssi7 touches non-existent data and can cause an exception (only registers sets 1-6 exist).
Alternatively, the MX31_AUDMUX_PORT6_SSI_PINS_6 and MX27_AUDMUX_PPCR3_SSI_PINS_3 constants could be used for the loop termination, but maybe that means conditionalization (and there are no MX25 constants).
arch/arm/plat-mxc/audmux-v2.c +2 -2
@@ -66,7 +66,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, {ssize_t ret;char *buf =kmalloc (PAGE_SIZE ,GFP_KERNEL ); -int port = (int )file->private_data; +int port = ((int )file->private_data) -1 ;u32 pdcr, ptcr;if (!buf)
@@ -150,7 +150,7 @@ static void audmux_debugfs_init(void)return ; } -for (i =1 ; i <8 ; i++) { +for (i =1 ; i <7 ; i++) {snprintf (buf,sizeof (buf),"ssi%d" , i);if (!debugfs_create_file (buf,0444 , audmux_debugfs_root, (void *)i, &audmux_debugfs_fops))
Hello.
Quoted 20 lines · Bill Pringlemeir
$ mount -t debugfs debugfs /sys/kernel/debug $ cd /sys/kernel/debug/audmux $ cat * [crashes when accessing ssi7]The index is one based, but the register map is zero based. So the ssi1 is actually sending info for ssi2. Also, the ssi7 touches non-existent data and can cause an exception (only registers sets 1-6 exist).
Alternatively, the
MX31_AUDMUX_PORT6_SSI_PINS_6andMX27_AUDMUX_PPCR3_SSI_PINS_3constants could be used for the loop termination, but maybe that means conditionalization (and there are no MX25 constants).arch/arm/plat-mxc/audmux-v2.c +0
-0
arch/arm/plat-mxc/audmux-v2.c static ssize_t audmux_read_file(struct file *file, char __user *user_buf, · line 69
Quoted 5 lines
arch/arm/plat-mxc/audmux-v2.c +1
-1@@ -66,7 +66,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, {ssize_t ret;char *buf =kmalloc (PAGE_SIZE ,GFP_KERNEL ); -int port = (int )file->private_data; +int port = ((int )file->private_data) -1 ;
Parens around typecast not necessary.
WBR, Sergei
Sascha Hauer
maintainerHi Bill,
Quoted 30 lines · Bill Pringlemeir
$ mount -t debugfs debugfs /sys/kernel/debug $ cd /sys/kernel/debug/audmux $ cat * [crashes when accessing ssi7]The index is one based, but the register map is zero based. So the ssi1 is actually sending info for ssi2. Also, the ssi7 touches non-existent data and can cause an exception (only registers sets 1-6 exist).
Alternatively, the
MX31_AUDMUX_PORT6_SSI_PINS_6andMX27_AUDMUX_PPCR3_SSI_PINS_3constants could be used for the loop termination, but maybe that means conditionalization (and there are no MX25 constants).arch/arm/plat-mxc/audmux-v2.c +1
-1@@ -66,7 +66,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf, {ssize_t ret;char *buf =kmalloc (PAGE_SIZE ,GFP_KERNEL ); -int port = (int )file->private_data; +int port = ((int )file->private_data) -1 ;u32 pdcr, ptcr;if (!buf)
arch/arm/plat-mxc/audmux-v2.c static void audmux_debugfs_init(void) · line 156
Quoted 8 lines
arch/arm/plat-mxc/audmux-v2.c +1
-1@@ -150,7 +150,7 @@ static void audmux_debugfs_init(void)return ; } -for (i =1 ; i <8 ; i++) { +for (i =1 ; i <7 ; i++) {snprintf (buf,sizeof (buf),"ssi%d" , i);if (!debugfs_create_file (buf,0444 , audmux_debugfs_root, (void *)i, &audmux_debugfs_fops))
I prefer passing (void *)(i - 1) here and skipping the first hunk. Please add your Signed-off-by next time you send a patch.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 7 lines · s.hauer at pengutronix.de
Quoted 4 lines · Bill Pringlemeir
$ mount -t debugfs debugfs /sys/kernel/debug $ cd /sys/kernel/debug/audmux $ cat * [crashes when accessing ssi7]
Quoted 7 lines
Quoted 4 lines
The index is one based, but the register map is zero based. So the ssi1 is actually sending info for ssi2. Also, the ssi7 touches non-existent data and can cause an exception (only registers sets 1-6 exist).
I prefer passing (void *)(i - 1) here and skipping the first hunk. Please add your Signed-off-by next time you send a patch.
Something similar occured in to me after reading Sergei message. This patch treats i as the port instead of the file name. The file name is generated from audmux_port_string making the filenames and file content the same.
arch/arm/plat-mxc/audmux-v2.c +3 -4
@@ -142,7 +142,6 @@ static const struct file_operations audmux_debugfs_fops = {static void audmux_debugfs_init (void ) {int i; -char buf[20 ]; audmux_debugfs_root =debugfs_create_dir ("audmux" ,NULL );if (!audmux_debugfs_root) {
@@ -150,9 +149,9 @@ static void audmux_debugfs_init(void)return ; } -for (i =1 ; i <8 ; i++) { -snprintf (buf,sizeof (buf),"ssi%d" , i); -if (!debugfs_create_file (buf,0444 , audmux_debugfs_root, +for (i =0 ; i <6 ; i++) { +if (!debugfs_create_file (audmux_port_string (i),0444 , + audmux_debugfs_root, (void *)i, &audmux_debugfs_fops))pr_warning ("Failed to create AUDMUX port %d debugfs file\n" , i);
Sascha Hauer
maintainerQuoted 14 lines · Bill Pringlemeir
Quoted 11 lines · s.hauer at pengutronix.de
Quoted 9 lines · Bill Pringlemeir
$ mount -t debugfs debugfs /sys/kernel/debug $ cd /sys/kernel/debug/audmux $ cat * [crashes when accessing ssi7]The index is one based, but the register map is zero based. So the ssi1 is actually sending info for ssi2. Also, the ssi7 touches non-existent data and can cause an exception (only registers sets 1-6 exist).
Quoted 7 lines
Quoted 2 lines
I prefer passing (void *)(i - 1) here and skipping the first hunk. Please add your Signed-off-by next time you send a patch.
Something similar occured in to me after reading Sergei message. This patch treats i as the port instead of the file name. The file name is generated from
audmux_port_stringmaking the filenames and file content the same.
Ok, looks sensible to me. I added Mark Brown to Cc as he added the debugfs support in the first place. Maybe he has some comment to add.
Sascha
Quoted 28 lines
Signed-off-by Bill Pringlemeir <[email protected]>arch/arm/plat-mxc/audmux-v2.c +3
-4@@ -142,7 +142,6 @@ static const struct file_operations audmux_debugfs_fops = {static void audmux_debugfs_init (void ) {int i; -char buf[20 ]; audmux_debugfs_root =debugfs_create_dir ("audmux" ,NULL );if (!audmux_debugfs_root) {@@ -150,9 +149,9 @@ static void audmux_debugfs_init(void)return ; } -for (i =1 ; i <8 ; i++) { -snprintf (buf,sizeof (buf),"ssi%d" , i); -if (!debugfs_create_file (buf,0444 , audmux_debugfs_root, +for (i =0 ; i <6 ; i++) { +if (!debugfs_create_file (audmux_port_string (i),0444 , + audmux_debugfs_root, (void *)i, &audmux_debugfs_fops))pr_warning ("Failed to create AUDMUX port %d debugfs file\n" , i);
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 2 lines · Sascha Hauer
Ok, looks sensible to me. I added Mark Brown to Cc as he added the debugfs support in the first place. Maybe he has some comment to add.
Not really, except that the numbers used correspond to the numbers used by the audmux APIs in the kernel IIRC.
On 12 Nov 2010, broonie at opensource.wolfsonmicro.com wrote:
Quoted 5 lines · Sascha Hauer
Quoted 2 lines
Ok, looks sensible to me. I added Mark Brown to Cc as he added the debugfs support in the first place. Maybe he has some comment to add.
Not really, except that the numbers used correspond to the numbers used by the audmux APIs in the kernel IIRC.
I guess that was non-obvious as 'port 0' (corresponding to imx-ssi.0) has no associated file in the current code. I can re-submit a patch with just this correction; add SSI0 and remove SSI6, SSI7 files.
However, as someone who is/was debugging an SOC audio system and stumbled upon this debugfs entry, I don't think those numbers are apparently obvious even with the fix. I think both Sascha and I had thought SSI1 corresponded to what should have been SSI0 (er, maybe I lead Sascha that way). I still think that having the 'port/channel' name used in the file correspond to the the actual file names is probably at least as debugfs user friendly. The files names/content are being viewed together so consistency seems in order.
Also, the kernel numbers *can* be referred to by macros and some users might not even realize these numbers exist. In any case, I would have probably clued in if SSI0 had existed. So I will fix that if we want to remain with it? The first patch submitted didn't do this.
Regards,
Bill Pringlemeir.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/1 Fix audmuxv2 debugfs indexing. [was: Patch IMX audmux debugfs.]
On 14 Nov 2010, bpringle at sympatico.ca wrote:
On 12 Nov 2010, broonie at opensource.wolfsonmicro.com wrote:
Quoted 5 lines · Sascha Hauer
Quoted 5 lines
Quoted 2 lines
Ok, looks sensible to me. I added Mark Brown to Cc as he added the debugfs support in the first place. Maybe he has some comment to add.
Not really, except that the numbers used correspond to the numbers used by the audmux APIs in the kernel IIRC.
[snip]
Quoted 4 lines
Also, the kernel numbers *can* be referred to by macros and some users might not even realize these numbers exist. In any case, I would have probably clued in if SSI0 had existed. So I will fix that if we want to remain with it? The first patch submitted didn't do this.
Following is the simple patch which corrects improper file indexing of audmux port numbers. Ie, ssi6, ssi7. It also adds the ssi0 file. The directory looks like this,
root at uclibc /sys/kernel/debug/audmux$ ls
ssi0 ssi1 ssi2 ssi3 ssi4 ssi5
With the number in ssi[0-5], corresponding to the 'MX31_AUDMUX_PORT[1-6]_*' and 'MX27_AUDMUX_[PH]PCR[1-3]_*' in audmux.h or the raw value of the 'port' parameter of mxc_audmux_v2_configure_port().
arch/arm/plat-mxc/audmux-v2.c +1 -1
@@ -150,7 +150,7 @@ static void audmux_debugfs_init(void)return ; } -for (i =1 ; i <8 ; i++) { +for (i =0 ; i <6 ; i++) {snprintf (buf,sizeof (buf),"ssi%d" , i);if (!debugfs_create_file (buf,0444 , audmux_debugfs_root, (void *)i, &audmux_debugfs_fops))
PATCH v3 1/1 Fix audmuxv2 debugfs indexing. [was: Patch IMX audmux debugfs.]
arch/arm/plat-mxc/audmux-v2.c static void audmux_debugfs_init(void) · line 156
Quoted 5 lines · Bill Pringlemeir
arch/arm/plat-mxc/audmux-v2.c +1
-1-for (i =1 ; i <8 ; i++) { +for (i =0 ; i <6 ; i++) {snprintf (buf,sizeof (buf),"ssi%d" , i);if (!debugfs_create_file (buf,0444 , audmux_debugfs_root, (void *)i, &audmux_debugfs_fops))
We appear to have misplaced a SSI port here...
PATCH v3 1/1 Fix audmuxv2 debugfs indexing.
On 15 Nov 2010, broonie at opensource.wolfsonmicro.com wrote:
Quoted 7 lines · Bill Pringlemeir
Quoted 5 lines
arch/arm/plat-mxc/audmux-v2.c +1
-1-for (i =1 ; i <8 ; i++) { +for (i =0 ; i <6 ; i++) {
snprintf(buf, sizeof(buf), "ssi%d", i);
if (!debugfs_create_file(buf, 0444,audmux_debugfs_root, (void *)i,&audmux_debugfs_fops))We appear to have misplaced a SSI port here...
Hmm, that is right. SSI6 was returning bogus data (inside the debugfs file "UNKNOWN" occured)... Maybe it is just never setup right. I will look.
Signature · 1 line
Yow! Legally-imposed CULTURE-reduction is CABBAGE-BRAINED!
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/1 Fix audmuxv2 debugfs indexing.
On 15 Nov 2010, bpringle at sympatico.ca wrote:
On 15 Nov 2010, broonie at opensource.wolfsonmicro.com wrote:
Quoted 11 lines · Bill Pringlemeir
Quoted 7 lines
Quoted 5 lines
arch/arm/plat-mxc/audmux-v2.c +1
-1-for (i =1 ; i <8 ; i++) { +for (i =0 ; i <6 ; i++) {
snprintf(buf, sizeof(buf), "ssi%d", i);
if (!debugfs_create_file(buf, 0444,audmux_debugfs_root, (void *)i,&audmux_debugfs_fops))We appear to have misplaced a SSI port here...
Hmm, that is right. SSI6 was returning bogus data (inside the debugfs file "UNKNOWN" occured)... Maybe it is just never setup right. I will look.
I had thought the audmux_port_string() was correct and 'SSI6' was looking at some 'bad memory'.
Sorry, I should have waited to email. audmux_port_string() only handles six values (not seven). Also, the audmux.h only has six defines for both MX31 and MX27. There isn't an SSI7 that is being reported by the debugfs. However, a user of the audmux-v2.c code can call mxc_audmux_v2_configure_port() with a port value of '6' to configure audmux pin set 7 ;-)
The documentation we are working with isn't that helpful. For the iMx 25 pg 13-4, it says there are "Three internal ports", but I can only find two ssi devices (with two channels of audio each)...
fwiw,
Bill Pringlemeir.
PATCH v3 1/1 Fix audmuxv2 debugfs indexing.
Quoted 6 lines · Bill Pringlemeir
Sorry, I should have waited to email.
audmux_port_string()only handles six values (not seven). Also, theaudmux.honly has six defines for both MX31 and MX27. There isn't an SSI7 that is being reported by the debugfs. However, a user of theaudmux-v2.ccode can callmxc_audmux_v2_configure_port()with a port value of '6' to configure audmux pin set 7 ;-)
SSI7 is an internal network connection thing of some kind.
Quoted 3 lines
The documentation we are working with isn't that helpful. For the iMx 25 pg 13-4, it says there are "Three internal ports", but I can only find two ssi devices (with two channels of audio each)...
It's not an SSI port.
PATCH v3 1/1 Fix audmuxv2 debugfs indexing.
On 15 Nov 2010, broonie at opensource.wolfsonmicro.com wrote:
Quoted 8 lines · Bill Pringlemeir
Quoted 6 lines
Sorry, I should have waited to email.
audmux_port_string()only handles six values (not seven). Also, theaudmux.honly has six defines for both MX31 and MX27. There isn't an SSI7 that is being reported by the debugfs. However, a user of theaudmux-v2.ccode can callmxc_audmux_v2_configure_port()with a port value of '6' to configure audmux pin set 7 ;-)SSI7 is an internal network connection thing of some kind.
On pg 4-60 of the IMX 25 reference manual, the IOMUX configuration for ALT3 is AUD7_TXFS. This makes me think it is a 'physical' pin after the IOMUX routing.
$ grep AUD7 arch/arm/plat-mxc/include/mach/iomux-mx25.h
364:#define MX25_PAD_SD1_DATA1__AUD7_RXD
469:#define MX25_PAD_GPIO_E__AUD7_TXD
472:#define MX25_PAD_GPIO_F__AUD7_TXC
481:#define MX25_PAD_VSTBY_REQ__AUD7_TXFS
487:#define MX25_PAD_POWER_FAIL__AUD7_RXD Oddly, the iomux-mx25.h is the only 'iomux-mx[1235]*.h' one with this audmux 7 configuration, but some of the ALT configuration values are missing from these files. Maybe the MX25 is different. It is the only IMX processor that I am familar with.
'iomux-mx25.h' has
77:#define MX25_PAD_EB0__AUD4_TXD
81:#define MX25_PAD_EB1__AUD4_RXD
85:#define MX25_PAD_OE__AUD4_TXC
117:#define MX25_PAD_RW__AUD4_TXFS
364:#define MX25_PAD_SD1_DATA1__AUD7_RXD
394:#define MX25_PAD_KPP_COL0__AUD5_TXD
399:#define MX25_PAD_KPP_COL1__AUD5_RXD
404:#define MX25_PAD_KPP_COL2__AUD5_TXC
409:#define MX25_PAD_KPP_COL3__AUD5_TXFS
413:#define MX25_PAD_FEC_MDC__AUD4_TXD
417:#define MX25_PAD_FEC_MDIO__AUD4_RXD
424:#define MX25_PAD_FEC_TDATA1__AUD4_TXFS
469:#define MX25_PAD_GPIO_E__AUD7_TXD
472:#define MX25_PAD_GPIO_F__AUD7_TXC
481:#define MX25_PAD_VSTBY_REQ__AUD7_TXFS
487:#define MX25_PAD_POWER_FAIL__AUD7_RXD As well, chapter 4 (IOMUX) of the IMX25 RM has,
LD8, ALT4 -> AUD3_TXD
LD9, ALT4 -> AUD3_RXD
LD10, ALT4 -> AUD3_TXC
LD11, ALT4 -> AUD3_TXFS
LD14, ALT6 -> AUD3_RXC
LD15, ALT6 -> AUD3_RXFS
CSID8, ALT2 -> AUD6_RXC
... etc.
Quoted 5 lines
Quoted 3 lines
The documentation we are working with isn't that helpful. For the iMx 25 pg 13-4, it says there are "Three internal ports", but I can only find two ssi devices (with two channels of audio each)...
It's not an SSI port.
No, I don't think it is an SSI protocol device either. I think there are two internal ports and five external ports, at least on the IMX
25. Maybe the documentation is cut and paste from another processor?
There is this cryptic section of the on pg 13-4,
13.2 External Signal Description
Table 13-2 lists AUDMUX pin-level signals for the external ports, where:
? Pn is P4, through P7
? m = n ? 3.
The port is configured as an external port by a static system-level signal input pn_int_ext_select.
I guess they could be 'internal' if you didn't configure an external pin with the iomux module. Register IOMUXC_AUDMUX_P4_INPUT_DA_AMX_SELECT_INPUT (offset 0x460) might be what the above section refers to, but this involves 'daisy chaining' and only AUDMUX_P4 and AUDMUX_P7 are listed here (No P3,P5,P6).
Thanks for you help. I *think* I am getting closer to understanding this now.
Regards,
Bill Pringlemeir.
Signature · 1 line
Someday we'll look back on all this and plow into a parked car.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/1 Fix audmuxv2 debugfs indexing.
Quoted 3 lines · bpringle at sympatico.ca
No, I don't think it is an SSI protocol device either. I think there are two internal ports and five external ports, at least on the IMX
25. Maybe the documentation is cut and paste from another processor?
[snip]
Quoted 2 lines
Thanks for you help. I *think* I am getting closer to understanding this now.
I sent a service request to Freescale,
[Technical Support Freescale Semiconductor]
In reply to your Service Request SR 1-694170620: The i.MX25 AUDMUX Port1 and Port2 are connected to the internal SSI modules, the Port3 to Port7 are connected to external pins through the IOMUX module. The Port7 can be always used as external port, regardless of the CE bus mode. Should you need to contact us with regard to this message, please see the notes below.
It looks like the i.MX25 is a mix of the i.MX31 and i.MX35. I think it makes the most sense to change the audmux_port_string() to return "SSI7" instead of "UNKNOWN" for this port and fix the loop indexes.
I will re-submit those patches later.
Regards,
Bill Pringlemeir.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/1 Fix audmuxv2 debugfs indexing.
Quoted 1 line · bpringle at sympatico.ca
I will re-submit those patches later.
Here is the audmux debug directory after this patch,
root at freescale /sys/kernel/debug/audmux$ ls
SSI3 SSI4 SSI5 SSI6 SSI7 imx-ssi.0 imx-ssi.1
root at freescale /sys/kernel/debug/audmux$ cat SSI7
PDCR: 0000c000
PTCR: 00000800
TxFS input, TxClk input
Port is symmetric
Data received from SSI7
The ugly part is 'case 6:'. However, there currently is no constants defined in audmux.h for this port. Also, mxc_audmux_v2_configure_port() isn't protecting against ports out of range and there are no constants for the IMX25. I would need answers to what should be done to invent a define for 'port 6 (SSI7)'. Using MX31 constants seems incomplete as this code could be active for an MX35 and MX25 as well.
arch/arm/plat-mxc/audmux-v2.c +5 -4
@@ -56,6 +56,8 @@ static const char *audmux_port_string(int port)return "SSI5" ;case MX31_AUDMUX_PORT6_SSI_PINS_6 :return "SSI6" ; +case 6 :/* internal or pins AUDMUX_PORT7 */ +return "SSI7" ;default :return "UNKNOWN" ; }
@@ -142,7 +144,6 @@ static const struct file_operations audmux_debugfs_fops = {static void audmux_debugfs_init (void ) {int i; -char buf[20 ]; audmux_debugfs_root =debugfs_create_dir ("audmux" ,NULL );if (!audmux_debugfs_root) {
@@ -150,9 +151,9 @@ static void audmux_debugfs_init(void)return ; } -for (i =1 ; i <8 ; i++) { -snprintf (buf,sizeof (buf),"ssi%d" , i); -if (!debugfs_create_file (buf,0444 , audmux_debugfs_root, +for (i =0 ; i <7 ; i++) { +if (!debugfs_create_file (audmux_port_string (i),0444 , + audmux_debugfs_root, (void *)i, &audmux_debugfs_fops))pr_warning ("Failed to create AUDMUX port %d debugfs file\n" , i);
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/1 Fix audmuxv2 debugfs indexing.
Quoted 6 lines · bpringle at sympatico.ca
Following is the simple patch which corrects improper file indexing of audmux port numbers. Ie, ssi6, ssi7. It also adds the ssi0 file. The directory looks like this,
root at uclibc
/sys/kernel/debug/audmux$ls
ssi0 ssi1 ssi2 ssi3 ssi4 ssi5
The attached incremental patch changes the audmux v2 file naming to correspond to the names used within the file.
root at uclibc /sys/kernel/debug/audmux$ ls
SSI3 SSI4 SSI5 SSI6 imx-ssi.0 imx-ssi.1
root at uclibc /sys/kernel/debug/audmux$ cat imx-ssi.1
PDCR: 00008000
PTCR: a5000800
TxFS output from SSI5, TxClk output from SSI5 Port is symmetric
Data received from SSI5
The file 'imx-ssi.1' was 'ssi1'. Here, the imx-ssi.1 driver is connected to audmux pin set 5. Perhaps 'audmux[3-5]' are better names than SSI[3-5], if we are updating the naming scheme. I think the upper case names shout hardware loud enough.
arch/arm/plat-mxc/audmux-v2.c +2 -3
@@ -142,7 +142,6 @@ static const struct file_operations audmux_debugfs_fops = {static void audmux_debugfs_init (void ) {int i; -char buf[20 ]; audmux_debugfs_root =debugfs_create_dir ("audmux" ,NULL );if (!audmux_debugfs_root) {
@@ -151,8 +150,8 @@ static void audmux_debugfs_init(void) }for (i =0 ; i <6 ; i++) { -snprintf (buf,sizeof (buf),"ssi%d" , i); -if (!debugfs_create_file (buf,0444 , audmux_debugfs_root, +if (!debugfs_create_file (audmux_port_string (i),0444 , + audmux_debugfs_root, (void *)i, &audmux_debugfs_fops))pr_warning ("Failed to create AUDMUX port %d debugfs file\n" , i);