All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH - aplay 1/1] aplay - option to dump HW parameters
@ 2012-03-02 20:32 pavel.hofman
  2012-03-05 14:23 ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: pavel.hofman @ 2012-03-02 20:32 UTC (permalink / raw)
  To: patch; +Cc: Pavel Hofman, alsa-devel

From: Pavel Hofman <pavel.hofman@ivitera.com>

Dumping HW parameters of the current device with snd_pcm_hw_params_dump,
a new option --dump-hw-params added.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>

diff --git a/aplay/aplay.1 b/aplay/aplay.1
index 2acaed5..218d0b5 100644
--- a/aplay/aplay.1
+++ b/aplay/aplay.1
@@ -184,6 +184,9 @@ the month, %H hour, %M minute and %S second.  In addition, %v is
 the file number, starting at 1.  When this option is specified,
 intermediate directories for the output file are created automatically.
 This option has no effect if \-\-separate\-channels is specified.
+.TP
+\fI\-\-dump\-hw\-params\fP
+Dump HW parameters of the given device to stderr.
 
 .SH SIGNALS
 When recording, SIGINT, SIGTERM and SIGABRT will close the output 
diff --git a/aplay/aplay.c b/aplay/aplay.c
index 73a9544..0633cbd 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -129,6 +129,7 @@ static int max_file_time = 0;
 static int use_strftime = 0;
 volatile static int recycle_capture_file = 0;
 static long term_c_lflag = -1;
+static int dump_hw_params = 0;
 
 static int fd = -1;
 static off64_t pbrec_count = LLONG_MAX, fdcount;
@@ -223,7 +224,8 @@ _("Usage: %s [OPTION]... [FILE]...\n"
 "    --max-file-time=#   start another output file when the old file has recorded\n"
 "                        for this many seconds\n"
 "    --process-id-file   write the process ID here\n"
-"    --use-strftime      apply the strftime facility to the output file name\n")
+"    --use-strftime      apply the strftime facility to the output file name\n"
+"    --dump-hw-params    dump hw_params of the device\n")
 		, command);
 	printf(_("Recognized sample formats are:"));
 	for (k = 0; k < SND_PCM_FORMAT_LAST; ++k) {
@@ -416,7 +418,8 @@ enum {
 	OPT_TEST_NOWAIT,
 	OPT_MAX_FILE_TIME,
 	OPT_PROCESS_ID_FILE,
-	OPT_USE_STRFTIME
+	OPT_USE_STRFTIME,
+	OPT_DUMP_HWPARAMS
 };
 
 int main(int argc, char *argv[])
@@ -461,6 +464,7 @@ int main(int argc, char *argv[])
 		{"process-id-file", 1, 0, OPT_PROCESS_ID_FILE},
 		{"use-strftime", 0, 0, OPT_USE_STRFTIME},
 		{"interactive", 0, 0, 'i'},
+		{"dump-hw-params", 0, 0, OPT_DUMP_HWPARAMS},
 		{0, 0, 0, 0}
 	};
 	char *pcm_name = "default";
@@ -662,6 +666,9 @@ int main(int argc, char *argv[])
 		case OPT_USE_STRFTIME:
 			use_strftime = 1;
 			break;
+		case OPT_DUMP_HWPARAMS:
+			dump_hw_params = 1;
+			break;
 		default:
 			fprintf(stderr, _("Try `%s --help' for more information.\n"), command);
 			return 1;
@@ -1059,6 +1066,13 @@ static void set_params(void)
 		error(_("Broken configuration for this PCM: no configurations available"));
 		prg_exit(EXIT_FAILURE);
 	}
+	if (dump_hw_params) {
+		fprintf(stderr, _("HW Params of device \"%s\":\n"),
+			snd_pcm_name(handle));
+		fprintf(stderr, "--------------------\n");
+		snd_pcm_hw_params_dump(params, log);
+		fprintf(stderr, "--------------------\n");
+	}
 	if (mmap_flag) {
 		snd_pcm_access_mask_t *mask = alloca(snd_pcm_access_mask_sizeof());
 		snd_pcm_access_mask_none(mask);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH - aplay 1/1] aplay - option to dump HW parameters
  2012-03-02 20:32 [PATCH - aplay 1/1] aplay - option to dump HW parameters pavel.hofman
