-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add support for the AudioInjector Octo sound card, simplify bcm2835_i2s stereo check. #1884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Phil, I have switched the order in the README and Makefile - as requested |
Can you rebase and force push to tidy up the PR? |
again, please drop the I2S changes. |
Matthias, the I2S changes are entirely compliant. It checks that we aren't specifying mono (if so exiting with error as per before) and if stereo, it is setting the I2S format. If you want an I2S compliant driver, then this bcm2835_i2s.c is entirely compliant. |
The I2S patch doesn't simplify anything, is not needed and removes important semantics. IMO it makes the code harder to read. The way that code part is currently implemented it's obvious that the chip only supports 2 channels. Your patch changes the semantics of the code to "every setup excecpt 1 channels" are supported. Plus, the code makes no sense, there's still the channels_min = channels_max = 2 in the dai_driver. |
My original point was exactly that, why even test for mono when
channels_min = channels_max = 2 ?
Also why write 7 lines of code to test what we can in 1 line ?
…On 08/03/17 21:44, Matthias Reichl wrote:
The I2S patch doesn't simplify anything, is not needed and removes
important semantics. IMO it makes the code harder to read.
The way that code part is currently implemented it's obvious that the
chip only supports 2 channels.
Your patch changes the semantics of the code to "every setup excecpt 1
channels" are supported. Plus, the code makes no sense, there's still
the channels_min = channels_max = 2 in the dai_driver.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1884 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAq6B8zDPcKmPyxTRBZIh0K-9yOF4xjDks5rjoZ_gaJpZM4MWmsI>.
|
Simple answer: because it's a lot more readable and understandable. You look at the code part you changed and immediately know that only 2 channels will work, not 3 or 13. |
@flatmax After some debate we're happy to accept your one-line "case 8" patch and take the (probably non-existent) hit of supporting it downstream. Just replace the bcm2835-i2s patch here and force push - I've already checked the rest is good - and I'll merge it. |
@pelwell if you are going to relax the channel constraint in bcm2835-i2s
there are several things to keep in mind:
You'll need to enforce channel symmetry (symmetric_channels=1)
otherwise configurations like 2 recording channels and 8 playback
would not error out - hw_params doesn't do any checks if a stream
is already running, it's not prepared for asymmetric configurations.
All current and future machine drivers with codecs supporting 8 or
more channels (usually in DSP mode) need do install additional constraints
to limit to 2 channels. Otherwise userspace could try to access them in
configurations that won't work.
I'd rather see the octo driver being implemented properly, following
alsa standards, than introducing issues plus the need to add patches
to other soundcard drivers.
|
I'm braced for the flood of issues. |
This patch allows ch2 registers to be set for 8 channels of audio.
I have made those changes.
thanks
Matt
…On 09/03/17 02:49, Phil Elwell wrote:
I'm braced for the flood of issues.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1884 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAq6B7mnpQBLCXH_eHvnPyiLSH7ekm2Pks5rjs4RgaJpZM4MWmsI>.
|
kernel: BCM270X_DT: Invert Pi3 power LED to match fw change See: raspberrypi/linux#1879 kernel: Add support for the AudioInjector Octo sound card See: raspberrypi/linux#1884 kernel: Fix gadget mode for bcm2835 See: raspberrypi/linux#1887 kernel: bcm2835-v4l2: Fix buffer overflow problem See: raspberrypi/linux#1890 kernel: Add support for Fe-Pi audio sound card See: raspberrypi/linux#1867 kernel: BCM270X_DT: Flip the polarity of the CM3's HDMI HPD See: raspberrypi/linux#1869 kernel: Add overlay for ads1115 ADCs See: raspberrypi/linux#1864 kernel: config: Add CONFIG_CRYPTO_LZ4 See: raspberrypi/linux#1875 kernel: clk-bcm2835: Read max core clock from firmware firmware: GPIO expander: rework so the mailbox service reads raw values firmware: arm_loader: Check GPIO direction for low_voltage See: raspberrypi/linux#1879 firmware: warnings: Fix some mostly spurious warnings firmware: clock: Calculate PLL multipliers with more precision firmware: Set up HDMI VCO same for VEC as for HDMI firmeare: gpu_server: Move detailed logging to LOGGING_VMCS_VERBOSE category
kernel: BCM270X_DT: Invert Pi3 power LED to match fw change See: raspberrypi/linux#1879 kernel: Add support for the AudioInjector Octo sound card See: raspberrypi/linux#1884 kernel: Fix gadget mode for bcm2835 See: raspberrypi/linux#1887 kernel: bcm2835-v4l2: Fix buffer overflow problem See: raspberrypi/linux#1890 kernel: Add support for Fe-Pi audio sound card See: raspberrypi/linux#1867 kernel: BCM270X_DT: Flip the polarity of the CM3's HDMI HPD See: raspberrypi/linux#1869 kernel: Add overlay for ads1115 ADCs See: raspberrypi/linux#1864 kernel: config: Add CONFIG_CRYPTO_LZ4 See: raspberrypi/linux#1875 kernel: clk-bcm2835: Read max core clock from firmware firmware: GPIO expander: rework so the mailbox service reads raw values firmware: arm_loader: Check GPIO direction for low_voltage See: raspberrypi/linux#1879 firmware: warnings: Fix some mostly spurious warnings firmware: clock: Calculate PLL multipliers with more precision firmware: Set up HDMI VCO same for VEC as for HDMI firmeare: gpu_server: Move detailed logging to LOGGING_VMCS_VERBOSE category
This patch set does the following :
Adds support for the AudioInjector Octo sound card.
Simplifies the stereo channel check in the bcm2835_i2s.c driver.
The old switch statement for testing stereo channels is replaced with an if condition on mono channels.