Re: [PATCH v7 1/1] alsa: jack: implement software jack injection via debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 1/26/21 2:58 PM, Takashi Iwai wrote:
On Tue, 26 Jan 2021 07:55:29 +0100,
Hui Wang wrote:

On 1/25/21 10:32 PM, Takashi Iwai wrote:
On Mon, 25 Jan 2021 04:21:18 +0100,
Hui Wang wrote:
This change adds audio jack injection feature through debugfs, with
this feature, we could validate alsa userspace changes by injecting
plugin or plugout events to the non-phantom audio jacks.

With this change, the sound core will build the folders
$debugfs_mount_dir/sound/cardN if SND_DEBUG and DEBUG_FS are enabled.
<snip>
+		return -ENOMEM;
+
+	/* replace the chars which are not suitable for folder's name with _ */
+	for (i = 0; i < strlen(tname); i++)
No need to use strlen(), just check the NUL character on tname[i].
OK, will change it to:     for (i = 0; tname[i] != '\0'; i++)
Even the "!= '\0" part can be dropped, too :)

   for (i = 0; tname[i]; i++)
     ....

OK, got it.

thx.



Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux