- May 14, 2019
-
-
P33M authored
As reported in https://github.com/raspberrypi/linux/issues/2964 this commit causes a regression corrupting non-option TCP ack packets. This reverts commit 96b972dc.
-
IQaudIO authored
Add support for the IQaudIO Pi-Codec board. Signed-off-by: Gordon <gordon@iqaudio.com>
-
Dave Stevenson authored
This reverts commit ca36c709fce57e8023d2b8b354376bf161601a49. The driver tries a cma_alloc to avoid using gpu_mem, but should that fail the core code is logging an error with no easy way to test whether it will succeed or fail first. Revert until we either totally give up on gpu_mem and increase CMA always, or find a way to try an allocation. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
-
Dave Stevenson authored
The vchiq instance was allocated from vchiq_mmal_init via vchi_initialise, but was never released with vchi_disconnect. Retain the handle and release it from vchiq_mmal_finalise. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
-
Dave Stevenson authored
On error, vchiq_mmal_component_init could leave the event context allocated for ports. Clean them up in the error path. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
-
Peter Robinson authored
The upstream humidiity driver uses "st,hts221" for the compatible string so add that in as well so it will work with an unmodified upstream kernel driver. We leave the downstream as the priority. Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
-
Russell Joyce authored
Signed-off-by: Russell Joyce <russell.joyce@york.ac.uk>
-
Phil Elwell authored
See: https://github.com/raspberrypi/linux/issues/2924 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
-
Dave Stevenson authored
950fd867 staging: bcm2835-camera: Replace open-coded idr with a struct idr. replaced an internal implementation of an idr with the standard functions and a spinlock. idr_alloc(GFP_KERNEL) can sleep whilst calling kmem_cache_alloc to allocate the new node, but this is not valid whilst in an atomic context due to the spinlock. There is no need for this to be a spinlock as a standard mutex is sufficient. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
-
Dave Stevenson authored
vchiq_mmal_component_init calls init_event_context for the control port, but vchiq_mmal_component_finalise didn't free it, causing a memory leak.. Add the free call. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
-
Dave Stevenson authored
The ISP has no need for heights to be a multiple of macroblock sizes, therefore doesn't require the align on the height. Remove it for the ISP role. (It is required for the codecs). Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
-
Dave Stevenson authored
The calculation converting from V4L2 bytesperline to MMAL width had an operator ordering issue that lead to Bayer raw 10 (and 12 and 14) setting an incorrect stride for the buffer. Correct this operation ordering issue. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
-
P33M authored
The lan78xx uses a 12-byte hardware rx header, so there is no need to allocate SKBs with NET_IP_ALIGN set. Removes alignment faults in both dwc_otg and in ipv6 processing.
-
P33M authored
dwc_otg requires a 32-bit aligned buffer start address, otherwise expensive bounce buffers are used. The LAN951x hardware can skip up to 3 bytes between the TX header and the start of frame data, which can be used to force alignment of the URB passed to dwc_otg. As found in https://github.com/raspberrypi/linux/issues/2924
-
Russell Joyce authored
Signed-off-by: Russell Joyce <russell.joyce@york.ac.uk>
-
popcornmix authored
This reverts commit 60a2e557a4f81480216066f22b84c3dda31b3470.
-
P33M authored
dwc_otg allocates DMA-coherent buffers in atomic context for misaligned transfer buffers. The pool that these allocations come from is set up at boot-time but can be overridden by a commandline parameter - increase this for now to prevent failures seen on 4.19 with multiple USB Ethernet devices. see: https://github.com/raspberrypi/linux/issues/2924
-
Dan Carpenter authored
commit 136ff5e49271c4c8fceeca5491c48e66b961564b upstream. We free instance here and in the caller. It should be only the caller which handles it. Fixes: d7ca3a71 ("staging: bcm2835-audio: Operate non-atomic PCM ops") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Stefan Wahren authored
commit 438fc48260a0afc4cee733e5bc20234ff2bbef56 upstream. Just like the bcm2835-video make this a platform driver which is probed by vchiq. In order to change the number of channels use a module parameter instead, but use the maximum as default. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Stefan Wahren authored
commit 1e55d56344b0777d6cee9b9e4a813d53728ee798 upstream. There is not much value behind this boilerplate, so use module_platform_driver() instead. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Stefan Wahren authored
commit 458d4866a34d0c129ffc3bd56345b2166ba46d77 upstream. Enable the compilation test for bcm2835-audio to gain more build coverage. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mike Brady authored
commit a105a3a72824e0ac685a0711a67e4dbe29de62d0 upstream. When the BCM2835 audio output is used, userspace sees a jitter up to 10ms in the audio position, aka "delay" -- the number of frames that must be output before a new frame would be played. Make this a bit nicer for userspace by interpolating the position using the CPU clock. The overhead is small -- an extra ktime_get() every time a GPU message is sent -- and another call and a few calculations whenever the delay is sought from userland. At 48,000 frames per second, i.e. approximately 20 microseconds per frame, it would take a clock inaccuracy of 20 microseconds in 10 milliseconds -- 2,000 parts per million -- to result in an inaccurate estimate, whereas crystal- or resonator-based clocks typically have an inaccuracy of 10s to 100s of parts per million. Signed-off-by: Mike Brady <mikebrady@eircom.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
commit 01ec7398c56e8f1b903ecb3c5c75400e263eef43 upstream. The following tasks were completed or not the right solution: 1/2- Not the proper solution, we should register a platform device in vchiq the same way it's done with bcm2835-camera as commented here: https://lkml.org/lkml/2018/10/16/1131 2/3- Fixed by Takashi Iwai here: https://lkml.org/lkml/2018/9/4/587 Also, adds a new task as per mailing list conversation. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
commit 82cdc0c6b6faf877e2aecb957cffa9cb578cc572 upstream. It was called bcm2835_alsa0_driver, that "0" didn't mean much. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
commit 96f3bd8ae6516898c7b411ecb87064bb0dd25415 upstream. There will only be one probe function, there is no use for appendig "_dt" the end of the name. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
commit 9c2eaf7da855d314a369d48b9cbf8ac80717a1d0 upstream. In this case explicitly naming the union doesn't help overall code comprehension and clutters it. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
commit d048385a070552ae819f99f05bd03ec41072783d upstream. When it comes to declaring variables it's preferred, when possible, to use an inverted tree organization scheme. Also, removes some comments that were useless. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
commit 2e5f59fb77397cab3bc3d156e8be4164a67d32ef upstream. The memory is being allocated with devres_alloc(), wich ultimately uses __GFP_ZERO to call kmalloc. We don't need to zero the memory area again in bcm2835-audio. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Saenz Julienne authored
commit a90d8f49cc7fd7220aa24b85fc74ef3cfd62b96f upstream. The device communicates with the audio core using FOURCC codes. The driver was generating them using different macros/expressions. We now use the same macro to create them and centralize all the definitions. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: Takashi Iwai <tiwai@suse.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit 872ae2d63d516a2a3b9c833d8685afcfa7814542 upstream. Instead of creating a dummy child device to manage the card object, just use devm stuff directly for releasing with snd_card_free(). This results in a lot of code reduction. Since the dummy child devices are gone, the device object to be passed to the memory allocator needs to be adjusted as well. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit dc5c0eb1e8601206dffbfc302cbd190f89dcd040 upstream. Just a minor code refactoring and adding some const prefix. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit 74470ffeb9aed5548654cfca881bf1d7469fe9c4 upstream. All three functions to create PCM objects are fairly resemble, and can be unified to a single common helper. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit b59d6a5f73501f74848d6700101e7736afe3d54a upstream. The recent ALSA PCM core supports the SNDRV_PCM_INFO_SYNC_APPLPTR flag indicating that the driver needs the ack call at each appl_ptr update. This is requirement for the indirect PCM implementations like bcm2835-audio driver, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit ad29c6e6cbf6f2af7362b043adad51a3be3d39c7 upstream. The memory access to the pages allocated with SNDRV_DMA_TYPE_CONTINUOUS are basically non-coherent, and it becomes a problem when a process accesses via mmap. For the more consistent access, use the device coherent memory, just by replacing the call pattern in the allocator helpers. The only point we need to be careful for is the device object passed there; since bcm2835-audio driver creates fake devices and each card is created on top of that, we need to pass its parent device as the real device object. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit b876f2075808e95e244053caa53fa7e86e929a99 upstream. For more consistency, move the module parameter description right after its variable definition. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit 7e46fff5f19ce2b8a9891e4c08631c64d06e9e17 upstream. Yet a few header files are included unnecessarily. Drop them. Also remove trivial comments. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit b7584b64168208ebc14160770c0966b8b12fc16b upstream. For making the whole code more consistent, replace the home-made debug print macros with the standard dev_err() & co. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit 898001a0c845cefe5d47d133485712412853f0a8 upstream. Instead of allocating a separate snd_device object, let snd_card_new() allocate the private resource. This simplifies the code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit 5c7883e5f27e829f3f3a2ba174d4a724bfd5f026 upstream. This is the most significant part in the patch series. The bcm2835-audio driver used to queue the commands to vc04 core via workqueue, but basically the whole accesses to vc04 core are done in the sleepable context, including the callback calls. In such a case, rewriting the code using non-atomic PCM ops will simplify the logic a lot. This patch does it: all workqueue are gone and each former-work implementation is now directly called from PCM ops like trigger and write transfer. Along with it, the DMA position updater, bcm2835_playback_fifo(), was also rewritten to use a simpler logic. Now it handles the XRUN and draining properly by calling snd_pcm_stop() conditionally. The current position is kept in atomic_t value so that it can be read concurrently from the pointer callback. Also, the bcm2835_audio_instance object is allocated at the beginning of bcm2835_audio_open(). This makes the resource management clearer. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Takashi Iwai authored
commit 769a8e9bf5cf39813f52962fdafdf7e4d52ad585 upstream. This is a cleanup and code refactoring in bcm2835-vchiq.c. The major code changes are to provide local helpers for easier use of lock / unlock, and message passing with/without response wait. This allows us to reduce lots of open codes. Also, the max packet is set at opening the stream, not at each time when the write gets called. Signed-off-by: Takashi Iwai <tiwai@suse.de> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-