@ 2012-03-05 14:23 ` Takashi Iwai
  2012-03-05 14:43   ` Pavel Hofman
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2012-03-05 14:23 UTC (permalink / raw)
  To: pavel.hofman; +Cc: alsa-devel

At Fri,  2 Mar 2012 20:32:58 +0000,
pavel.hofman@ivitera.com wrote:
> 
> From: Pavel Hofman <pavel.hofman@ivitera.com>
> 
> Dumping HW parameters of the current device with snd_pcm_hw_params_dump,
> a new option --dump-hw-params added.

Well, the purpose and the actual operation of this option is a bit
unclear with such a short description.  Your patch adds the output of
the pre-config state of the hw_params.  It makes sense since the
post-config state is shown via -v option.  If this is the intended
behavior, please write a bit more details in the man page.


thanks,

Takashi

> 
> Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
> 
> diff --git a/aplay/aplay.1 b/aplay/aplay.1
> index 2acaed5..218d0b5 100644
> --- a/aplay/aplay.1
> +++ b/aplay/aplay.1
> @@ -184,6 +184,9 @@ the month, %H hour, %M minute and %S second.  In addition, %v is
>  the file number, starting at 1.  When this option is specified,
>  intermediate directories for the output file are created automatically.
>  This option has no effect if \-\-separate\-channels is specified.
> +.TP
> +\fI\-\-dump\-hw\-params\fP
> +Dump HW parameters of the given device to stderr.
>  
>  .SH SIGNALS
>  When recording, SIGINT, SIGTERM and SIGABRT will close the output 
> diff --git a/aplay/aplay.c b/aplay/aplay.c
> index 73a9544..0633cbd 100644
> --- a/aplay/aplay.c
> +++ b/aplay/aplay.c
> @@ -129,6 +129,7 @@ static int max_file_time = 0;
>  static int use_strftime = 0;
>  volatile static int recycle_capture_file = 0;
>  static long term_c_lflag = -1;
> +static int dump_hw_params = 0;
>  
>  static int fd = -1;
>  static off64_t pbrec_count = LLONG_MAX, fdcount;
> @@ -223,7 +224,8 @@ _("Usage: %s [OPTION]... [FILE]...\n"
>  "    --max-file-time=#   start another output file when the old file has recorded\n"
>  "                        for this many seconds\n"
>  "    --process-id-file   write the process ID here\n"
> -"    --use-strftime      apply the strftime facility to the output file name\n")
> +"    --use-strftime      apply the strftime facility to the output file name\n"
> +"    --dump-hw-params    dump hw_params of the device\n")
>  		, command);
>  	printf(_("Recognized sample formats are:"));
>  	for (k = 0; k < SND_PCM_FORMAT_LAST; ++k) {
> @@ -416,7 +418,8 @@ enum {
>  	OPT_TEST_NOWAIT,
>  	OPT_MAX_FILE_TIME,
>  	OPT_PROCESS_ID_FILE,
> -	OPT_USE_STRFTIME
> +	OPT_USE_STRFTIME,
> +	OPT_DUMP_HWPARAMS
>  };
>  
>  int main(int argc, char *argv[])
> @@ -461,6 +464,7 @@ int main(int argc, char *argv[])
>  		{"process-id-file", 1, 0, OPT_PROCESS_ID_FILE},
>  		{"use-strftime", 0, 0, OPT_USE_STRFTIME},
>  		{"interactive", 0, 0, 'i'},
> +		{"dump-hw-params", 0, 0, OPT_DUMP_HWPARAMS},
>  		{0, 0, 0, 0}
>  	};
>  	char *pcm_name = "default";
> @@ -662,6 +666,9 @@ int main(int argc, char *argv[])
>  		case OPT_USE_STRFTIME:
>  			use_strftime = 1;
>  			break;
> +		case OPT_DUMP_HWPARAMS:
> +			dump_hw_params = 1;
> +			break;
>  		default:
>  			fprintf(stderr, _("Try `%s --help' for more information.\n"), command);
>  			return 1;
> @@ -1059,6 +1066,13 @@ static void set_params(void)
>  		error(_("Broken configuration for this PCM: no configurations available"));
>  		prg_exit(EXIT_FAILURE);
>  	}
> +	if (dump_hw_params) {
> +		fprintf(stderr, _("HW Params of device \"%s\":\n"),
> +			snd_pcm_name(handle));
> +		fprintf(stderr, "--------------------\n");
> +		snd_pcm_hw_params_dump(params, log);
> +		fprintf(stderr, "--------------------\n");
> +	}
>  	if (mmap_flag) {
>  		snd_pcm_access_mask_t *mask = alloca(snd_pcm_access_mask_sizeof());
>  		snd_pcm_access_mask_none(mask);
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH - aplay 1/1] aplay - option to dump HW parameters
  2012-03-05 14:23 ` Takashi Iwai
@ 2012-03-05 14:43   ` Pavel Hofman
  2012-03-05 15:01     ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel Hofman @ 2012-03-05 14:43 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Dne 5.3.2012 15:23, Takashi Iwai napsal(a):
