summaryrefslogtreecommitdiff
path: root/sound/firewire/fireworks/fireworks_proc.c
AgeCommit message (Collapse)Author
2019-02-06ALSA: firewire: Remove superfluous snd_info_register() callsTakashi Iwai
The calls of snd_info_register() are superfluous and should be avoided at the procfs creation time. They are called at the end of the whole initialization via snd_card_register(). This patch drops such superfluous calls. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-28sound: Use octal not symbolic permissionsJoe Perches
Convert the S_<FOO> symbolic permissions to their octal equivalents as using octal and not symbolic permissions is preferred by many as more readable. see: https://lkml.org/lkml/2016/8/2/1945 Done with automated conversion via: $ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...> Miscellanea: o Wrapped one multi-line call to a single line Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-22ALSA: firewire: add const qualifier to identifiers for read-only symbolsTakashi Sakamoto
Drivers in ALSA firewire stack still includes some symbols which can be moved to a section for read-only symbols. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-31ALSA: fireworks: accessing to user space outside spinlockTakashi Sakamoto
In hwdep interface of fireworks driver, accessing to user space is in a critical section with disabled local interrupt. Depending on architecture, accessing to user space can cause page fault exception. Then local processor stores machine status and handles the synchronous event. A handler corresponding to the event can call task scheduler to wait for preparing pages. In a case of usage of single core processor, the state to disable local interrupt is worse because it don't handle usual interrupts from hardware. This commit fixes this bug, performing the accessing outside spinlock. This commit also gives up counting the number of queued response messages to simplify ring-buffer management. Reported-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Cc: stable@vger.kernel.org Fixes: 555e8a8f7f14('ALSA: fireworks: Add command/response functionality into hwdep interface') Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-05ALSA: fireworks: fix specifiers in format strings for propper outputTakashi Sakamoto
Use %d for loop counter and %X for device capabilities. This is a supplemental patch for Hans Wennborg's patch. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-04ALSA: fireworks: fix %d confusingly prefixed with 0x in format stringsHans Wennborg
Signed-off-by: Hans Wennborg <hans@hanshq.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: fireworks: Add command/response functionality into hwdep interfaceTakashi Sakamoto
This commit adds two functionality for hwdep interface, adds two parameters for this driver, add a node for proc interface. To receive responses from devices, this driver already allocate own callback into initial memory space in host controller. This means no one can allocate its own callback to the address. So this driver must give a way for user applications to receive responses. This commit adds a functionality to receive responses via hwdep interface. The application can receive responses to read from this interface. To achieve this, this commit adds a buffer to queue responses. The default size of this buffer is 1024 bytes. This size can be changed to give preferrable size to 'resp_buf_size' parameter for this driver. The application should notice rest of space in this buffer because this driver don't push responses when this buffer has no space. Additionaly, this commit adds a functionality to transmit commands via hwdep interface. The application can transmit commands to write into this interface. I note that the application can transmit one command at once, but can receive as many responses as possible untill the user-buffer is full. When using these interfaces, the application must keep maximum number of sequence number in command within the number in firewire.h because this driver uses this number to distinguish the response is against the command by the application or this driver. Usually responses against commands which the application transmits are pushed into this buffer. But to enable 'resp_buf_debug' parameter for this driver, all responses are pushed into the buffer. When using this mode, I reccomend to expand the size of buffer. Finally this commit adds a new node into proc interface to output status of the buffer. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: fireworks: Add proc interface for debugging purposeTakashi Sakamoto
This commit adds proc interface to output infomation for debugging. - firmware information - sampling rate and clock source - physical metering (linear value) Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>