aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/most (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-09-29staging: most: fix pcm_write input/output errorChristian Gromm1-6/+11
This patch keeps the process from sleeping after the PCM middle layer has stopped playback by calling the pcm trigger callback. The patch is needed to prevent aplay from causing a pcm_write Input/Output error. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: add poll syscall to AIM cdevChristian Gromm3-0/+43
This patch adds the implementation of the poll syscall to the AIM cdev. To have the full functionality, a helper function is needed in the core module to retrieve the instantaneous availability of tx buffers. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: remove audio resolution format checkChristian Gromm1-2/+1
This patch removes the audio format cross-check, because the definitions are not compatible. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: fix style problemsChristian Gromm1-3/+3
This patch simply corrects style violations. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: move initialization codeChristian Gromm1-18/+10
This pathch moves the initialization of the PCM middle layer hardware parameters to function audio_set_hw_params(). Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: rename functionChristian Gromm1-2/+2
This patch renames the function audio_set_pcm_format(). Since the function doesn't only set the PCM format anymore and to guard against misunderstandings, its name needs to be changed. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: add missing channel initializationChristian Gromm1-0/+2
This patch adds missing initialization of channel count for 8-bit mono audio resolution. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: purge unecessary variableChristian Gromm1-4/+1
This patch purges a temp. variable to store the functions return value. Since the content is never being evaluated, it can safely be removed. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: squash AIM soundChristian Gromm1-14/+0
This patch removes debug messages and prevents the sound AIM from being noisy in kernel log. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: make hardware parameters channel exclusiveChristian Gromm1-32/+36
Since the PCM interface's hardware parameters are channel/substream exclusive, the struct snd_pcm_hardware needs to be embedded in the channel structure. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: include vendor in audio card's shortnameChristian Gromm1-1/+1
This patch adds Microchip as vendor to the audio card's shortname to be displayed, when playback and capture devices are queried. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: add multi channel support to sound AIMChristian Gromm1-2/+25
This patch adds 5.1 surround configuration with subbuffer cross-check, when establishing a link to the core. For the sake of simplicity, only one specific channel configuration is allowed. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: refactor channel structureChristian Gromm1-53/+55
The struct most_c_obj has the same set of attributes for each of two AIMs. This patch cleans up the code by introducing the new struct most_c_aim_obj hat contains those fields. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: add fair buffer distributionChristian Gromm6-7/+36
This patch ensures a fair distribution of buffers, when two AIMs share a single channel. The AIMs then won't be able to use more than half of all pre-allocated buffers of the linked channel. However, in case the channel is not shared, the AIM can exclusively use all available buffers. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: consolidate codeChristian Gromm1-6/+2
The function drci_rd_reg() always delivers little endian representation of the 16-bit DCI register. The value returned by this function must always be carefully converted from __le16 to u16 type. This patch moves all those conversions to the function itself. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: prevent DMA on stackChristian Gromm1-10/+16
This patch is needed to avoid having DMA on the stack. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: simplify codeChristian Gromm1-9/+8
This patch simply rearranges code for better readability. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: fix MAC address representationChristian Gromm1-8/+16
This patch fixes the representation of the MAC address within the HDM USB module. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: fix buffer size for DIM2Christian Gromm1-2/+2
This patch reduces the DBR buffer size to prevent an overflow in the DIM2 module. It is needed, because the MediaLB hardware has problems with DBR buffers that exceed the size of 255 messages. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: remove macro cpu_to_le16Christian Gromm1-4/+4
This patch removes the wrongly used macros cpu_to_le16 Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: fix buffer synchronization requestChristian Gromm1-31/+10
Revision D of OS81118 network interface controller have the internal buffer synchronization mechanism changed. This patch adapts the driver to this. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: remove dead codeChristian Gromm1-6/+0
The case where the channel type is neither synchronous nor isochronous is already covered by a previous condition. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: remove unnecessary field initializationChristian Gromm1-1/+0
Since conf->extra_len has already been reset in most_start_channel() when function hdm_configure_channel() gets called, it can safely be removed here. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: fix channel operation in multi-aim contextChristian Gromm6-37/+68
This patch fixes the opening and closing process of a physical channel when used by different AIMs. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: fix USB babble on IN pipeChristian Gromm1-1/+2
This patch prevents the HDM USB from submitting an URB with a buffer size unaligned to 512 bytes to the USB subsystem. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: remove shared IRQ requestChristian Gromm1-1/+1
Since there is no way find out whether the INIC has generated an interrupt, the I2C interrupt must not be registered as a shared interrupt. Reported-by: PrasannaKumar Muralidharan <PrasannaKumar.Muraidharan@microchip.com> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: fix race condition in AIM networkingChristian Gromm1-0/+3
If the network device is being opened right after it has been registered via function register_netdev(), the device state is not yet consistent in the context of function ndo_open(). This patch cares about having the initialization done right, before the networking device is registered. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: remove aim resetChristian Gromm1-5/+0
This patch partly reverts a modification of function most_stop_channel() that is trying to reset an established link between an AIM and an HDM in all suitable places. But since the function most_stop_channel() is stopping the data transfer it is the wrong place to do so. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: most: change structure initializationChristian Gromm2-12/+15
By applying this patch the initialization of the most_aim structure is performed at compile time. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29Merge 4.3-rc3 into staging-nextGreg Kroah-Hartman4-1/+4
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-17staging: most: Add dependency to HAS_IOMEMChristian Gromm1-0/+1
This patch prevents the module hdm_dim2 from breaking the build in case HAS_IOMEM is not configured. Reported-by: <fengguang.wu@intel.com> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-16Staging: most: aim-network: Replace pr_info with netdev_infoShraddha Barke1-5/+5
Use netdev_* family of macros when there is reference to a network device. dev->name is removed as netdev_info will print the device name Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-13Staging: most: MOST and MOSTCORE should depend on HAS_DMAGeert Uytterhoeven2-0/+2
If NO_DMA=y: ERROR: "dma_free_coherent" [drivers/staging/most/mostcore/mostcore.ko] undefined! ERROR: "dma_alloc_coherent" [drivers/staging/most/mostcore/mostcore.ko] undefined! As all MOST sub drivers use DMA functionality, add a dependency on HAS_DMA to MOSTCORE, and to MOST, which selects MOSTCORE. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-13staging: most: fix HDM_USB dependencies and build errorsRandy Dunlap1-1/+1
Fix kconfig dependency warning and build errors. warning: (HDM_USB) selects AIM_NETWORK which has unmet direct dependencies (STAGING && MOST && NET) drivers/built-in.o: In function `aim_resume_tx_channel': networking.c:(.text+0xd6f7a2): undefined reference to `netif_tx_wake_queue' drivers/built-in.o: In function `aim_rx_data': networking.c:(.text+0xd6f8c5): undefined reference to `__netdev_alloc_skb' networking.c:(.text+0xd6f99a): undefined reference to `skb_put' networking.c:(.text+0xd6fa44): undefined reference to `eth_type_trans' networking.c:(.text+0xd6fa6f): undefined reference to `netif_rx' drivers/built-in.o: In function `most_nd_setup': networking.c:(.text+0xd6fad2): undefined reference to `ether_setup' drivers/built-in.o: In function `most_nd_set_mac_address': networking.c:(.text+0xd6fb0f): undefined reference to `eth_mac_addr' drivers/built-in.o: In function `most_nd_open': networking.c:(.text+0xd6fd37): undefined reference to `netif_tx_wake_queue' drivers/built-in.o: In function `aim_probe_channel': networking.c:(.text+0xd6febb): undefined reference to `alloc_netdev_mqs' networking.c:(.text+0xd6ff18): undefined reference to `register_netdev' networking.c:(.text+0xd6ff4a): undefined reference to `free_netdev' drivers/built-in.o: In function `most_net_rm_netdev_safe.isra.0': networking.c:(.text+0xd6ffcf): undefined reference to `unregister_netdev' networking.c:(.text+0xd6ffdf): undefined reference to `free_netdev' drivers/built-in.o: In function `most_nd_start_xmit': networking.c:(.text+0xd70390): undefined reference to `kfree_skb' drivers/built-in.o: In function `most_deliver_netinfo': (.text+0xd70499): undefined reference to `netif_tx_wake_queue' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Christian Gromm <christian.gromm@microchip.com> Cc: Michael Fabry <Michael.Fabry@microchip.com> Cc: Christian Gromm <chris@engineersdelight.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: style of bool comparisonSudip Mukherjee2-7/+7
BOOLEAN tests do not need any comparison to TRUE or FALSE. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: remove unneeded NULL checkSudip Mukherjee1-4/+2
The loop cursor of list_for_each_entry_safe() can never be NULL. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: remove driver ownerSudip Mukherjee1-1/+0
The platform driver core will set the owner value, we do not need to do it in the module. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: return NULL instead of integerSudip Mukherjee1-1/+1
The return type of get_aim_dev() is a pointer but we were returning 0 incase of failure. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: remove always true comparisonSudip Mukherjee1-1/+1
channel->dev has already been checked for NULL and if it was NULL then we have returned with -EPIPE. So at this point it can not be NULL. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: most: Use NULL instead of zeroRonit Halder1-1/+1
This patch fixes the warning generated by sparse "Using plain integer as NULL pointer" by using NULL instead of zero. Signed-off-by: Ronit halder <ronit.crj@gmail.com> Acked-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: NULL comparison styleSudip Mukherjee1-6/+6
checkpatch complains when a variable comparison to NULL is written as: variable == NULL or variable != NULL. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: fix MakefileSudip Mukherjee1-1/+0
The Makefile is including "drivers/media/video". But there is no such directory in kernel tree. Since it is aim-v4l2 this might have been "drivers/media/v4l2-core", but the Kconfig already mentions that it depends on VIDEO_V4L2. So no need to mention that again in the Makefile. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: remove unused variableSudip Mukherjee1-3/+0
The variable conf was only assigned the value but was never used. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: use NULL pointerSudip Mukherjee1-4/+4
sparse was complaining that an integer is used as NULL pointer. Fix it by using NULL. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: make functions staticSudip Mukherjee1-2/+3
split_arg_list() and audio_set_pcm_format() are being called from the same file and is not referenced from outside, so make them as static. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: remove unused functionsSudip Mukherjee3-20/+0
These functions were only defined but not used anywhere. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: out of memory errorSudip Mukherjee1-1/+0
If kzalloc fails it will print lots of debugging information in the log, no need to have another in the code. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: remove multiple blank lineSudip Mukherjee1-1/+0
Multiple blank lines are not recommended in the kernel coding style. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: most: bool comparison styleSudip Mukherjee1-3/+3
Mentioning true or false in the if comparison is error prone and also not according to the coding style. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14Staging: most: aim-cdev/cdev.c. Fix "missing static keyword" warningsAdrian Remonda1-9/+9
This is a patch to the most/aim_cdev.c file. It makes several local functions and structures static to prevent global visibility. Signed-off-by: Adrian Remonda <adrianremonda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>