> At Fri,  2 Mar 2012 20:32:58 +0000,
> pavel.hofman@ivitera.com wrote:
>>
>> From: Pavel Hofman <pavel.hofman@ivitera.com>
>>
>> Dumping HW parameters of the current device with snd_pcm_hw_params_dump,
>> a new option --dump-hw-params added.
> 
> Well, the purpose and the actual operation of this option is a bit
> unclear with such a short description.  Your patch adds the output of
> the pre-config state of the hw_params.  It makes sense since the
> post-config state is shown via -v option.  If this is the intended
> behavior, please write a bit more details in the man page.
> 
> 

Takashi, thanks for your reply. Could I call it hardware capabilities of
the device? Because that is what I think it is. E.g. I fixed that
ice1724 rate-lock incompletion with help of this dump and people have
been asking me about listing similar to ossinfo -v4.

Pavel.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH - aplay 1/1] aplay - option to dump HW parameters
  2012-03-05 14:43   ` Pavel Hofman
@ 2012-03-05 15:01     ` Takashi Iwai
  2012-03-05 15:02       ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2012-03-05 15:01 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: alsa-devel

At Mon, 05 Mar 2012 15:43:08 +0100,
Pavel Hofman wrote:
> 
> Dne 5.3.2012 15:23, Takashi Iwai napsal(a):
> > At Fri,  2 Mar 2012 20:32:58 +0000,
> > pavel.hofman@ivitera.com wrote:
> >>
> >> From: Pavel Hofman <pavel.hofman@ivitera.com>
> >>
> >> Dumping HW parameters of the current device with snd_pcm_hw_params_dump,
> >> a new option --dump-hw-params added.
> > 
> > Well, the purpose and the actual operation of this option is a bit
> > unclear with such a short description.  Your patch adds the output of
> > the pre-config state of the hw_params.  It makes sense since the
> > post-config state is shown via -v option.  If this is the intended
> > behavior, please write a bit more details in the man page.
> > 
> > 
> 
> Takashi, thanks for your reply. Could I call it hardware capabilities of
> the device?

Yeah, it sounds more intuitive.  But, also it'd be better to describe
the exact information in the man page, i.e. it's a hw_params dump of
the preconfigured status.


Takashi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH - aplay 1/1] aplay - option to dump HW parameters
  2012-03-05 15:01     ` Takashi Iwai
@ 2012-03-05 15:02       ` Takashi Iwai
  2012-03-05 15:06         ` Pavel Hofman
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2012-03-05 15:02 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: alsa-devel

At Mon, 05 Mar 2012 16:01:12 +0100,
Takashi Iwai wrote:
> 
> At Mon, 05 Mar 2012 15:43:08 +0100,
> Pavel Hofman wrote:
> > 
> > Dne 5.3.2012 15:23, Takashi Iwai napsal(a):
> > > At Fri,  2 Mar 2012 20:32:58 +0000,
> > > pavel.hofman@ivitera.com wrote:
> > >>
> > >> From: Pavel Hofman <pavel.hofman@ivitera.com>
> > >>
> > >> Dumping HW parameters of the current device with snd_pcm_hw_params_dump,
> > >> a new option --dump-hw-params added.
> > > 
> > > Well, the purpose and the actual operation of this option is a bit
> > > unclear with such a short description.  Your patch adds the output of
> > > the pre-config state of the hw_params.  It makes sense since the
> > > post-config state is shown via -v option.  If this is the intended
> > > behavior, please write a bit more details in the man page.
> > > 
> > > 
> > 
> > Takashi, thanks for your reply. Could I call it hardware capabilities of
> > the device?
> 
> Yeah, it sounds more intuitive.  But, also it'd be better to describe
> the exact information in the man page, i.e. it's a hw_params dump of
> the preconfigured status.

On the second thought, "hardware" capabilities may be also misleading.
For example, when your run it without -Dhw, it'll show the all
possible values because of plug wrapper.


Takashi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH - aplay 1/1] aplay - option to dump HW parameters
  2012-03-05 15:02       ` Takashi Iwai
@ 2012-03-05 15:06         ` Pavel Hofman
  2012-03-05 15:37           ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel Hofman @ 2012-03-05 15:06 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

>>
>> Yeah, it sounds more intuitive.  But, also it'd be better to describe
>> the exact information in the man page, i.e. it's a hw_params dump of
>> the preconfigured status.
> 
> On the second thought, "hardware" capabilities may be also misleading.
> For example, when your run it without -Dhw, it'll show the all
> possible values because of plug wrapper.
> 

I think the all possible values range is correct, it is what the plug
actually accepts. I will put more detail into the man page and send a
new patch.

Thanks,

Pavel.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH - aplay 1/1] aplay - option to dump HW parameters
  2012-03-05 15:06         ` Pavel Hofman
@ 2012-03-05 15:37           ` Takashi Iwai
  0 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2012-03-05 15:37 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: alsa-devel

At Mon, 05 Mar 2012 16:06:42 +0100,
Pavel Hofman wrote:
> 
> >>
> >> Yeah, it sounds more intuitive.  But, also it'd be better to describe
> >> the exact information in the man page, i.e. it's a hw_params dump of
> >> the preconfigured status.
> > 
> > On the second thought, "hardware" capabilities may be also misleading.
> > For example, when your run it without -Dhw, it'll show the all
> > possible values because of plug wrapper.
> > 
> 
> I think the all possible values range is correct, it is what the plug
> actually accepts.

Yes, it's correct.  But, my point is that calling it _hardware_
capabilities may be misleading because it doesn't always mean the
actual hardware capabilities.


Takashi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH - aplay 1/1] aplay - option to dump HW parameters
@ 2012-03-05 21:27 pavel.hofman
  2012-03-06  9:42 ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: pavel.hofman @ 2012-03-05 21:27 UTC (permalink / raw)
  To: patch; +Cc: Pavel Hofman, alsa-devel

From: Pavel Hofman <pavel.hofman@ivitera.com>

Dumping HW parameters of the current device with snd_pcm_hw_params_dump,
a new option --dump-hw-params added.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>

diff --git a/aplay/aplay.1 b/aplay/aplay.1
index 2acaed5..0195322 100644
--- a/aplay/aplay.1
+++ b/aplay/aplay.1
@@ -184,6 +184,13 @@ the month, %H hour, %M minute and %S second.  In addition, %v is
 the file number, starting at 1.  When this option is specified,
 intermediate directories for the output file are created automatically.
 This option has no effect if \-\-separate\-channels is specified.
+.TP
+\fI\-\-dump\-hw\-params\fP
+Dump hw_params of the device preconfigured status to stderr. The dump
+lists capabilities of the selected device such as supported formats,
+sampling rates, numbers of channels, period and buffer bytes/sizes/times.
+For raw device hw:X this option basically lists hardware capabilities of
+the soundcard.
 
 .SH SIGNALS
 When recording, SIGINT, SIGTERM and SIGABRT will close the output 
diff --git a/aplay/aplay.c b/aplay/aplay.c
index 73a9544..0633cbd 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -129,6 +129,7 @@ static int max_file_time = 0;
 static int use_strftime = 0;
 volatile static int recycle_capture_file = 0;
 static long term_c_lflag = -1;
+static int dump_hw_params = 0;
 
 static int fd = -1;
 static off64_t pbrec_count = LLONG_MAX, fdcount;
@@ -223,7 +224,8 @@ _("Usage: %s [OPTION]... [FILE]...\n"
 "    --max-file-time=#   start another output file when the old file has recorded\n"
 "                        for this many seconds\n"
 "    --process-id-file   write the process ID here\n"
-"    --use-strftime      apply the strftime facility to the output file name\n")
+"    --use-strftime      apply the strftime facility to the output file name\n"
+"    --dump-hw-params    dump hw_params of the device\n")
 		, command);
 	printf(_("Recognized sample formats are:"));
 	for (k = 0; k < SND_PCM_FORMAT_LAST; ++k) {
@@ -416,7 +418,8 @@ enum {
 	OPT_TEST_NOWAIT,
 	OPT_MAX_FILE_TIME,
 	OPT_PROCESS_ID_FILE,
-	OPT_USE_STRFTIME
+	OPT_USE_STRFTIME,
+	OPT_DUMP_HWPARAMS
 };
 
 int main(int argc, char *argv[])
@@ -461,6 +464,7 @@ int main(int argc, char *argv[])
 		{"process-id-file", 1, 0, OPT_PROCESS_ID_FILE},
 		{"use-strftime", 0, 0, OPT_USE_STRFTIME},
 		{"interactive", 0, 0, 'i'},
+		{"dump-hw-params", 0, 0, OPT_DUMP_HWPARAMS},
 		{0, 0, 0, 0}
 	};
 	char *pcm_name = "default";
@@ -662,6 +666,9 @@ int main(int argc, char *argv[])
 		case OPT_USE_STRFTIME:
 			use_strftime = 1;
 			break;
+		case OPT_DUMP_HWPARAMS:
+			dump_hw_params = 1;
+			break;
 		default:
 			fprintf(stderr, _("Try `%s --help' for more information.\n"), command);
 			return 1;
@@ -1059,6 +1066,13 @@ static void set_params(void)
 		error(_("Broken configuration for this PCM: no configurations available"));
 		prg_exit(EXIT_FAILURE);
 	}
+	if (dump_hw_params) {
+		fprintf(stderr, _("HW Params of device \"%s\":\n"),
+			snd_pcm_name(handle));
+		fprintf(stderr, "--------------------\n");
+		snd_pcm_hw_params_dump(params, log);
+		fprintf(stderr, "--------------------\n");
+	}
 	if (mmap_flag) {
 		snd_pcm_access_mask_t *mask = alloca(snd_pcm_access_mask_sizeof());
 		snd_pcm_access_mask_none(mask);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH - aplay 1/1] aplay - option to dump HW parameters
  2012-03-05 21:27 pavel.hofman
@ 2012-03-06  9:42 ` Takashi Iwai
  0 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2012-03-06  9:42 UTC (permalink / raw)
  To: pavel.hofman; +Cc: alsa-devel

At Mon,  5 Mar 2012 21:27:00 +0000,
pavel.hofman@ivitera.com wrote:
> 
> From: Pavel Hofman <pavel.hofman@ivitera.com>
> 
> Dumping HW parameters of the current device with snd_pcm_hw_params_dump,
> a new option --dump-hw-params added.
> 
> Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>

Thanks, applied now.


Takashi

> 
> diff --git a/aplay/aplay.1 b/aplay/aplay.1
> index 2acaed5..0195322 100644
> --- a/aplay/aplay.1
> +++ b/aplay/aplay.1
> @@ -184,6 +184,13 @@ the month, %H hour, %M minute and %S second.  In addition, %v is
>  the file number, starting at 1.  When this option is specified,
>  intermediate directories for the output file are created automatically.
>  This option has no effect if \-\-separate\-channels is specified.
> +.TP
> +\fI\-\-dump\-hw\-params\fP
> +Dump hw_params of the device preconfigured status to stderr. The dump
> +lists capabilities of the selected device such as supported formats,
> +sampling rates, numbers of channels, period and buffer bytes/sizes/times.
> +For raw device hw:X this option basically lists hardware capabilities of
> +the soundcard.
>  
>  .SH SIGNALS
>  When recording, SIGINT, SIGTERM and SIGABRT will close the output 
> diff --git a/aplay/aplay.c b/aplay/aplay.c
> index 73a9544..0633cbd 100644
> --- a/aplay/aplay.c
> +++ b/aplay/aplay.c
> @@ -129,6 +129,7 @@ static int max_file_time = 0;
>  static int use_strftime = 0;
>  volatile static int recycle_capture_file = 0;
>  static long term_c_lflag = -1;
> +static int dump_hw_params = 0;
>  
>  static int fd = -1;
>  static off64_t pbrec_count = LLONG_MAX, fdcount;
> @@ -223,7 +224,8 @@ _("Usage: %s [OPTION]... [FILE]...\n"
>  "    --max-file-time=#   start another output file when the old file has recorded\n"
>  "                        for this many seconds\n"
>  "    --process-id-file   write the process ID here\n"
> -"    --use-strftime      apply the strftime facility to the output file name\n")
> +"    --use-strftime      apply the strftime facility to the output file name\n"
> +"    --dump-hw-params    dump hw_params of the device\n")
>  		, command);
>  	printf(_("Recognized sample formats are:"));
>  	for (k = 0; k < SND_PCM_FORMAT_LAST; ++k) {
> @@ -416,7 +418,8 @@ enum {
>  	OPT_TEST_NOWAIT,
>  	OPT_MAX_FILE_TIME,
>  	OPT_PROCESS_ID_FILE,
> -	OPT_USE_STRFTIME
> +	OPT_USE_STRFTIME,
> +	OPT_DUMP_HWPARAMS
>  };
>  
>  int main(int argc, char *argv[])
> @@ -461,6 +464,7 @@ int main(int argc, char *argv[])
>  		{"process-id-file", 1, 0, OPT_PROCESS_ID_FILE},
>  		{"use-strftime", 0, 0, OPT_USE_STRFTIME},
>  		{"interactive", 0, 0, 'i'},
> +		{"dump-hw-params", 0, 0, OPT_DUMP_HWPARAMS},
>  		{0, 0, 0, 0}
>  	};
>  	char *pcm_name = "default";
> @@ -662,6 +666,9 @@ int main(int argc, char *argv[])
>  		case OPT_USE_STRFTIME:
>  			use_strftime = 1;
>  			break;
> +		case OPT_DUMP_HWPARAMS:
> +			dump_hw_params = 1;
> +			break;
>  		default:
>  			fprintf(stderr, _("Try `%s --help' for more information.\n"), command);
>  			return 1;
> @@ -1059,6 +1066,13 @@ static void set_params(void)
>  		error(_("Broken configuration for this PCM: no configurations available"));
>  		prg_exit(EXIT_FAILURE);
>  	}
> +	if (dump_hw_params) {
> +		fprintf(stderr, _("HW Params of device \"%s\":\n"),
> +			snd_pcm_name(handle));
> +		fprintf(stderr, "--------------------\n");
> +		snd_pcm_hw_params_dump(params, log);
> +		fprintf(stderr, "--------------------\n");
> +	}
>  	if (mmap_flag) {
>  		snd_pcm_access_mask_t *mask = alloca(snd_pcm_access_mask_sizeof());
>  		snd_pcm_access_mask_none(mask);
> -- 
> 1.7.0.4
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-03-06  9:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 20:32 [PATCH - aplay 1/1] aplay - option to dump HW parameters pavel.hofman
2012-03-05 14:23 ` Takashi Iwai
2012-03-05 14:43   ` Pavel Hofman
2012-03-05 15:01     ` Takashi Iwai
2012-03-05 15:02       ` Takashi Iwai
2012-03-05 15:06         ` Pavel Hofman
2012-03-05 15:37           ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2012-03-05 21:27 pavel.hofman
2012-03-06  9:42 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.