brcm2708: update linux 4.9 patches to latest version
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Sat, 4 Mar 2017 18:37:50 +0000 (19:37 +0100)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Sat, 4 Mar 2017 18:37:50 +0000 (19:37 +0100)
As usual these patches were extracted and rebased from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.9.y

- Remove led1 from diag.sh for RPi3 since it causes boot issues.
- Fix modules.mk typos.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
271 files changed:
target/linux/brcm2708/base-files/etc/diag.sh
target/linux/brcm2708/bcm2708/config-4.9
target/linux/brcm2708/bcm2709/config-4.9
target/linux/brcm2708/bcm2710/config-4.9
target/linux/brcm2708/modules.mk
target/linux/brcm2708/patches-4.9/0001-smsx95xx-fix-crimes-against-truesize.patch
target/linux/brcm2708/patches-4.9/0002-smsc95xx-Experimental-Enable-turbo_mode-and-packetsi.patch
target/linux/brcm2708/patches-4.9/0003-Allow-mac-address-to-be-set-in-smsc95xx.patch
target/linux/brcm2708/patches-4.9/0004-Protect-__release_resource-against-resources-without.patch
target/linux/brcm2708/patches-4.9/0005-mm-Remove-the-PFN-busy-warning.patch
target/linux/brcm2708/patches-4.9/0006-irq-bcm2836-Prevent-spurious-interrupts-and-trap-the.patch
target/linux/brcm2708/patches-4.9/0007-irqchip-bcm2835-Add-FIQ-support.patch
target/linux/brcm2708/patches-4.9/0008-irqchip-irq-bcm2835-Add-2836-FIQ-support.patch
target/linux/brcm2708/patches-4.9/0010-serial-8250-Don-t-crash-when-nr_uarts-is-0.patch
target/linux/brcm2708/patches-4.9/0011-pinctrl-bcm2835-Set-base-to-0-give-expected-gpio-num.patch
target/linux/brcm2708/patches-4.9/0012-pinctrl-bcm2835-Fix-interrupt-handling-for-GPIOs-28-.patch
target/linux/brcm2708/patches-4.9/0013-pinctrl-bcm2835-Only-request-the-interrupts-listed-i.patch
target/linux/brcm2708/patches-4.9/0014-pinctrl-bcm2835-Return-pins-to-inputs-when-freed.patch
target/linux/brcm2708/patches-4.9/0015-spi-bcm2835-Support-pin-groups-other-than-7-11.patch
target/linux/brcm2708/patches-4.9/0016-spi-bcm2835-Disable-forced-software-CS.patch
target/linux/brcm2708/patches-4.9/0017-spi-bcm2835-Remove-unused-code.patch
target/linux/brcm2708/patches-4.9/0018-ARM-bcm2835-Set-Serial-number-and-Revision.patch
target/linux/brcm2708/patches-4.9/0019-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch
target/linux/brcm2708/patches-4.9/0020-firmware-Updated-mailbox-header.patch
target/linux/brcm2708/patches-4.9/0021-clk-bcm2835-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch
target/linux/brcm2708/patches-4.9/0022-rtc-Add-SPI-alias-for-pcf2123-driver.patch
target/linux/brcm2708/patches-4.9/0023-watchdog-bcm2835-Support-setting-reboot-partition.patch
target/linux/brcm2708/patches-4.9/0024-reboot-Use-power-off-rather-than-busy-spinning-when-.patch
target/linux/brcm2708/patches-4.9/0025-bcm-Make-RASPBERRYPI_POWER-depend-on-PM.patch
target/linux/brcm2708/patches-4.9/0026-Register-the-clocks-early-during-the-boot-process.patch
target/linux/brcm2708/patches-4.9/0027-bcm2835-rng-Avoid-initialising-if-already-enabled.patch
target/linux/brcm2708/patches-4.9/0028-kbuild-Ignore-dtco-targets-when-filtering-symbols.patch
target/linux/brcm2708/patches-4.9/0029-BCM2835_DT-Fix-I2S-register-map.patch
target/linux/brcm2708/patches-4.9/0030-Main-bcm2708-bcm2709-linux-port.patch
target/linux/brcm2708/patches-4.9/0031-Add-dwc_otg-driver.patch
target/linux/brcm2708/patches-4.9/0032-bcm2708-framebuffer-driver.patch
target/linux/brcm2708/patches-4.9/0033-dmaengine-Add-support-for-BCM2708.patch
target/linux/brcm2708/patches-4.9/0034-MMC-added-alternative-MMC-driver.patch
target/linux/brcm2708/patches-4.9/0035-Adding-bcm2835-sdhost-driver-and-an-overlay-to-enabl.patch
target/linux/brcm2708/patches-4.9/0036-mmc-Add-MMC_QUIRK_ERASE_BROKEN-for-some-cards.patch
target/linux/brcm2708/patches-4.9/0037-cma-Add-vc_cma-driver-to-enable-use-of-CMA.patch
target/linux/brcm2708/patches-4.9/0038-bcm2708-alsa-sound-driver.patch
target/linux/brcm2708/patches-4.9/0039-vc_mem-Add-vc_mem-driver-for-querying-firmware-memor.patch
target/linux/brcm2708/patches-4.9/0040-vcsm-VideoCore-shared-memory-service-for-BCM2835.patch
target/linux/brcm2708/patches-4.9/0041-Add-dev-gpiomem-device-for-rootless-user-GPIO-access.patch
target/linux/brcm2708/patches-4.9/0042-Add-SMI-driver.patch
target/linux/brcm2708/patches-4.9/0043-MISC-bcm2835-smi-use-clock-manager-and-fix-reload-is.patch
target/linux/brcm2708/patches-4.9/0044-Add-SMI-NAND-driver.patch
target/linux/brcm2708/patches-4.9/0045-lirc-added-support-for-RaspberryPi-GPIO.patch
target/linux/brcm2708/patches-4.9/0046-Add-cpufreq-driver.patch
target/linux/brcm2708/patches-4.9/0047-Added-hwmon-thermal-driver-for-reporting-core-temper.patch
target/linux/brcm2708/patches-4.9/0048-Add-Chris-Boot-s-i2c-driver.patch
target/linux/brcm2708/patches-4.9/0049-char-broadcom-Add-vcio-module.patch
target/linux/brcm2708/patches-4.9/0050-firmware-bcm2835-Support-ARCH_BCM270x.patch
target/linux/brcm2708/patches-4.9/0051-bcm2835-add-v4l2-camera-device.patch
target/linux/brcm2708/patches-4.9/0052-scripts-Add-mkknlimg-and-knlinfo-scripts-from-tools-.patch
target/linux/brcm2708/patches-4.9/0053-scripts-dtc-Update-to-upstream-version-1.4.1.patch
target/linux/brcm2708/patches-4.9/0054-BCM2708-Add-core-Device-Tree-support.patch
target/linux/brcm2708/patches-4.9/0055-BCM270x_DT-Add-pwr_led-and-the-required-input-trigge.patch
target/linux/brcm2708/patches-4.9/0056-fbdev-add-FBIOCOPYAREA-ioctl.patch
target/linux/brcm2708/patches-4.9/0057-Speed-up-console-framebuffer-imageblit-function.patch
target/linux/brcm2708/patches-4.9/0058-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch
target/linux/brcm2708/patches-4.9/0059-Added-Device-IDs-for-August-DVB-T-205.patch
target/linux/brcm2708/patches-4.9/0060-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch
target/linux/brcm2708/patches-4.9/0061-hid-Reduce-default-mouse-polling-interval-to-60Hz.patch
target/linux/brcm2708/patches-4.9/0062-rpi-ft5406-Add-touchscreen-driver-for-pi-LCD-display.patch
target/linux/brcm2708/patches-4.9/0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch
target/linux/brcm2708/patches-4.9/0064-gpio-poweroff-Allow-it-to-work-on-Raspberry-Pi.patch
target/linux/brcm2708/patches-4.9/0065-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch
target/linux/brcm2708/patches-4.9/0066-ASoC-Add-support-for-HifiBerry-DAC.patch
target/linux/brcm2708/patches-4.9/0067-ASoC-Add-support-for-Rpi-DAC.patch
target/linux/brcm2708/patches-4.9/0068-ASoC-wm8804-Implement-MCLK-configuration-options-add.patch
target/linux/brcm2708/patches-4.9/0069-ASoC-BCM-Add-support-for-HiFiBerry-Digi.-Driver-is-b.patch
target/linux/brcm2708/patches-4.9/0070-Add-IQaudIO-Sound-Card-support-for-Raspberry-Pi.patch
target/linux/brcm2708/patches-4.9/0071-iqaudio-dac-Compile-fix-untested.patch
target/linux/brcm2708/patches-4.9/0072-Added-support-for-HiFiBerry-DAC.patch
target/linux/brcm2708/patches-4.9/0073-Added-driver-for-HiFiBerry-Amp-amplifier-add-on-boar.patch
target/linux/brcm2708/patches-4.9/0074-Revert-Added-driver-for-HiFiBerry-Amp-amplifier-add-.patch [deleted file]
target/linux/brcm2708/patches-4.9/0074-Update-ds1307-driver-for-device-tree-support.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0075-Add-driver-for-rpi-proto.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0075-Update-ds1307-driver-for-device-tree-support.patch [deleted file]
target/linux/brcm2708/patches-4.9/0076-Add-driver-for-rpi-proto.patch [deleted file]
target/linux/brcm2708/patches-4.9/0076-RaspiDAC3-support.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0077-Add-Support-for-JustBoom-Audio-boards.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0077-RaspiDAC3-support.patch [deleted file]
target/linux/brcm2708/patches-4.9/0078-ARM-adau1977-adc-Add-basic-machine-driver-for-adau19.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0078-Add-Support-for-JustBoom-Audio-boards.patch [deleted file]
target/linux/brcm2708/patches-4.9/0079-ARM-adau1977-adc-Add-basic-machine-driver-for-adau19.patch [deleted file]
target/linux/brcm2708/patches-4.9/0079-New-AudioInjector.net-Pi-soundcard-with-low-jitter-a.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0080-Add-IQAudIO-Digi-WM8804-board-support.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0080-New-AudioInjector.net-Pi-soundcard-with-low-jitter-a.patch [deleted file]
target/linux/brcm2708/patches-4.9/0081-Add-IQAudIO-Digi-WM8804-board-support.patch [deleted file]
target/linux/brcm2708/patches-4.9/0081-New-driver-for-RRA-DigiDAC1-soundcard-using-WM8741-W.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0082-Add-support-for-Dion-Audio-LOCO-DAC-AMP-HAT.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0082-New-driver-for-RRA-DigiDAC1-soundcard-using-WM8741-W.patch [deleted file]
target/linux/brcm2708/patches-4.9/0083-Add-support-for-Dion-Audio-LOCO-DAC-AMP-HAT.patch [deleted file]
target/linux/brcm2708/patches-4.9/0083-Allo-Piano-DAC-boards-Initial-2-channel-stereo-suppo.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0084-Allo-Piano-DAC-boards-Initial-2-channel-stereo-suppo.patch [deleted file]
target/linux/brcm2708/patches-4.9/0084-Support-for-Blokas-Labs-pisound-board.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0085-Support-for-Blokas-Labs-pisound-board.patch [deleted file]
target/linux/brcm2708/patches-4.9/0085-rpi_display-add-backlight-driver-and-overlay.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0086-bcm2835-virtgpio-Virtual-GPIO-driver.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0086-rpi_display-add-backlight-driver-and-overlay.patch [deleted file]
target/linux/brcm2708/patches-4.9/0087-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0087-bcm2835-virtgpio-Virtual-GPIO-driver.patch [deleted file]
target/linux/brcm2708/patches-4.9/0088-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch [deleted file]
target/linux/brcm2708/patches-4.9/0090-OF-DT-Overlay-configfs-interface.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0091-OF-DT-Overlay-configfs-interface.patch [deleted file]
target/linux/brcm2708/patches-4.9/0092-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0093-config-Add-default-configs.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0093-hci_h5-Don-t-send-conf_req-when-ACTIVE.patch [deleted file]
target/linux/brcm2708/patches-4.9/0094-Add-arm64-configuration-and-device-tree-differences.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0094-config-Add-default-configs.patch [deleted file]
target/linux/brcm2708/patches-4.9/0095-Add-arm64-configuration-and-device-tree-differences.patch [deleted file]
target/linux/brcm2708/patches-4.9/0095-vchiq_arm-Tweak-the-logging-output.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0096-vchiq_arm-Access-the-dequeue_pending-flag-locked.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0096-vchiq_arm-Tweak-the-logging-output.patch [deleted file]
target/linux/brcm2708/patches-4.9/0097-vchiq_arm-Access-the-dequeue_pending-flag-locked.patch [deleted file]
target/linux/brcm2708/patches-4.9/0097-vchiq_arm-Service-callbacks-must-not-fail.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0098-vchiq_arm-Add-completion-records-under-the-mutex.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0098-vchiq_arm-Service-callbacks-must-not-fail.patch [deleted file]
target/linux/brcm2708/patches-4.9/0099-vchiq_arm-Add-completion-records-under-the-mutex.patch [deleted file]
target/linux/brcm2708/patches-4.9/0099-vchiq_arm-Avoid-use-of-mutex-in-add_completion.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0100-staging-vchi-Convert-to-current-get_user_pages-argum.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0100-vchiq_arm-Avoid-use-of-mutex-in-add_completion.patch [deleted file]
target/linux/brcm2708/patches-4.9/0101-staging-vchi-Convert-to-current-get_user_pages-argum.patch [deleted file]
target/linux/brcm2708/patches-4.9/0101-staging-vchi-Update-for-rename-of-page_cache_release.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0102-drivers-vchi-Remove-dependency-on-CONFIG_BROKEN.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0102-staging-vchi-Update-for-rename-of-page_cache_release.patch [deleted file]
target/linux/brcm2708/patches-4.9/0103-drivers-vchi-Remove-dependency-on-CONFIG_BROKEN.patch [deleted file]
target/linux/brcm2708/patches-4.9/0103-raspberrypi-firmware-Export-the-general-transaction-.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0104-raspberrypi-firmware-Define-the-MBOX-channel-in-the-.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0104-raspberrypi-firmware-Export-the-general-transaction-.patch [deleted file]
target/linux/brcm2708/patches-4.9/0105-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0105-raspberrypi-firmware-Define-the-MBOX-channel-in-the-.patch [deleted file]
target/linux/brcm2708/patches-4.9/0106-drm-vc4-Add-a-mode-for-using-the-closed-firmware-for.patch [deleted file]
target/linux/brcm2708/patches-4.9/0106-i2c-bcm2835-Fix-hang-for-writing-messages-larger-tha.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0107-i2c-bcm2835-Fix-hang-for-writing-messages-larger-tha.patch [deleted file]
target/linux/brcm2708/patches-4.9/0107-i2c-bcm2835-Protect-against-unexpected-TXW-RXR-inter.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0108-i2c-bcm2835-Protect-against-unexpected-TXW-RXR-inter.patch [deleted file]
target/linux/brcm2708/patches-4.9/0108-i2c-bcm2835-Use-dev_dbg-logging-on-transfer-errors.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0109-i2c-bcm2835-Can-t-support-I2C_M_IGNORE_NAK.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0109-i2c-bcm2835-Use-dev_dbg-logging-on-transfer-errors.patch [deleted file]
target/linux/brcm2708/patches-4.9/0110-i2c-bcm2835-Add-support-for-Repeated-Start-Condition.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0110-i2c-bcm2835-Can-t-support-I2C_M_IGNORE_NAK.patch [deleted file]
target/linux/brcm2708/patches-4.9/0111-i2c-bcm2835-Add-support-for-Repeated-Start-Condition.patch [deleted file]
target/linux/brcm2708/patches-4.9/0111-i2c-bcm2835-Support-i2c-dev-ioctl-I2C_TIMEOUT.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0112-i2c-bcm2835-Add-support-for-dynamic-clock.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0112-i2c-bcm2835-Support-i2c-dev-ioctl-I2C_TIMEOUT.patch [deleted file]
target/linux/brcm2708/patches-4.9/0113-i2c-bcm2835-Add-debug-support.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0113-i2c-bcm2835-Add-support-for-dynamic-clock.patch [deleted file]
target/linux/brcm2708/patches-4.9/0114-arm64-Add-CONFIG_ARCH_BCM2835.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0114-i2c-bcm2835-Add-debug-support.patch [deleted file]
target/linux/brcm2708/patches-4.9/0115-Add-support-for-Silicon-Labs-Si7013-20-21-humidity-t.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0115-arm64-Add-CONFIG_ARCH_BCM2835.patch [deleted file]
target/linux/brcm2708/patches-4.9/0116-Add-support-for-Silicon-Labs-Si7013-20-21-humidity-t.patch [deleted file]
target/linux/brcm2708/patches-4.9/0116-Document-the-si7020-option.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0117-Document-the-si7020-option.patch [deleted file]
target/linux/brcm2708/patches-4.9/0117-pisound-improvements.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0118-Add-driver_name-property.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0118-pisound-improvements.patch [deleted file]
target/linux/brcm2708/patches-4.9/0119-Add-driver_name-paramater.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0119-Revert-Revert-Added-driver-for-HiFiBerry-Amp-amplifi.patch [deleted file]
target/linux/brcm2708/patches-4.9/0120-BCM270X_DT-Add-pi3-disable-wifi-overlay.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0120-hifiberry-amp-Adjust-for-ALSA-object-refactoring.patch [deleted file]
target/linux/brcm2708/patches-4.9/0121-ARM64-Make-it-work-again-on-4.9-1790.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0121-bcm2835-i2s-Changes-for-allowing-asymmetric-sample-f.patch [deleted file]
target/linux/brcm2708/patches-4.9/0122-ARM64-Enable-Kernel-Address-Space-Randomization-1792.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0122-Add-driver_name-property.patch [deleted file]
target/linux/brcm2708/patches-4.9/0123-Add-driver_name-paramater.patch [deleted file]
target/linux/brcm2708/patches-4.9/0124-ARM64-Enable-RTL8187-RTL8192CU-wifi-in-build-config.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0124-BCM270X_DT-Add-pi3-disable-wifi-overlay.patch [deleted file]
target/linux/brcm2708/patches-4.9/0125-ARM64-Make-it-work-again-on-4.9-1790.patch [deleted file]
target/linux/brcm2708/patches-4.9/0125-BCM270X_DT-Add-spi0-cs-overlay.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0126-ARM64-Enable-Kernel-Address-Space-Randomization-1792.patch [deleted file]
target/linux/brcm2708/patches-4.9/0126-spi-bcm2835-Disable-forced-software-CS.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0127-config-Add-CONFIG_TCP_CONG_BBR.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0128-ARM64-Enable-RTL8187-RTL8192CU-wifi-in-build-config.patch [deleted file]
target/linux/brcm2708/patches-4.9/0128-BCM270X_DT-Enable-UART0-on-CM3.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0129-BCM270X_DT-Add-spi0-cs-overlay.patch [deleted file]
target/linux/brcm2708/patches-4.9/0129-config-Add-CONFIG_MD_M25P80-and-CONFIG_MD_SPI_NOR.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0130-ARM64-DWC_OTG-Port-dwc_otg-driver-to-ARM64.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0130-spi-bcm2835-Disable-forced-software-CS.patch [deleted file]
target/linux/brcm2708/patches-4.9/0131-ARM64-Round-Robin-dispatch-IRQs-between-CPUs.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0131-config-Add-CONFIG_TCP_CONG_BBR.patch [deleted file]
target/linux/brcm2708/patches-4.9/0132-ARM64-Enable-DWC_OTG-Driver-In-ARM64-Build-Config-bc.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0132-Revert-bcm2835-i2s-Changes-for-allowing-asymmetric-s.patch [deleted file]
target/linux/brcm2708/patches-4.9/0133-ARM64-Use-dwc_otg-driver-by-default-for-USB.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0133-BCM270X_DT-Enable-UART0-on-CM3.patch [deleted file]
target/linux/brcm2708/patches-4.9/0134-BCM270X_DT-Add-reference-to-audio_pins-to-CM-dtb.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0134-config-Add-CONFIG_MD_M25P80-and-CONFIG_MD_SPI_NOR.patch [deleted file]
target/linux/brcm2708/patches-4.9/0135-ARM64-DWC_OTG-Port-dwc_otg-driver-to-ARM64.patch [deleted file]
target/linux/brcm2708/patches-4.9/0135-config-Add-additional-network-scheduling-modules.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0136-ARM64-Round-Robin-dispatch-IRQs-between-CPUs.patch [deleted file]
target/linux/brcm2708/patches-4.9/0136-ASoC-A-simple-card-overlay-for-ADAU7002.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0137-ARM64-Enable-DWC_OTG-Driver-In-ARM64-Build-Config-bc.patch [deleted file]
target/linux/brcm2708/patches-4.9/0137-config-Add-SND_SOC_ADAU7002-codec-module.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0138-ARM64-Use-dwc_otg-driver-by-default-for-USB.patch [deleted file]
target/linux/brcm2708/patches-4.9/0138-Add-overlay-for-mcp3008-adc-1818.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0139-BCM270X_DT-Add-reference-to-audio_pins-to-CM-dtb.patch [deleted file]
target/linux/brcm2708/patches-4.9/0139-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0140-config-Add-additional-network-scheduling-modules.patch [deleted file]
target/linux/brcm2708/patches-4.9/0140-gpio_mem-Remove-unnecessary-dev_info-output-1830.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0141-ASoC-A-simple-card-overlay-for-ADAU7002.patch [deleted file]
target/linux/brcm2708/patches-4.9/0141-config-Enable-regulator-support.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0142-BCM270x-DT-expose-3.3V-and-5V-system-rails.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0142-config-Add-SND_SOC_ADAU7002-codec-module.patch [deleted file]
target/linux/brcm2708/patches-4.9/0143-Add-overlay-for-mcp3008-adc-1818.patch [deleted file]
target/linux/brcm2708/patches-4.9/0143-BCM270x-DT-Consolidate-audio-card-overlays.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0144-ASoC-Add-driver-for-Cirrus-Logic-Audio-Card.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0144-usb-dwc2-Avoid-suspending-if-we-re-in-gadget-mode-18.patch [deleted file]
target/linux/brcm2708/patches-4.9/0145-config-Enable-regulator-support.patch [deleted file]
target/linux/brcm2708/patches-4.9/0145-config-enable-Cirrus-Logic-Audio-Card.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0146-BCM270x-DT-expose-3.3V-and-5V-system-rails.patch [deleted file]
target/linux/brcm2708/patches-4.9/0146-irq-bcm2836-Avoid-Invalid-trigger-warning.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0147-BCM270x-DT-Consolidate-audio-card-overlays.patch [deleted file]
target/linux/brcm2708/patches-4.9/0147-sound-Demote-deferral-errors-to-INFO-level.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0148-ASoC-Add-driver-for-Cirrus-Logic-Audio-Card.patch [deleted file]
target/linux/brcm2708/patches-4.9/0148-sound-Suppress-error-message-about-deferrals.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0149-Update-vfpmodule.c.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0149-config-enable-Cirrus-Logic-Audio-Card.patch [deleted file]
target/linux/brcm2708/patches-4.9/0150-dwc_otg-fix-summarize-urb-actual_length-for-isochron.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0150-gpio_mem-Remove-unnecessary-dev_info-output-1830.patch [deleted file]
target/linux/brcm2708/patches-4.9/0151-clk-bcm2835-Fix-fixed_divider-of-pllh_aux.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0152-clk-bcm-Support-rate-change-propagation-on-bcm2835-c.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0153-clk-bcm-Allow-rate-change-propagation-to-PLLH_AUX-on.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0154-clk-bcm-Fix-maybe-uninitialized-warning-in-bcm2835_c.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0155-clk-bcm2835-Don-t-rate-change-PLLs-on-behalf-of-DSI-.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0156-clk-bcm2835-Register-the-DSI0-DSI1-pixel-clocks.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0157-clk-bcm2835-Add-leaf-clock-measurement-support-disab.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0158-drm-panel-Add-support-for-the-Raspberry-Pi-7-Touchsc.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0159-BCM270X-Add-the-DSI-panel-to-the-defconfig.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0160-ARM-bcm2835-dt-Add-the-DSI-module-nodes-and-clocks.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0161-BCM270X-Enable-the-DSI-panel-node-in-the-VC4-overlay.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0162-drm-vc4-Fix-termination-of-the-initial-scan-for-bran.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0163-drm-vc4-Add-support-for-rendering-with-ETC1-textures.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0164-drm-vc4-Use-runtime-autosuspend-to-avoid-thrashing-V.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0165-drm-vc4-Add-fragment-shader-threading-support.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0166-drm-vc4-Fix-race-between-page-flip-completion-event-.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0167-drm-vc4-Fix-clock_select-setting-for-the-VEC-encoder.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0168-drm-Add-TV-connector-states-to-drm_connector_state.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0169-drm-Turn-DRM_MODE_SUBCONNECTOR_xx-definitions-into-a.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0170-drm-vc4-Add-support-for-the-VEC-Video-Encoder-IP.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0171-drm-vc4-Set-up-SCALER_DISPCTRL-at-boot.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0172-drm-vc4-Add-support-for-feeding-DSI-encoders-from-th.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0173-drm-vc4-Add-DSI-driver.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0174-ARM-dts-bcm283x-Add-VEC-node-in-bcm283x.dtsi.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0175-ARM-dts-bcm283x-Enable-the-VEC-IP-on-all-RaspberryPi.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0176-BCM270X-Disable-VEC-unless-vc4-kms-v3d-is-present.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0177-drm-vc4-Name-the-primary-and-cursor-planes-in-fkms.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0178-drm-vc4-Add-DRM_DEBUG_ATOMIC-for-the-insides-of-fkms.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0179-drm-vc4-Fix-sending-of-page-flip-completion-events-i.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0180-drm-vc4-Fulfill-user-BO-creation-requests-from-the-k.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0181-drm-vc4-Fix-OOPSes-from-trying-to-cache-a-partially-.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0182-drm-vc4-Verify-at-boot-that-CMA-doesn-t-cross-a-256M.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0183-BCM270X_DT-Add-SMSC-ethernet-controller-to-DT.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0185-clk-bcm2835-Mark-used-PLLs-and-dividers-CRITICAL.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0186-clk-bcm2835-Add-claim-clocks-property.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0187-dmaengine-bcm2835-Fix-cyclic-DMA-period-splitting.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0188-Add-ads1015-driver-to-config.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0189-config-add-slcan-kernel-module.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0190-sound-Support-for-Dion-Audio-LOCO-V2-DAC-AMP-HAT.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0191-SQUASH-Add-LOCO-V2-overlay-from-last-commit.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0192-Add-support-for-Fe-Pi-audio-sound-card.-1867.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0193-Add-overlay-for-ads1115-ADCs-1864.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0194-clk-bcm2835-Correct-the-prediv-logic.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0195-amba_pl011-Round-input-clock-up.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0196-BCM2835-V4L2-Ensure-H264-header-bytes-get-a-sensible.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0197-BCM2835-V4L2-Correctly-denote-key-frames-in-encoded-.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0198-bcm2835-gpio-exp-Driver-for-GPIO-expander-via-mailbo.patch [new file with mode: 0644]
target/linux/brcm2708/patches-4.9/0199-BCM270X_DT-Add-bcm2708-rpi-0-w.dts.patch [new file with mode: 0644]

index 2a866e4..ecc6242 100644 (file)
@@ -12,8 +12,7 @@ set_state() {
                status_led="led0"
                ;;
        rpi-b-plus |\
-       rpi-2-b |\
-       rpi-3-b)
+       rpi-2-b)
                status_led="led1"
                ;;
        esac
index 1619ba9..c1bed07 100644 (file)
@@ -164,6 +164,7 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_STRNCPY_FROM_USER=y
 CONFIG_GENERIC_STRNLEN_USER=y
 CONFIG_GPIOLIB=y
+# CONFIG_GPIO_BCM_EXP is not set
 # CONFIG_GPIO_BCM_VIRT is not set
 CONFIG_GPIO_SYSFS=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
index dffc368..0c9adec 100644 (file)
@@ -179,6 +179,7 @@ CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_STRNCPY_FROM_USER=y
 CONFIG_GENERIC_STRNLEN_USER=y
 CONFIG_GPIOLIB=y
+CONFIG_GPIO_BCM_EXP=y
 CONFIG_GPIO_BCM_VIRT=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
index 04d0da8..e07d8cf 100644 (file)
@@ -191,6 +191,7 @@ CONFIG_GENERIC_STRNCPY_FROM_USER=y
 CONFIG_GENERIC_STRNLEN_USER=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GPIOLIB=y
+CONFIG_GPIO_BCM_EXP=y
 CONFIG_GPIO_BCM_VIRT=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
index e2b3fdb..a49f9d4 100644 (file)
@@ -126,8 +126,8 @@ define KernelPackage/sound-soc-digidac1-soundcard
        $(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8741.ko \
        $(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8804.ko \
        $(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8804-i2c.ko
-  AUTOLOAD:=$(call AutoLoad,68,snd-soc-snd-soc-wm8741 \
-       snd-soc-snd-soc-wm8804 snd-soc-snd-soc-wm8804-i2c \
+  AUTOLOAD:=$(call AutoLoad,68,snd-soc-wm8741 \
+       snd-soc-wm8804 snd-soc-wm8804-i2c \
        snd-soc-digidac1-soundcard)
   DEPENDS:= \
        kmod-sound-soc-bcm2835-i2s \
@@ -149,7 +149,7 @@ define KernelPackage/sound-soc-dionaudio-loco
   FILES:= \
        $(LINUX_DIR)/sound/soc/bcm/snd-soc-dionaudio-loco.ko \
        $(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm5102a.ko
-  AUTOLOAD:=$(call AutoLoad,68,snd-soc-snd-soc-pcm5102a \
+  AUTOLOAD:=$(call AutoLoad,68,snd-soc-pcm5102a \
        snd-soc-dionaudio-loco)
   DEPENDS:= \
        kmod-sound-soc-bcm2835-i2s
@@ -162,6 +162,50 @@ endef
 
 $(eval $(call KernelPackage,sound-soc-dionaudio-loco))
 
+define KernelPackage/sound-soc-dionaudio-loco-v2
+  TITLE:=Support for Dion Audio LOCO-V2 DAC-AMP
+  KCONFIG:= \
+        CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2 \
+        CONFIG_SND_SOC_PCM512x \
+        CONFIG_SND_SOC_PCM512x_I2C
+  FILES:= \
+        $(LINUX_DIR)/sound/soc/bcm/snd-soc-dionaudio-loco.ko \
+       $(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x.ko \
+       $(LINUX_DIR)/sound/soc/codecs/snd-soc-pcm512x-i2c.ko
+  AUTOLOAD:=$(call AutoLoad,68,snd-soc-pcm512x snd-soc-pcm512x-i2c \
+        snd-soc-dionaudio-loco)
+  DEPENDS:= \
+        kmod-sound-soc-bcm2835-i2s
+  $(call AddDepends/sound)
+endef
+
+define KernelPackage/sound-soc-dionaudio-loco-v2/description
+  This package contains support for Dion Audio LOCO-V2 DAC-AMP
+endef
+
+$(eval $(call KernelPackage,sound-soc-dionaudio-loco-v2))
+
+define KernelPackage/sound-soc-fe-pi
+  TITLE:=Support for Fe-Pi Audio Sound Card
+  KCONFIG:= \
+       CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO \
+       CONFIG_SND_SOC_SGTL5000
+  FILES:= \
+       $(LINUX_DIR)/sound/soc/bcm/snd-soc-fe-pi-audio.ko \
+       $(LINUX_DIR)/sound/soc/codecs/snd-soc-sgtl5000.ko
+  AUTOLOAD:=$(call AutoLoad,68,snd-soc-sgtl5000 \
+       snd-soc-fe-pi-audio)
+  DEPENDS:= \
+       kmod-sound-soc-bcm2835-i2s
+  $(call AddDepends/sound)
+endef
+
+define KernelPackage/sound-soc-fe-pi/description
+  This package contains support for Fe-Pi Audio Sound Card
+endef
+
+$(eval $(call KernelPackage,sound-soc-fe-pi))
+
 define KernelPackage/sound-soc-hifiberry-dac
   TITLE:=Support for HifiBerry DAC
   KCONFIG:= \
index b8b424b..a5737e3 100644 (file)
@@ -1,4 +1,4 @@
-From 3df8aa3aa981f3c463d793b69fa23c5aab53fec2 Mon Sep 17 00:00:00 2001
+From c01a3230d8cdd396dcec2619646f6cf2753481d8 Mon Sep 17 00:00:00 2001
 From: Steve Glendinning <steve.glendinning@smsc.com>
 Date: Thu, 19 Feb 2015 18:47:12 +0000
 Subject: [PATCH] smsx95xx: fix crimes against truesize
index 9d47276..fc7ac4d 100644 (file)
@@ -1,4 +1,4 @@
-From aefca8fa1aefb12cc7ac1862b4c6e94c1ec9e74c Mon Sep 17 00:00:00 2001
+From 8272cd893c3bca2f047dcf06ae11d9ada6d26f33 Mon Sep 17 00:00:00 2001
 From: Sam Nazarko <email@samnazarko.co.uk>
 Date: Fri, 1 Apr 2016 17:27:21 +0100
 Subject: [PATCH] smsc95xx: Experimental: Enable turbo_mode and packetsize=2560
index dbcf303..8075dff 100644 (file)
@@ -1,4 +1,4 @@
-From a4774fe88b0a06562a7b6c5d3181f13e7444a3f0 Mon Sep 17 00:00:00 2001
+From 2e70eba32ed21b1a909b9ae6a06b3384a33fc5a4 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Tue, 26 Mar 2013 17:26:38 +0000
 Subject: [PATCH] Allow mac address to be set in smsc95xx
index f46579b..4b80ab0 100644 (file)
@@ -1,4 +1,4 @@
-From 0b4480a51b80954e34605c9bf42947d97e37d1c3 Mon Sep 17 00:00:00 2001
+From 3115fe312a2c751954f1ab0f0ba07aea1c1c7d1b Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Fri, 13 Mar 2015 12:43:36 +0000
 Subject: [PATCH] Protect __release_resource against resources without parents
index 376d6a8..b271d26 100644 (file)
@@ -1,4 +1,4 @@
-From 029f649c29d81583b412cb6ff5792a3cf9102a95 Mon Sep 17 00:00:00 2001
+From 55d0c167f73b9583357fc0af36d7a01666885e0e Mon Sep 17 00:00:00 2001
 From: Eric Anholt <eric@anholt.net>
 Date: Thu, 18 Dec 2014 16:07:15 -0800
 Subject: [PATCH] mm: Remove the PFN busy warning
index 3ebcb0a..5f5bd83 100644 (file)
@@ -1,4 +1,4 @@
-From 3fad09910dafeb93a351aefa90ca4fd490f68c84 Mon Sep 17 00:00:00 2001
+From 0badcb291f4fb5c3477c37b4ad4a0e27dd863272 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Fri, 4 Dec 2015 17:41:50 +0000
 Subject: [PATCH] irq-bcm2836: Prevent spurious interrupts, and trap them early
index a25275f..56be640 100644 (file)
@@ -1,4 +1,4 @@
-From 0c9c73fafac86e96a1d1fb59b13aac0ce6d70692 Mon Sep 17 00:00:00 2001
+From 697bdb968798a2bb37c767582ba54fc6486c5de8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
 Date: Fri, 12 Jun 2015 19:01:05 +0200
 Subject: [PATCH] irqchip: bcm2835: Add FIQ support
index 710e73a..9c7515f 100644 (file)
@@ -1,4 +1,4 @@
-From 3b662c4466e336bab7ebb438b65bd5487d30305d Mon Sep 17 00:00:00 2001
+From 78b53021ae0715792fb6a89bd9e7c02fc254be5c Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
 Date: Fri, 23 Oct 2015 16:26:55 +0200
 Subject: [PATCH] irqchip: irq-bcm2835: Add 2836 FIQ support
index be8e903..447f1ce 100644 (file)
@@ -1,4 +1,4 @@
-From 0059a02a50c6d01a399024cad56ec5254c645fd0 Mon Sep 17 00:00:00 2001
+From cc016c1876877aa42a84cc9c0c89af1b7410ff67 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Tue, 30 Jun 2015 14:12:42 +0100
 Subject: [PATCH] serial: 8250: Don't crash when nr_uarts is 0
index 978d675..319eafb 100644 (file)
@@ -1,4 +1,4 @@
-From c9d0e1314de3cde0674ef5a2c8688b1dc10b2091 Mon Sep 17 00:00:00 2001
+From ea9188a48450ddab740fe5ffe6733fb2362ea5c8 Mon Sep 17 00:00:00 2001
 From: notro <notro@tronnes.org>
 Date: Thu, 10 Jul 2014 13:59:47 +0200
 Subject: [PATCH] pinctrl-bcm2835: Set base to 0 give expected gpio numbering
index 67cc420..b29aa8d 100644 (file)
@@ -1,4 +1,4 @@
-From c7ab4eb8e79ceaa923a7c9f4e14dc085a1934a29 Mon Sep 17 00:00:00 2001
+From 6f92d02f7af5a9b5ed5ded7dbeb18bf2bbb2ad85 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Tue, 24 Feb 2015 13:40:50 +0000
 Subject: [PATCH] pinctrl-bcm2835: Fix interrupt handling for GPIOs 28-31 and
index e16f89a..d2b764f 100644 (file)
@@ -1,4 +1,4 @@
-From a5a46d240c25576b901f0afa76575c1ab4a1469a Mon Sep 17 00:00:00 2001
+From 6b37913f47f5fbd2748ea9abfb9a17fcfb1b5d29 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Thu, 26 Feb 2015 09:58:22 +0000
 Subject: [PATCH] pinctrl-bcm2835: Only request the interrupts listed in the
index bac0573..4eb4923 100644 (file)
@@ -1,4 +1,4 @@
-From 403ea1795165839348e5953b80ec4da31b639f8e Mon Sep 17 00:00:00 2001
+From e64023aab5addf920379e9f919d7c5cd4c8d0981 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Fri, 6 May 2016 12:32:47 +0100
 Subject: [PATCH] pinctrl-bcm2835: Return pins to inputs when freed
index 9b8e869..62145a2 100644 (file)
@@ -1,4 +1,4 @@
-From d4a8fe93bffd4cab698a2630ee7125da93d55d8a Mon Sep 17 00:00:00 2001
+From 6603973d0897c1a9b3b1a813c8ab1204efe98fe0 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Wed, 24 Jun 2015 14:10:44 +0100
 Subject: [PATCH] spi-bcm2835: Support pin groups other than 7-11
index 3ec3537..5d4062c 100644 (file)
@@ -1,4 +1,4 @@
-From fa79e1013557f418119bd9dd2c0cf4c51eb4c093 Mon Sep 17 00:00:00 2001
+From c0aaf0d4213bfc9df85c397cd974f7a6f15255f2 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Fri, 1 Jul 2016 22:09:24 +0100
 Subject: [PATCH] spi-bcm2835: Disable forced software CS
index 4143498..08577fc 100644 (file)
@@ -1,4 +1,4 @@
-From 85bb42acd1c5a045d372d187c26b77c6bf1b617a Mon Sep 17 00:00:00 2001
+From 21f7f9d8146dd9e5a860198781febf78aafee3d1 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Tue, 8 Nov 2016 21:35:38 +0000
 Subject: [PATCH] spi-bcm2835: Remove unused code
index 1311ccb..cd14dcc 100644 (file)
@@ -1,4 +1,4 @@
-From c33ee72bce07fc83e4797ebea1bce97c0b301ba2 Mon Sep 17 00:00:00 2001
+From 78678f8e9f7fbbafadfecd54a5fb166a94d8d84f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
 Date: Wed, 3 Jun 2015 12:26:13 +0200
 Subject: [PATCH] ARM: bcm2835: Set Serial number and Revision
index e3bde68..e800713 100644 (file)
@@ -1,4 +1,4 @@
-From b4e0c1c3facd38ef5e615248c42dba90d2622257 Mon Sep 17 00:00:00 2001
+From e4f0f7daebca7005c67bf7ae3f6f59df587e91d5 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
 Date: Sat, 3 Oct 2015 22:22:55 +0200
 Subject: [PATCH] dmaengine: bcm2835: Load driver early and support legacy API
index deb271c..37eb154 100644 (file)
@@ -1,4 +1,4 @@
-From 05f9e93200ec5d5e27c8a93f69588180cddda924 Mon Sep 17 00:00:00 2001
+From e4edca57f8db4d03ad4dc82dd6761c0142ab310d Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Mon, 25 Jan 2016 17:25:12 +0000
 Subject: [PATCH] firmware: Updated mailbox header
index 94862f5..dfa312b 100644 (file)
@@ -1,4 +1,4 @@
-From c9cb54929b3466ed0da304563e22739477055d3b Mon Sep 17 00:00:00 2001
+From 599e7165ec6477139dae4f32a12e8d49d5dd8859 Mon Sep 17 00:00:00 2001
 From: Eric Anholt <eric@anholt.net>
 Date: Mon, 9 May 2016 17:28:18 -0700
 Subject: [PATCH] clk: bcm2835: Mark GPIO clocks enabled at boot as critical.
index 8c197fc..4992165 100644 (file)
@@ -1,4 +1,4 @@
-From 6c8399fb8dcc815aa9d6b4488a519785912ea983 Mon Sep 17 00:00:00 2001
+From ffa1e97926ba3e22f7e41e2b5e16737461bf31ae Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Wed, 15 Jun 2016 16:48:41 +0100
 Subject: [PATCH] rtc: Add SPI alias for pcf2123 driver
index 160c576..392ce70 100644 (file)
@@ -1,4 +1,4 @@
-From 259f169ef05f12bc7fed007befc11ed6c66dd9c8 Mon Sep 17 00:00:00 2001
+From 0e690096e05c3b4e806381ff38124dbdae3ba877 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
 Date: Fri, 7 Oct 2016 16:50:59 +0200
 Subject: [PATCH] watchdog: bcm2835: Support setting reboot partition
index dee1fed..d29517e 100644 (file)
@@ -1,4 +1,4 @@
-From 79d93260c98e0164ca89c9f7c767528d7a3aaeae Mon Sep 17 00:00:00 2001
+From 527f4308ee55e8727c486528879b7945b6404a72 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Tue, 5 Apr 2016 19:40:12 +0100
 Subject: [PATCH] reboot: Use power off rather than busy spinning when halt is
index 120f25d..90c0a0e 100644 (file)
@@ -1,4 +1,4 @@
-From 9799ea4ba8ae1e6c586a3dd728ad75f68830e93f Mon Sep 17 00:00:00 2001
+From d63e8989dc891121464a86cec95952f104edf383 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Wed, 9 Nov 2016 13:02:52 +0000
 Subject: [PATCH] bcm: Make RASPBERRYPI_POWER depend on PM
index d4f4fec..9b2a613 100644 (file)
@@ -1,4 +1,4 @@
-From 261269cc41f6b77f7264f0e44f9b9da5cc36de00 Mon Sep 17 00:00:00 2001
+From 492d6b9c3f1f8cc1eb890dc0eafacae51d6ba2f0 Mon Sep 17 00:00:00 2001
 From: Martin Sperl <kernel@martin.sperl.org>
 Date: Fri, 2 Sep 2016 16:45:27 +0100
 Subject: [PATCH] Register the clocks early during the boot process, so that
index 1fb2184..97309da 100644 (file)
@@ -1,4 +1,4 @@
-From a195976d635c3672cae684d6338655aa25f6d98c Mon Sep 17 00:00:00 2001
+From ecba31015228961644ad8e17bcf132eea9c7a7f3 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Tue, 6 Dec 2016 17:05:39 +0000
 Subject: [PATCH] bcm2835-rng: Avoid initialising if already enabled
index 16d32cc..0f5afac 100644 (file)
@@ -1,4 +1,4 @@
-From 6c52812a34fa4ab0d40b57fef10d23fe2fb0768b Mon Sep 17 00:00:00 2001
+From d438958d741a4edbb641791461ee8f6c34495a89 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Wed, 24 Aug 2016 16:28:44 +0100
 Subject: [PATCH] kbuild: Ignore dtco targets when filtering symbols
index 4eecc14..c193ef9 100644 (file)
@@ -1,4 +1,4 @@
-From 8ee6fd93aa3328d325524b8503714e3b4839d1b9 Mon Sep 17 00:00:00 2001
+From 317560a92ebfdac14df54b6a242dd8f5ecc1fd58 Mon Sep 17 00:00:00 2001
 From: Robert Tiemann <rtie@gmx.de>
 Date: Mon, 20 Jul 2015 11:01:25 +0200
 Subject: [PATCH] BCM2835_DT: Fix I2S register map
index 81d48b7..20e5419 100644 (file)
@@ -1,4 +1,4 @@
-From 28a1aeb6b49ffdf5cb5ba9e326df962c270c1f34 Mon Sep 17 00:00:00 2001
+From 9874eb6473865b9d975a7c3756099955e7454e21 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Sun, 12 May 2013 12:24:19 +0100
 Subject: [PATCH] Main bcm2708/bcm2709 linux port
index 971581a..0610d03 100644 (file)
@@ -1,4 +1,4 @@
-From 4c7d2ae77def863967cbc6e73597d92fe0fb24e7 Mon Sep 17 00:00:00 2001
+From 65f57e56fcf9d40383718f0bcd9e6f95a34ca1aa Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Wed, 1 May 2013 19:46:17 +0100
 Subject: [PATCH] Add dwc_otg driver
index a306868..b7c05c1 100644 (file)
@@ -1,4 +1,4 @@
-From a5db9164cfc4fdbd25b20962f3da042cdc75a4dc Mon Sep 17 00:00:00 2001
+From cca69d888eb770c496cca83d37accb62a22e84c7 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Wed, 17 Jun 2015 17:06:34 +0100
 Subject: [PATCH] bcm2708 framebuffer driver
index d21f187..a2f4551 100644 (file)
@@ -1,4 +1,4 @@
-From 5ab35842ff7cc211dcfbf1113953778923097496 Mon Sep 17 00:00:00 2001
+From 33444cee555204ee605e6ec9050b04e874fb0090 Mon Sep 17 00:00:00 2001
 From: Florian Meier <florian.meier@koalo.de>
 Date: Fri, 22 Nov 2013 14:22:53 +0100
 Subject: [PATCH] dmaengine: Add support for BCM2708
index 00920a6..70fb8f3 100644 (file)
@@ -1,4 +1,4 @@
-From feab5b6b38842fca38720e0b2e9bfdc66d41c991 Mon Sep 17 00:00:00 2001
+From 1620619c5fa6acae1e119d6461b5c9a2a9416e69 Mon Sep 17 00:00:00 2001
 From: gellert <gellert@raspberrypi.org>
 Date: Fri, 15 Aug 2014 16:35:06 +0100
 Subject: [PATCH] MMC: added alternative MMC driver
index c6ceef0..c4597ec 100644 (file)
@@ -1,4 +1,4 @@
-From 3d0f0b3db1b62e5d913517ce305913cc71803ef1 Mon Sep 17 00:00:00 2001
+From 5da331581bb2a8d90f6a7a7bdf8c1b30efe3cf64 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Wed, 25 Mar 2015 17:49:47 +0000
 Subject: [PATCH] Adding bcm2835-sdhost driver, and an overlay to enable it
index 100c8b1..d84a0fe 100644 (file)
@@ -1,4 +1,4 @@
-From f6be5bc28ee258731e13b5e917d69f601d062014 Mon Sep 17 00:00:00 2001
+From 6d11059a087b8101cf34a09a1e3342bb4f1576de Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Wed, 11 May 2016 12:50:33 +0100
 Subject: [PATCH] mmc: Add MMC_QUIRK_ERASE_BROKEN for some cards
index 87b62dc..50bad76 100644 (file)
@@ -1,4 +1,4 @@
-From a079bbcd1d23f00392eb79d7bcad867844f84cd9 Mon Sep 17 00:00:00 2001
+From 4d96064d4c95d73d22563cea403eccd72e7b0da0 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Wed, 3 Jul 2013 00:31:47 +0100
 Subject: [PATCH] cma: Add vc_cma driver to enable use of CMA
index c951b6f..58b45de 100644 (file)
@@ -1,4 +1,4 @@
-From 340dfdd9f8dfad3f60665cac7f19d774c001b0de Mon Sep 17 00:00:00 2001
+From 41a90e24c272c84fb8c6d23ac451f0c725dcded6 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Mon, 26 Mar 2012 22:15:50 +0100
 Subject: [PATCH] bcm2708: alsa sound driver
index fbfddde..6a22bdf 100644 (file)
@@ -1,4 +1,4 @@
-From 079c7a4a324b1baa4e727c9e3dfacf503345bb18 Mon Sep 17 00:00:00 2001
+From 94c0e75bc85ad2a034c501b6d3640b880b9c3bb7 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Fri, 28 Oct 2016 15:36:43 +0100
 Subject: [PATCH] vc_mem: Add vc_mem driver for querying firmware memory
index d7bce81..ff1cfad 100644 (file)
@@ -1,4 +1,4 @@
-From 148da7d48af0416c716b0103bcc14d01cc97d09b Mon Sep 17 00:00:00 2001
+From b62c07606f1673e2e0b9e70ce89e48fc240a7ee1 Mon Sep 17 00:00:00 2001
 From: Tim Gover <tgover@broadcom.com>
 Date: Tue, 22 Jul 2014 15:41:04 +0100
 Subject: [PATCH] vcsm: VideoCore shared memory service for BCM2835
index 66949f5..618cb9f 100644 (file)
@@ -1,4 +1,4 @@
-From f035c5328fecc8970b9a9713cd345d56f5e81f98 Mon Sep 17 00:00:00 2001
+From 0f326aa0cf8a16ab7f29606b2eda7186f1fb9367 Mon Sep 17 00:00:00 2001
 From: Luke Wren <luke@raspberrypi.org>
 Date: Fri, 21 Aug 2015 23:14:48 +0100
 Subject: [PATCH] Add /dev/gpiomem device for rootless user GPIO access
index 7a05db4..3d75e70 100644 (file)
@@ -1,4 +1,4 @@
-From ddedd1f135c5311bb4615dda5b285ce688cc50d4 Mon Sep 17 00:00:00 2001
+From 8b3f935c48ff65dfb8985ce3e6c631530cd1471a Mon Sep 17 00:00:00 2001
 From: Luke Wren <wren6991@gmail.com>
 Date: Sat, 5 Sep 2015 01:14:45 +0100
 Subject: [PATCH] Add SMI driver
index 312a294..69f68c7 100644 (file)
@@ -1,4 +1,4 @@
-From 6e5058f6cb203dd31935ba03eeff0d98c7531bcf Mon Sep 17 00:00:00 2001
+From 6bc6d433aaed4d4a5d5be44e70d9de865a850048 Mon Sep 17 00:00:00 2001
 From: Martin Sperl <kernel@martin.sperl.org>
 Date: Tue, 26 Apr 2016 14:59:21 +0000
 Subject: [PATCH] MISC: bcm2835: smi: use clock manager and fix reload issues
index dee3c1d..ec6010a 100644 (file)
@@ -1,4 +1,4 @@
-From 83148030b231764e7a5fc14bd2c9ccc6a104a872 Mon Sep 17 00:00:00 2001
+From be64c4dbf6be17ce20ee214478509a3738256d46 Mon Sep 17 00:00:00 2001
 From: Luke Wren <wren6991@gmail.com>
 Date: Sat, 5 Sep 2015 01:16:10 +0100
 Subject: [PATCH] Add SMI NAND driver
index ea529b8..0cbc1c4 100644 (file)
@@ -1,4 +1,4 @@
-From e12517458be7d5ec0eccc2c23db2b78badd54587 Mon Sep 17 00:00:00 2001
+From 277c109833c1d78543bec0723ab42f4c79937df9 Mon Sep 17 00:00:00 2001
 From: Aron Szabo <aron@aron.ws>
 Date: Sat, 16 Jun 2012 12:15:55 +0200
 Subject: [PATCH] lirc: added support for RaspberryPi GPIO
index 8929ee2..7c5691c 100644 (file)
@@ -1,4 +1,4 @@
-From 91eeb6693671b5ae0220f4a276b84e6597266cb9 Mon Sep 17 00:00:00 2001
+From 7d4719c360b755637c2e68f9855be282cd0065b6 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Wed, 3 Jul 2013 00:49:20 +0100
 Subject: [PATCH] Add cpufreq driver
index fa826cb..ff6084f 100644 (file)
@@ -1,4 +1,4 @@
-From c83d1bbc2d9feaf23252482682824babbbd7bbd9 Mon Sep 17 00:00:00 2001
+From 3c847bc6c9d6f4115c82943c869c55244b39a5c4 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Tue, 26 Mar 2013 19:24:24 +0000
 Subject: [PATCH] Added hwmon/thermal driver for reporting core temperature.
index acb199d..b86fb40 100644 (file)
@@ -1,4 +1,4 @@
-From d34838cfa7c139fa069b7e038d3ea2b56c50a353 Mon Sep 17 00:00:00 2001
+From af4e8a3c7b645480f57ec14ded02fba6976ff2d5 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Wed, 17 Jun 2015 15:44:08 +0100
 Subject: [PATCH] Add Chris Boot's i2c driver
index cd62abe..c37c0f6 100644 (file)
@@ -1,4 +1,4 @@
-From e826eaf145a568f477ab9e5554a563233ad7fb49 Mon Sep 17 00:00:00 2001
+From 2e8101a5e6228109d2cd5b965b6077e63e643d6b Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
 Date: Fri, 26 Jun 2015 14:27:06 +0200
 Subject: [PATCH] char: broadcom: Add vcio module
index 3e47d68..ecaf614 100644 (file)
@@ -1,4 +1,4 @@
-From 2838aca7eb2ef14cb94ac43921fc2db291af96a7 Mon Sep 17 00:00:00 2001
+From f281fd683848cd432f7b73c869676be6362ce1b8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
 Date: Fri, 26 Jun 2015 14:25:01 +0200
 Subject: [PATCH] firmware: bcm2835: Support ARCH_BCM270x
index 2e77160..e6baeab 100644 (file)
@@ -1,4 +1,4 @@
-From 35fa034f52f341a95e10034b2f36e2af05fee117 Mon Sep 17 00:00:00 2001
+From 88f7fe5348a24191969b07537b38449a83369d32 Mon Sep 17 00:00:00 2001
 From: Vincent Sanders <vincent.sanders@collabora.co.uk>
 Date: Wed, 30 Jan 2013 12:45:18 +0000
 Subject: [PATCH] bcm2835: add v4l2 camera device
index 6feda0e..7ae4edd 100644 (file)
@@ -1,4 +1,4 @@
-From 59799351c2a2951565e10b2ef69ccff34f94fd30 Mon Sep 17 00:00:00 2001
+From c1275c733d61290f7477eb7bbaea96d04206eff3 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Mon, 11 May 2015 09:00:42 +0100
 Subject: [PATCH] scripts: Add mkknlimg and knlinfo scripts from tools repo
index 5fdf024..ed4b270 100644 (file)
@@ -1,4 +1,4 @@
-From 913a79481bedcfed6727e899ab3f5a9291328f55 Mon Sep 17 00:00:00 2001
+From 61ad4b70c72fd7d1d3930b50e180d9727eeae150 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Mon, 10 Aug 2015 09:49:15 +0100
 Subject: [PATCH] scripts/dtc: Update to upstream version 1.4.1
index 6767122..d9d1fa9 100644 (file)
@@ -1,4 +1,4 @@
-From 2ad7caa56296821bfab4ce0e808a0d1d2c8ac9f4 Mon Sep 17 00:00:00 2001
+From 589cd87acedc0e24214934816b6c16b4e76a894d Mon Sep 17 00:00:00 2001
 From: notro <notro@tronnes.org>
 Date: Wed, 9 Jul 2014 14:46:08 +0200
 Subject: [PATCH] BCM2708: Add core Device Tree support
index 50a0ed7..725ac70 100644 (file)
@@ -1,4 +1,4 @@
-From f760337032ce3078b0ecfe2ec8420bbdf173151d Mon Sep 17 00:00:00 2001
+From 766357a4f8476461035dcfe2c6b43f532366f533 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Fri, 6 Feb 2015 13:50:57 +0000
 Subject: [PATCH] BCM270x_DT: Add pwr_led, and the required "input" trigger
index 44414e5..3434690 100644 (file)
@@ -1,4 +1,4 @@
-From c19ea76c6206a3e5a897cef2da65d82c6dd76430 Mon Sep 17 00:00:00 2001
+From 65422160b21224e6d26641a4c1fa3082c0281488 Mon Sep 17 00:00:00 2001
 From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
 Date: Mon, 17 Jun 2013 13:32:11 +0300
 Subject: [PATCH] fbdev: add FBIOCOPYAREA ioctl
index f0e7392..8d6337a 100644 (file)
@@ -1,4 +1,4 @@
-From 11db806d75a8958fb706d8a1b4e67818a04d68c7 Mon Sep 17 00:00:00 2001
+From fead9bc9e55df547b54a9cd55d932b209090cfeb Mon Sep 17 00:00:00 2001
 From: Harm Hanemaaijer <fgenfb@yahoo.com>
 Date: Thu, 20 Jun 2013 20:21:39 +0200
 Subject: [PATCH] Speed up console framebuffer imageblit function
index 5c3e064..408ac04 100644 (file)
@@ -1,4 +1,4 @@
-From d387edf492067aa0d298b90829b784f640375e7c Mon Sep 17 00:00:00 2001
+From 5edc95eee5ef69d7bfe03eede0e711e8f196dedc Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Wed, 8 May 2013 11:46:50 +0100
 Subject: [PATCH] enabling the realtime clock 1-wire chip DS1307 and 1-wire on
index ec376d4..a9906f3 100644 (file)
@@ -1,4 +1,4 @@
-From c7850d63ac4cf12c0a70c2014cc2451a5118e717 Mon Sep 17 00:00:00 2001
+From 0d3a6a7484390def36773cb4fee0e16d6b8c45d1 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Wed, 3 Jul 2013 00:54:08 +0100
 Subject: [PATCH] Added Device IDs for August DVB-T 205
index a2eca8a..73c9ede 100644 (file)
@@ -1,4 +1,4 @@
-From d8fe940fffef38e498beaa5bd182647452d98de9 Mon Sep 17 00:00:00 2001
+From c50fe09c78e9b87137e0188139c774bd4f12dcb2 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Wed, 18 Dec 2013 22:16:19 +0000
 Subject: [PATCH] config: Enable CONFIG_MEMCG, but leave it disabled (due to
index e9f3419..444c64e 100644 (file)
@@ -1,4 +1,4 @@
-From 1697df63a0dd1cdc54f304cfb7c4a3a997661f06 Mon Sep 17 00:00:00 2001
+From 56f13ae9d518c5aec8736ccc639f2f5e2c3784ad Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Mon, 14 Jul 2014 22:02:09 +0100
 Subject: [PATCH] hid: Reduce default mouse polling interval to 60Hz
index 3d98c22..43ed3fa 100644 (file)
@@ -1,4 +1,4 @@
-From e7fa4e5d3db9996074a22db9eff4833d33d11fb6 Mon Sep 17 00:00:00 2001
+From 18c740925ca44b8a2f55ac201acf935f9fa97515 Mon Sep 17 00:00:00 2001
 From: Gordon Hollingworth <gordon@raspberrypi.org>
 Date: Tue, 12 May 2015 14:47:56 +0100
 Subject: [PATCH] rpi-ft5406: Add touchscreen driver for pi LCD display
index 2d92f77..a7ce64b 100644 (file)
@@ -1,4 +1,4 @@
-From 77346574b6cd6bfbeac98ac6c711c281a71adebb Mon Sep 17 00:00:00 2001
+From ebd731dd71ec9728a5a87ec1cd695be15828c32c Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Mon, 28 Nov 2016 16:50:04 +0000
 Subject: [PATCH] Improve __copy_to_user and __copy_from_user performance
index 3a86d97..5d73a28 100644 (file)
@@ -1,4 +1,4 @@
-From da2b72916e1fa0824a139bda7f28216640d6727c Mon Sep 17 00:00:00 2001
+From 7e8bb86739df17e38a0ebe6e17b7a9056ab421e9 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil@raspberrypi.org>
 Date: Thu, 25 Jun 2015 12:16:11 +0100
 Subject: [PATCH] gpio-poweroff: Allow it to work on Raspberry Pi
index 77079e0..b5ae3f9 100644 (file)
@@ -1,4 +1,4 @@
-From 91d2e7c60d71cd4450ee3ac68b8fcdfe7f93a1f0 Mon Sep 17 00:00:00 2001
+From 157f59328885549a0f2c1fe35e9ec3aff0f0b52e Mon Sep 17 00:00:00 2001
 From: Phil Elwell <pelwell@users.noreply.github.com>
 Date: Tue, 14 Jul 2015 14:32:47 +0100
 Subject: [PATCH] mfd: Add Raspberry Pi Sense HAT core driver
index 22f8654..107ed28 100644 (file)
@@ -1,4 +1,4 @@
-From c9f07d6d39019ae80e97e0d1cf070a78c4a6c974 Mon Sep 17 00:00:00 2001
+From fe9fdf49ba81e28860e5367ea8bb9c6b1c6a0460 Mon Sep 17 00:00:00 2001
 From: Florian Meier <florian.meier@koalo.de>
 Date: Fri, 22 Nov 2013 19:19:08 +0100
 Subject: [PATCH] ASoC: Add support for HifiBerry DAC
index 0353820..26ae5b3 100644 (file)
@@ -1,4 +1,4 @@
-From fd63dade0da2751e1b4d38a7bc1f70611bf85e31 Mon Sep 17 00:00:00 2001
+From 3a890b43d08fbfe10895f733578f095a6449ba0b Mon Sep 17 00:00:00 2001
 From: Florian Meier <florian.meier@koalo.de>
 Date: Mon, 25 Jan 2016 15:48:59 +0000
 Subject: [PATCH] ASoC: Add support for Rpi-DAC
index 7accb99..1be734b 100644 (file)
@@ -1,4 +1,4 @@
-From c137d8fd4fd6a01ca8afc140cab7d7c3c39f3f33 Mon Sep 17 00:00:00 2001
+From 8432dc7c8a843e7c35d7624adc6653e13dd488a7 Mon Sep 17 00:00:00 2001
 From: Daniel Matuschek <info@crazy-audio.com>
 Date: Wed, 15 Jan 2014 21:41:23 +0100
 Subject: [PATCH] ASoC: wm8804: Implement MCLK configuration options, add 32bit
index d9dc426..5f8477c 100644 (file)
@@ -1,4 +1,4 @@
-From 8a6178b707acd262871cb08791f8d9e7248a4107 Mon Sep 17 00:00:00 2001
+From ded3c4c0c46af840159e4fc79a065d69cbb7b534 Mon Sep 17 00:00:00 2001
 From: Daniel Matuschek <info@crazy-audio.com>
 Date: Wed, 15 Jan 2014 21:42:08 +0100
 Subject: [PATCH] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on
index 483fc6e..08bf856 100644 (file)
@@ -1,4 +1,4 @@
-From db63efa8452156b71aedb5aa1e77182d25bc6906 Mon Sep 17 00:00:00 2001
+From fcfe9087b79176b5d8afd0ecc4c66013866ef239 Mon Sep 17 00:00:00 2001
 From: Gordon Garrity <gordon@iqaudio.com>
 Date: Sat, 8 Mar 2014 16:56:57 +0000
 Subject: [PATCH] Add IQaudIO Sound Card support for Raspberry Pi
index 51d731a..edfb9f5 100644 (file)
@@ -1,4 +1,4 @@
-From bde9a1a68dbc0fe50a899b2178128068482f4ec9 Mon Sep 17 00:00:00 2001
+From 711f7413d72af6328a3958eecd400bd8911af211 Mon Sep 17 00:00:00 2001
 From: popcornmix <popcornmix@gmail.com>
 Date: Mon, 25 Jul 2016 17:06:50 +0100
 Subject: [PATCH] iqaudio-dac: Compile fix - untested
index daccc7c..21d30af 100644 (file)
@@ -1,4 +1,4 @@
-From 728a454670c1c65e518a81122683f6cd1e08e967 Mon Sep 17 00:00:00 2001
+From 9c6b8bd0db7564a2124290e3bc30215906371fa9 Mon Sep 17 00:00:00 2001
 From: Daniel Matuschek <info@crazy-audio.com>
 Date: Mon, 4 Aug 2014 10:06:56 +0200
 Subject: [PATCH] Added support for HiFiBerry DAC+
index fb823d2..9826be5 100644 (file)
@@ -1,4 +1,4 @@
-From a9a8a1127418a342cfd7409d10137cbe4e20b951 Mon Sep 17 00:00:00 2001
+From 0f11b0757d5950ee7a8ba00e49ebefd2c649a6ba Mon Sep 17 00:00:00 2001
 From: Daniel Matuschek <info@crazy-audio.com>
 Date: Mon, 4 Aug 2014 11:09:58 +0200
 Subject: [PATCH] Added driver for HiFiBerry Amp amplifier add-on board
@@ -16,15 +16,19 @@ reported correctly by a non-zero return code.
 HiFiBerry Amp: fix device-tree problems
 
 Some code to load the driver based on device-tree-overlays was missing. This is added by this patch.
+
+hifiberry-amp: Adjust for ALSA object refactoring
+
+See: https://github.com/raspberrypi/linux/issues/1775
 ---
  sound/soc/bcm/Kconfig         |   7 +
  sound/soc/bcm/Makefile        |   2 +
  sound/soc/bcm/hifiberry_amp.c | 129 +++++++++++++++
  sound/soc/codecs/Kconfig      |   4 +
  sound/soc/codecs/Makefile     |   2 +
- sound/soc/codecs/tas5713.c    | 369 ++++++++++++++++++++++++++++++++++++++++++
+ sound/soc/codecs/tas5713.c    | 371 ++++++++++++++++++++++++++++++++++++++++++
  sound/soc/codecs/tas5713.h    | 210 ++++++++++++++++++++++++
- 7 files changed, 723 insertions(+)
+ 7 files changed, 725 insertions(+)
  create mode 100644 sound/soc/bcm/hifiberry_amp.c
  create mode 100644 sound/soc/codecs/tas5713.c
  create mode 100644 sound/soc/codecs/tas5713.h
@@ -47,20 +51,21 @@ Some code to load the driver based on device-tree-overlays was missing. This is
          depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
 --- a/sound/soc/bcm/Makefile
 +++ b/sound/soc/bcm/Makefile
-@@ -12,11 +12,13 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-
+@@ -9,12 +9,14 @@ snd-soc-cygnus-objs := cygnus-pcm.o cygn
+ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o
+ # BCM2708 Machine Support
++snd-soc-hifiberry-amp-objs := hifiberry_amp.o
  snd-soc-hifiberry-dac-objs := hifiberry_dac.o
  snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o
  snd-soc-hifiberry-digi-objs := hifiberry_digi.o
-+snd-soc-hifiberry-amp-objs := hifiberry_amp.o
  snd-soc-rpi-dac-objs := rpi-dac.o
  snd-soc-iqaudio-dac-objs := iqaudio-dac.o
  
++obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o
  obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
  obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
  obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o
-+obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
 --- /dev/null
 +++ b/sound/soc/bcm/hifiberry_amp.c
 @@ -0,0 +1,129 @@
@@ -233,7 +238,7 @@ Some code to load the driver based on device-tree-overlays was missing. This is
  obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o
 --- /dev/null
 +++ b/sound/soc/codecs/tas5713.c
-@@ -0,0 +1,369 @@
+@@ -0,0 +1,371 @@
 +/*
 + * ASoC Driver for TAS5713
 + *
@@ -468,8 +473,10 @@ Some code to load the driver based on device-tree-overlays was missing. This is
 +static struct snd_soc_codec_driver soc_codec_dev_tas5713 = {
 +      .probe = tas5713_probe,
 +      .remove = tas5713_remove,
-+      .controls = tas5713_snd_controls,
-+      .num_controls = ARRAY_SIZE(tas5713_snd_controls),
++      .component_driver = {
++              .controls = tas5713_snd_controls,
++              .num_controls = ARRAY_SIZE(tas5713_snd_controls),
++      },
 +};
 +
 +
diff --git a/target/linux/brcm2708/patches-4.9/0074-Revert-Added-driver-for-HiFiBerry-Amp-amplifier-add-.patch b/target/linux/brcm2708/patches-4.9/0074-Revert-Added-driver-for-HiFiBerry-Amp-amplifier-add-.patch
deleted file mode 100644 (file)
index 4123987..0000000
+++ /dev/null
@@ -1,807 +0,0 @@
-From 321a000ddec470ccbe496e6ae2cdc65286d8f491 Mon Sep 17 00:00:00 2001
-From: popcornmix <popcornmix@gmail.com>
-Date: Mon, 12 Dec 2016 16:26:54 +0000
-Subject: [PATCH] Revert "Added driver for HiFiBerry Amp amplifier add-on
- board"
-
-This reverts commit 3e6b00833d92a50cbcc9922deb6e1bc8fcdbb587.
----
- sound/soc/bcm/Kconfig         |   7 -
- sound/soc/bcm/Makefile        |   2 -
- sound/soc/bcm/hifiberry_amp.c | 129 ---------------
- sound/soc/codecs/Kconfig      |   4 -
- sound/soc/codecs/Makefile     |   2 -
- sound/soc/codecs/tas5713.c    | 369 ------------------------------------------
- sound/soc/codecs/tas5713.h    | 210 ------------------------
- 7 files changed, 723 deletions(-)
- delete mode 100644 sound/soc/bcm/hifiberry_amp.c
- delete mode 100644 sound/soc/codecs/tas5713.c
- delete mode 100644 sound/soc/codecs/tas5713.h
-
---- a/sound/soc/bcm/Kconfig
-+++ b/sound/soc/bcm/Kconfig
-@@ -38,13 +38,6 @@ config SND_BCM2708_SOC_HIFIBERRY_DIGI
-         help
-          Say Y or M if you want to add support for HifiBerry Digi S/PDIF output board.
--config SND_BCM2708_SOC_HIFIBERRY_AMP
--        tristate "Support for the HifiBerry Amp"
--        depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
--        select SND_SOC_TAS5713
--        help
--         Say Y or M if you want to add support for the HifiBerry Amp amplifier board.
--
- config SND_BCM2708_SOC_RPI_DAC
-         tristate "Support for RPi-DAC"
-         depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
---- a/sound/soc/bcm/Makefile
-+++ b/sound/soc/bcm/Makefile
-@@ -12,13 +12,11 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-
- snd-soc-hifiberry-dac-objs := hifiberry_dac.o
- snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o
- snd-soc-hifiberry-digi-objs := hifiberry_digi.o
--snd-soc-hifiberry-amp-objs := hifiberry_amp.o
- snd-soc-rpi-dac-objs := rpi-dac.o
- snd-soc-iqaudio-dac-objs := iqaudio-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o
--obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
---- a/sound/soc/bcm/hifiberry_amp.c
-+++ /dev/null
-@@ -1,129 +0,0 @@
--/*
-- * ASoC Driver for HifiBerry AMP
-- *
-- * Author:    Sebastian Eickhoff <basti.eickhoff@googlemail.com>
-- *            Copyright 2014
-- *
-- * This program is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU General Public License
-- * version 2 as published by the Free Software Foundation.
-- *
-- * This program is distributed in the hope that it will be useful, but
-- * WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-- * General Public License for more details.
-- */
--
--#include <linux/module.h>
--#include <linux/platform_device.h>
--
--#include <sound/core.h>
--#include <sound/pcm.h>
--#include <sound/pcm_params.h>
--#include <sound/soc.h>
--#include <sound/jack.h>
--
--static int snd_rpi_hifiberry_amp_init(struct snd_soc_pcm_runtime *rtd)
--{
--      // ToDo: init of the dsp-registers.
--      return 0;
--}
--
--static int snd_rpi_hifiberry_amp_hw_params( struct snd_pcm_substream *substream,
--                                     struct snd_pcm_hw_params *params )
--{
--      struct snd_soc_pcm_runtime *rtd = substream->private_data;
--      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
--
--      return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);
--}
--
--static struct snd_soc_ops snd_rpi_hifiberry_amp_ops = {
--      .hw_params = snd_rpi_hifiberry_amp_hw_params,
--};
--
--static struct snd_soc_dai_link snd_rpi_hifiberry_amp_dai[] = {
--    {
--              .name                   = "HifiBerry AMP",
--              .stream_name    = "HifiBerry AMP HiFi",
--              .cpu_dai_name   = "bcm2708-i2s.0",
--              .codec_dai_name = "tas5713-hifi",
--              .platform_name  = "bcm2708-i2s.0",
--              .codec_name             = "tas5713.1-001b",
--              .dai_fmt                = SND_SOC_DAIFMT_I2S |
--                                                SND_SOC_DAIFMT_NB_NF |
--                                                SND_SOC_DAIFMT_CBS_CFS,
--              .ops                    = &snd_rpi_hifiberry_amp_ops,
--              .init                   = snd_rpi_hifiberry_amp_init,
--      },
--};
--
--
--static struct snd_soc_card snd_rpi_hifiberry_amp = {
--      .name         = "snd_rpi_hifiberry_amp",
--      .driver_name  = "HifiberryAmp",
--      .owner        = THIS_MODULE,
--      .dai_link     = snd_rpi_hifiberry_amp_dai,
--      .num_links    = ARRAY_SIZE(snd_rpi_hifiberry_amp_dai),
--};
--
--static const struct of_device_id snd_rpi_hifiberry_amp_of_match[] = {
--        { .compatible = "hifiberry,hifiberry-amp", },
--        {},
--};
--MODULE_DEVICE_TABLE(of, snd_rpi_hifiberry_amp_of_match);
--
--
--static int snd_rpi_hifiberry_amp_probe(struct platform_device *pdev)
--{
--      int ret = 0;
--
--      snd_rpi_hifiberry_amp.dev = &pdev->dev;
--
--        if (pdev->dev.of_node) {
--            struct device_node *i2s_node;
--            struct snd_soc_dai_link *dai = &snd_rpi_hifiberry_amp_dai[0];
--            i2s_node = of_parse_phandle(pdev->dev.of_node,
--                                        "i2s-controller", 0);
--
--            if (i2s_node) {
--                dai->cpu_dai_name = NULL;
--                dai->cpu_of_node = i2s_node;
--                dai->platform_name = NULL;
--                dai->platform_of_node = i2s_node;
--            }
--        }
--
--      ret = snd_soc_register_card(&snd_rpi_hifiberry_amp);
--
--      if (ret != 0) {
--              dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);
--      }
--
--      return ret;
--}
--
--
--static int snd_rpi_hifiberry_amp_remove(struct platform_device *pdev)
--{
--      return snd_soc_unregister_card(&snd_rpi_hifiberry_amp);
--}
--
--
--static struct platform_driver snd_rpi_hifiberry_amp_driver = {
--        .driver = {
--                .name   = "snd-hifiberry-amp",
--                .owner  = THIS_MODULE,
--              .of_match_table = snd_rpi_hifiberry_amp_of_match,
--        },
--        .probe          = snd_rpi_hifiberry_amp_probe,
--        .remove         = snd_rpi_hifiberry_amp_remove,
--};
--
--
--module_platform_driver(snd_rpi_hifiberry_amp_driver);
--
--
--MODULE_AUTHOR("Sebastian Eickhoff <basti.eickhoff@googlemail.com>");
--MODULE_DESCRIPTION("ASoC driver for HiFiBerry-AMP");
--MODULE_LICENSE("GPL v2");
---- a/sound/soc/codecs/Kconfig
-+++ b/sound/soc/codecs/Kconfig
-@@ -139,7 +139,6 @@ config SND_SOC_ALL_CODECS
-       select SND_SOC_TFA9879 if I2C
-       select SND_SOC_TLV320AIC23_I2C if I2C
-       select SND_SOC_TLV320AIC23_SPI if SPI_MASTER
--      select SND_SOC_TAS5713 if I2C
-       select SND_SOC_TLV320AIC26 if SPI_MASTER
-       select SND_SOC_TLV320AIC31XX if I2C
-       select SND_SOC_TLV320AIC32X4_I2C if I2C
-@@ -822,9 +821,6 @@ config SND_SOC_TFA9879
-       tristate "NXP Semiconductors TFA9879 amplifier"
-       depends on I2C
--config SND_SOC_TAS5713
--      tristate
--
- config SND_SOC_TLV320AIC23
-       tristate
---- a/sound/soc/codecs/Makefile
-+++ b/sound/soc/codecs/Makefile
-@@ -144,7 +144,6 @@ snd-soc-tas5086-objs := tas5086.o
- snd-soc-tas571x-objs := tas571x.o
- snd-soc-tas5720-objs := tas5720.o
- snd-soc-tfa9879-objs := tfa9879.o
--snd-soc-tas5713-objs := tas5713.o
- snd-soc-tlv320aic23-objs := tlv320aic23.o
- snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o
- snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o
-@@ -367,7 +366,6 @@ obj-$(CONFIG_SND_SOC_TAS5086)      += snd-soc
- obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o
- obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o
- obj-$(CONFIG_SND_SOC_TFA9879) += snd-soc-tfa9879.o
--obj-$(CONFIG_SND_SOC_TAS5713) += snd-soc-tas5713.o
- obj-$(CONFIG_SND_SOC_TLV320AIC23)     += snd-soc-tlv320aic23.o
- obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o
- obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o
---- a/sound/soc/codecs/tas5713.c
-+++ /dev/null
-@@ -1,369 +0,0 @@
--/*
-- * ASoC Driver for TAS5713
-- *
-- * Author:    Sebastian Eickhoff <basti.eickhoff@googlemail.com>
-- *            Copyright 2014
-- *
-- * This program is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU General Public License
-- * version 2 as published by the Free Software Foundation.
-- *
-- * This program is distributed in the hope that it will be useful, but
-- * WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-- * General Public License for more details.
-- */
--
--#include <linux/module.h>
--#include <linux/moduleparam.h>
--#include <linux/init.h>
--#include <linux/delay.h>
--#include <linux/pm.h>
--#include <linux/i2c.h>
--#include <linux/of_device.h>
--#include <linux/spi/spi.h>
--#include <linux/regmap.h>
--#include <linux/regulator/consumer.h>
--#include <linux/slab.h>
--#include <sound/core.h>
--#include <sound/pcm.h>
--#include <sound/pcm_params.h>
--#include <sound/soc.h>
--#include <sound/initval.h>
--#include <sound/tlv.h>
--
--#include <linux/kernel.h>
--#include <linux/string.h>
--#include <linux/fs.h>
--#include <asm/uaccess.h>
--
--#include "tas5713.h"
--
--
--static struct i2c_client *i2c;
--
--struct tas5713_priv {
--      struct regmap *regmap;
--      int mclk_div;
--      struct snd_soc_codec *codec;
--};
--
--static struct tas5713_priv *priv_data;
--
--
--
--
--/*
-- *    _   _    ___   _      ___         _           _
-- *   /_\ | |  / __| /_\    / __|___ _ _| |_ _ _ ___| |___
-- *  / _ \| |__\__ \/ _ \  | (__/ _ \ ' \  _| '_/ _ \ (_-<
-- * /_/ \_\____|___/_/ \_\  \___\___/_||_\__|_| \___/_/__/
-- *
-- */
--
--static const DECLARE_TLV_DB_SCALE(tas5713_vol_tlv, -10000, 50, 1);
--
--
--static const struct snd_kcontrol_new tas5713_snd_controls[] = {
--      SOC_SINGLE_TLV  ("Master"    , TAS5713_VOL_MASTER, 0, 248, 1, tas5713_vol_tlv),
--      SOC_DOUBLE_R_TLV("Channels"  , TAS5713_VOL_CH1, TAS5713_VOL_CH2, 0, 248, 1, tas5713_vol_tlv)
--};
--
--
--
--
--/*
-- *  __  __         _    _            ___      _
-- * |  \/  |__ _ __| |_ (_)_ _  ___  |   \ _ _(_)_ _____ _ _
-- * | |\/| / _` / _| ' \| | ' \/ -_) | |) | '_| \ V / -_) '_|
-- * |_|  |_\__,_\__|_||_|_|_||_\___| |___/|_| |_|\_/\___|_|
-- *
-- */
--
--static int tas5713_hw_params(struct snd_pcm_substream *substream,
--                          struct snd_pcm_hw_params *params,
--                          struct snd_soc_dai *dai)
--{
--      u16 blen = 0x00;
--
--      struct snd_soc_codec *codec;
--      codec = dai->codec;
--      priv_data->codec = dai->codec;
--
--      switch (params_format(params)) {
--      case SNDRV_PCM_FORMAT_S16_LE:
--              blen = 0x03;
--              break;
--      case SNDRV_PCM_FORMAT_S20_3LE:
--              blen = 0x1;
--              break;
--      case SNDRV_PCM_FORMAT_S24_LE:
--              blen = 0x04;
--              break;
--      case SNDRV_PCM_FORMAT_S32_LE:
--              blen = 0x05;
--              break;
--      default:
--              dev_err(dai->dev, "Unsupported word length: %u\n",
--                      params_format(params));
--              return -EINVAL;
--      }
--
--      // set word length
--      snd_soc_update_bits(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x7, blen);
--
--      return 0;
--}
--
--
--static int tas5713_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
--{
--      unsigned int val = 0;
--
--      struct tas5713_priv *tas5713;
--      struct snd_soc_codec *codec = dai->codec;
--      tas5713 = snd_soc_codec_get_drvdata(codec);
--
--      if (mute) {
--              val = TAS5713_SOFT_MUTE_ALL;
--      }
--
--      return regmap_write(tas5713->regmap, TAS5713_SOFT_MUTE, val);
--}
--
--
--static const struct snd_soc_dai_ops tas5713_dai_ops = {
--      .hw_params              = tas5713_hw_params,
--      .mute_stream    = tas5713_mute_stream,
--};
--
--
--static struct snd_soc_dai_driver tas5713_dai = {
--      .name           = "tas5713-hifi",
--      .playback       = {
--              .stream_name    = "Playback",
--              .channels_min   = 2,
--              .channels_max   = 2,
--              .rates              = SNDRV_PCM_RATE_8000_48000,
--              .formats            = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE ),
--      },
--      .ops        = &tas5713_dai_ops,
--};
--
--
--
--
--/*
-- *   ___         _          ___      _
-- *  / __|___  __| |___ __  |   \ _ _(_)_ _____ _ _
-- * | (__/ _ \/ _` / -_) _| | |) | '_| \ V / -_) '_|
-- *  \___\___/\__,_\___\__| |___/|_| |_|\_/\___|_|
-- *
-- */
--
--static int tas5713_remove(struct snd_soc_codec *codec)
--{
--      struct tas5713_priv *tas5713;
--
--      tas5713 = snd_soc_codec_get_drvdata(codec);
--
--      return 0;
--}
--
--
--static int tas5713_probe(struct snd_soc_codec *codec)
--{
--      struct tas5713_priv *tas5713;
--      int i, ret;
--
--      i2c = container_of(codec->dev, struct i2c_client, dev);
--
--      tas5713 = snd_soc_codec_get_drvdata(codec);
--
--      // Reset error
--      ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00);
--      if (ret < 0) return ret;
--
--      // Trim oscillator
--      ret = snd_soc_write(codec, TAS5713_OSC_TRIM, 0x00);
--      if (ret < 0) return ret;
--      msleep(1000);
--
--      // Reset error
--      ret = snd_soc_write(codec, TAS5713_ERROR_STATUS, 0x00);
--      if (ret < 0) return ret;
--
--      // Clock mode: 44/48kHz, MCLK=64xfs
--      ret = snd_soc_write(codec, TAS5713_CLOCK_CTRL, 0x60);
--      if (ret < 0) return ret;
--
--      // I2S 24bit
--      ret = snd_soc_write(codec, TAS5713_SERIAL_DATA_INTERFACE, 0x05);
--      if (ret < 0) return ret;
--
--      // Unmute
--      ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00);
--      if (ret < 0) return ret;
--      ret = snd_soc_write(codec, TAS5713_SOFT_MUTE, 0x00);
--      if (ret < 0) return ret;
--
--      // Set volume to 0db
--      ret = snd_soc_write(codec, TAS5713_VOL_MASTER, 0x00);
--      if (ret < 0) return ret;
--
--      // Now start programming the default initialization sequence
--      for (i = 0; i < ARRAY_SIZE(tas5713_init_sequence); ++i) {
--              ret = i2c_master_send(i2c,
--                                   tas5713_init_sequence[i].data,
--                                   tas5713_init_sequence[i].size);
--              if (ret < 0) {
--                      printk(KERN_INFO "TAS5713 CODEC PROBE: InitSeq returns: %d\n", ret);
--              }
--      }
--
--      // Unmute
--      ret = snd_soc_write(codec, TAS5713_SYSTEM_CTRL2, 0x00);
--      if (ret < 0) return ret;
--
--      return 0;
--}
--
--
--static struct snd_soc_codec_driver soc_codec_dev_tas5713 = {
--      .probe = tas5713_probe,
--      .remove = tas5713_remove,
--      .controls = tas5713_snd_controls,
--      .num_controls = ARRAY_SIZE(tas5713_snd_controls),
--};
--
--
--
--
--/*
-- *   ___ ___ ___   ___      _
-- *  |_ _|_  ) __| |   \ _ _(_)_ _____ _ _
-- *   | | / / (__  | |) | '_| \ V / -_) '_|
-- *  |___/___\___| |___/|_| |_|\_/\___|_|
-- *
-- */
--
--static const struct reg_default tas5713_reg_defaults[] = {
--      { 0x07 ,0x80 },     // R7  - VOL_MASTER    - -40dB
--      { 0x08 ,  30 },     // R8  - VOL_CH1       -   0dB
--      { 0x09 ,  30 },     // R9  - VOL_CH2       -   0dB
--      { 0x0A ,0x80 },     // R10 - VOL_HEADPHONE - -40dB
--};
--
--
--static bool tas5713_reg_volatile(struct device *dev, unsigned int reg)
--{
--      switch (reg) {
--              case TAS5713_DEVICE_ID:
--              case TAS5713_ERROR_STATUS:
--                      return true;
--      default:
--                      return false;
--      }
--}
--
--
--static const struct of_device_id tas5713_of_match[] = {
--      { .compatible = "ti,tas5713", },
--      { }
--};
--MODULE_DEVICE_TABLE(of, tas5713_of_match);
--
--
--static struct regmap_config tas5713_regmap_config = {
--      .reg_bits = 8,
--      .val_bits = 8,
--
--      .max_register = TAS5713_MAX_REGISTER,
--      .volatile_reg = tas5713_reg_volatile,
--
--      .cache_type = REGCACHE_RBTREE,
--      .reg_defaults = tas5713_reg_defaults,
--      .num_reg_defaults = ARRAY_SIZE(tas5713_reg_defaults),
--};
--
--
--static int tas5713_i2c_probe(struct i2c_client *i2c,
--                          const struct i2c_device_id *id)
--{
--      int ret;
--
--      priv_data = devm_kzalloc(&i2c->dev, sizeof *priv_data, GFP_KERNEL);
--      if (!priv_data)
--              return -ENOMEM;
--
--      priv_data->regmap = devm_regmap_init_i2c(i2c, &tas5713_regmap_config);
--      if (IS_ERR(priv_data->regmap)) {
--              ret = PTR_ERR(priv_data->regmap);
--              return ret;
--      }
--
--      i2c_set_clientdata(i2c, priv_data);
--
--      ret = snd_soc_register_codec(&i2c->dev,
--                                   &soc_codec_dev_tas5713, &tas5713_dai, 1);
--
--      return ret;
--}
--
--
--static int tas5713_i2c_remove(struct i2c_client *i2c)
--{
--      snd_soc_unregister_codec(&i2c->dev);
--      i2c_set_clientdata(i2c, NULL);
--
--      kfree(priv_data);
--
--      return 0;
--}
--
--
--static const struct i2c_device_id tas5713_i2c_id[] = {
--      { "tas5713", 0 },
--      { }
--};
--
--MODULE_DEVICE_TABLE(i2c, tas5713_i2c_id);
--
--
--static struct i2c_driver tas5713_i2c_driver = {
--      .driver = {
--              .name = "tas5713",
--              .owner = THIS_MODULE,
--              .of_match_table = tas5713_of_match,
--      },
--      .probe = tas5713_i2c_probe,
--      .remove = tas5713_i2c_remove,
--      .id_table = tas5713_i2c_id
--};
--
--
--static int __init tas5713_modinit(void)
--{
--      int ret = 0;
--
--      ret = i2c_add_driver(&tas5713_i2c_driver);
--      if (ret) {
--              printk(KERN_ERR "Failed to register tas5713 I2C driver: %d\n",
--                     ret);
--      }
--
--      return ret;
--}
--module_init(tas5713_modinit);
--
--
--static void __exit tas5713_exit(void)
--{
--      i2c_del_driver(&tas5713_i2c_driver);
--}
--module_exit(tas5713_exit);
--
--
--MODULE_AUTHOR("Sebastian Eickhoff <basti.eickhoff@googlemail.com>");
--MODULE_DESCRIPTION("ASoC driver for TAS5713");
--MODULE_LICENSE("GPL v2");
---- a/sound/soc/codecs/tas5713.h
-+++ /dev/null
-@@ -1,210 +0,0 @@
--/*
-- * ASoC Driver for TAS5713
-- *
-- * Author:      Sebastian Eickhoff <basti.eickhoff@googlemail.com>
-- *              Copyright 2014
-- *
-- * This program is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU General Public License
-- * version 2 as published by the Free Software Foundation.
-- *
-- * This program is distributed in the hope that it will be useful, but
-- * WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-- * General Public License for more details.
-- */
--
--#ifndef _TAS5713_H
--#define _TAS5713_H
--
--
--// TAS5713 I2C-bus register addresses
--
--#define TAS5713_CLOCK_CTRL              0x00
--#define TAS5713_DEVICE_ID               0x01
--#define TAS5713_ERROR_STATUS            0x02
--#define TAS5713_SYSTEM_CTRL1            0x03
--#define TAS5713_SERIAL_DATA_INTERFACE   0x04
--#define TAS5713_SYSTEM_CTRL2            0x05
--#define TAS5713_SOFT_MUTE               0x06
--#define TAS5713_VOL_MASTER              0x07
--#define TAS5713_VOL_CH1                 0x08
--#define TAS5713_VOL_CH2                 0x09
--#define TAS5713_VOL_HEADPHONE           0x0A
--#define TAS5713_VOL_CONFIG              0x0E
--#define TAS5713_MODULATION_LIMIT        0x10
--#define TAS5713_IC_DLY_CH1              0x11
--#define TAS5713_IC_DLY_CH2              0x12
--#define TAS5713_IC_DLY_CH3              0x13
--#define TAS5713_IC_DLY_CH4              0x14
--
--#define TAS5713_START_STOP_PERIOD       0x1A
--#define TAS5713_OSC_TRIM                0x1B
--#define TAS5713_BKND_ERR                0x1C
--
--#define TAS5713_INPUT_MUX               0x20
--#define TAS5713_SRC_SELECT_CH4          0x21
--#define TAS5713_PWM_MUX                 0x25
--
--#define TAS5713_CH1_BQ0                 0x29
--#define TAS5713_CH1_BQ1                 0x2A
--#define TAS5713_CH1_BQ2                 0x2B
--#define TAS5713_CH1_BQ3                 0x2C
--#define TAS5713_CH1_BQ4                 0x2D
--#define TAS5713_CH1_BQ5                 0x2E
--#define TAS5713_CH1_BQ6                 0x2F
--#define TAS5713_CH1_BQ7                 0x58
--#define TAS5713_CH1_BQ8                 0x59
--
--#define TAS5713_CH2_BQ0                 0x30
--#define TAS5713_CH2_BQ1                 0x31
--#define TAS5713_CH2_BQ2                 0x32
--#define TAS5713_CH2_BQ3                 0x33
--#define TAS5713_CH2_BQ4                 0x34
--#define TAS5713_CH2_BQ5                 0x35
--#define TAS5713_CH2_BQ6                 0x36
--#define TAS5713_CH2_BQ7                 0x5C
--#define TAS5713_CH2_BQ8                 0x5D
--
--#define TAS5713_CH4_BQ0                 0x5A
--#define TAS5713_CH4_BQ1                 0x5B
--#define TAS5713_CH3_BQ0                 0x5E
--#define TAS5713_CH3_BQ1                 0x5F
--
--#define TAS5713_DRC1_SOFTENING_FILTER_ALPHA_OMEGA       0x3B
--#define TAS5713_DRC1_ATTACK_RELEASE_RATE                0x3C
--#define TAS5713_DRC2_SOFTENING_FILTER_ALPHA_OMEGA       0x3E
--#define TAS5713_DRC2_ATTACK_RELEASE_RATE                0x3F
--#define TAS5713_DRC1_ATTACK_RELEASE_THRES               0x40
--#define TAS5713_DRC2_ATTACK_RELEASE_THRES               0x43
--#define TAS5713_DRC_CTRL                                0x46
--
--#define TAS5713_BANK_SW_CTRL            0x50
--#define TAS5713_CH1_OUTPUT_MIXER        0x51
--#define TAS5713_CH2_OUTPUT_MIXER        0x52
--#define TAS5713_CH1_INPUT_MIXER         0x53
--#define TAS5713_CH2_INPUT_MIXER         0x54
--#define TAS5713_OUTPUT_POST_SCALE       0x56
--#define TAS5713_OUTPUT_PRESCALE         0x57
--
--#define TAS5713_IDF_POST_SCALE          0x62
--
--#define TAS5713_CH1_INLINE_MIXER        0x70
--#define TAS5713_CH1_INLINE_DRC_EN_MIXER 0x71
--#define TAS5713_CH1_R_CHANNEL_MIXER     0x72
--#define TAS5713_CH1_L_CHANNEL_MIXER     0x73
--#define TAS5713_CH2_INLINE_MIXER        0x74
--#define TAS5713_CH2_INLINE_DRC_EN_MIXER 0x75
--#define TAS5713_CH2_L_CHANNEL_MIXER     0x76
--#define TAS5713_CH2_R_CHANNEL_MIXER     0x77
--
--#define TAS5713_UPDATE_DEV_ADDR_KEY     0xF8
--#define TAS5713_UPDATE_DEV_ADDR_REG     0xF9
--
--#define TAS5713_REGISTER_COUNT          0x46
--#define TAS5713_MAX_REGISTER            0xF9
--
--
--// Bitmasks for registers
--#define TAS5713_SOFT_MUTE_ALL           0x07
--
--
--
--struct tas5713_init_command {
--        const int size;
--        const char *const data;
--};
--
--static const struct tas5713_init_command tas5713_init_sequence[] = {
--
--        // Trim oscillator
--    { .size = 2,  .data = "\x1B\x00" },
--    // System control register 1 (0x03): block DC
--    { .size = 2,  .data = "\x03\x80" },
--    // Mute everything
--    { .size = 2,  .data = "\x05\x40" },
--    // Modulation limit register (0x10): 97.7%
--    { .size = 2,  .data = "\x10\x02" },
--    // Interchannel delay registers
--    // (0x11, 0x12, 0x13, and 0x14): BD mode
--    { .size = 2,  .data = "\x11\xB8" },
--    { .size = 2,  .data = "\x12\x60" },
--    { .size = 2,  .data = "\x13\xA0" },
--    { .size = 2,  .data = "\x14\x48" },
--    // PWM shutdown group register (0x19): no shutdown
--    { .size = 2,  .data = "\x19\x00" },
--    // Input multiplexer register (0x20): BD mode
--    { .size = 2,  .data = "\x20\x00\x89\x77\x72" },
--    // PWM output mux register (0x25)
--    // Channel 1 --> OUTA, channel 1 neg --> OUTB
--    // Channel 2 --> OUTC, channel 2 neg --> OUTD
--    { .size = 5,  .data = "\x25\x01\x02\x13\x45" },
--    // DRC control (0x46): DRC off
--    { .size = 5,  .data = "\x46\x00\x00\x00\x00" },
--    // BKND_ERR register (0x1C): 299ms reset period
--    { .size = 2,  .data = "\x1C\x07" },
--    // Mute channel 3
--    { .size = 2,  .data = "\x0A\xFF" },
--    // Volume configuration register (0x0E): volume slew 512 steps
--    { .size = 2,  .data = "\x0E\x90" },
--    // Clock control register (0x00): 44/48kHz, MCLK=64xfs
--    { .size = 2,  .data = "\x00\x60" },
--    // Bank switch and eq control (0x50): no bank switching
--    { .size = 5,  .data = "\x50\x00\x00\x00\x00" },
--    // Volume registers (0x07, 0x08, 0x09, 0x0A)
--    { .size = 2,  .data = "\x07\x20" },
--    { .size = 2,  .data = "\x08\x30" },
--    { .size = 2,  .data = "\x09\x30" },
--    { .size = 2,  .data = "\x0A\xFF" },
--    // 0x72, 0x73, 0x76, 0x77 input mixer:
--    // no intermix between channels
--    { .size = 5,  .data = "\x72\x00\x00\x00\x00" },
--    { .size = 5,  .data = "\x73\x00\x80\x00\x00" },
--    { .size = 5,  .data = "\x76\x00\x00\x00\x00" },
--    { .size = 5,  .data = "\x77\x00\x80\x00\x00" },
--    // 0x70, 0x71, 0x74, 0x75 inline DRC mixer:
--    // no inline DRC inmix
--    { .size = 5,  .data = "\x70\x00\x80\x00\x00" },
--    { .size = 5,  .data = "\x71\x00\x00\x00\x00" },
--    { .size = 5,  .data = "\x74\x00\x80\x00\x00" },
--    { .size = 5,  .data = "\x75\x00\x00\x00\x00" },
--    // 0x56, 0x57 Output scale
--    { .size = 5,  .data = "\x56\x00\x80\x00\x00" },
--    { .size = 5,  .data = "\x57\x00\x02\x00\x00" },
--    // 0x3B, 0x3c
--    { .size = 9,  .data = "\x3B\x00\x08\x00\x00\x00\x78\x00\x00" },
--    { .size = 9,  .data = "\x3C\x00\x00\x01\x00\xFF\xFF\xFF\x00" },
--    { .size = 9,  .data = "\x3E\x00\x08\x00\x00\x00\x78\x00\x00" },
--    { .size = 9,  .data = "\x3F\x00\x00\x01\x00\xFF\xFF\xFF\x00" },
--    { .size = 9,  .data = "\x40\x00\x00\x01\x00\xFF\xFF\xFF\x00" },
--    { .size = 9,  .data = "\x43\x00\x00\x01\x00\xFF\xFF\xFF\x00" },
--    // 0x51, 0x52: output mixer
--    { .size = 9,  .data = "\x51\x00\x80\x00\x00\x00\x00\x00\x00" },
--    { .size = 9,  .data = "\x52\x00\x80\x00\x00\x00\x00\x00\x00" },
--    // PEQ defaults
--    { .size = 21,  .data = "\x29\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x2A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x2B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x2C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x2D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x2E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x2F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x30\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x31\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x32\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x33\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x34\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x35\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x36\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x58\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x59\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x5C\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x5D\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x5E\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x5F\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x5A\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--    { .size = 21,  .data = "\x5B\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" },
--};
--
--
--#endif  /* _TAS5713_H */
diff --git a/target/linux/brcm2708/patches-4.9/0074-Update-ds1307-driver-for-device-tree-support.patch b/target/linux/brcm2708/patches-4.9/0074-Update-ds1307-driver-for-device-tree-support.patch
new file mode 100644 (file)
index 0000000..d4f7e76
--- /dev/null
@@ -0,0 +1,27 @@
+From b3ff56f28a9531048812a51ded7c16a952d1ead4 Mon Sep 17 00:00:00 2001
+From: Ryan Coe <bluemrp9@gmail.com>
+Date: Sat, 31 Jan 2015 18:25:49 -0700
+Subject: [PATCH] Update ds1307 driver for device-tree support
+
+Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
+---
+ drivers/rtc/rtc-ds1307.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/rtc/rtc-ds1307.c
++++ b/drivers/rtc/rtc-ds1307.c
+@@ -1675,6 +1675,14 @@ static int ds1307_remove(struct i2c_clie
+       return 0;
+ }
++#ifdef CONFIG_OF
++static const struct of_device_id ds1307_of_match[] = {
++      { .compatible = "maxim,ds1307" },
++      { }
++};
++MODULE_DEVICE_TABLE(of, ds1307_of_match);
++#endif
++
+ static struct i2c_driver ds1307_driver = {
+       .driver = {
+               .name   = "rtc-ds1307",
diff --git a/target/linux/brcm2708/patches-4.9/0075-Add-driver-for-rpi-proto.patch b/target/linux/brcm2708/patches-4.9/0075-Add-driver-for-rpi-proto.patch
new file mode 100644 (file)
index 0000000..b8db1d5
--- /dev/null
@@ -0,0 +1,211 @@
+From b351d2ffe294c9d5e8cde9caa3a94017ecec81d9 Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbrodkorb@conet.de>
+Date: Wed, 25 Mar 2015 09:26:17 +0100
+Subject: [PATCH] Add driver for rpi-proto
+
+Forward port of 3.10.x driver from https://github.com/koalo
+We are using a custom board and would like to use rpi 3.18.x
+kernel. Patch works fine for our embedded system.
+
+URL to the audio chip:
+http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto/
+
+Playback tested with devicetree enabled.
+
+Signed-off-by: Waldemar Brodkorb <wbrodkorb@conet.de>
+---
+ sound/soc/bcm/Kconfig     |   7 +++
+ sound/soc/bcm/Makefile    |   2 +
+ sound/soc/bcm/rpi-proto.c | 154 ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 163 insertions(+)
+ create mode 100644 sound/soc/bcm/rpi-proto.c
+
+--- a/sound/soc/bcm/Kconfig
++++ b/sound/soc/bcm/Kconfig
+@@ -52,6 +52,13 @@ config SND_BCM2708_SOC_RPI_DAC
+         help
+          Say Y or M if you want to add support for RPi-DAC.
++config SND_BCM2708_SOC_RPI_PROTO
++      tristate "Support for Rpi-PROTO"
++      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
++      select SND_SOC_WM8731
++      help
++        Say Y or M if you want to add support for Audio Codec Board PROTO (WM8731).
++
+ config SND_BCM2708_SOC_IQAUDIO_DAC
+       tristate "Support for IQaudIO-DAC"
+       depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
+--- a/sound/soc/bcm/Makefile
++++ b/sound/soc/bcm/Makefile
+@@ -14,6 +14,7 @@ snd-soc-hifiberry-dac-objs := hifiberry_
+ snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o
+ snd-soc-hifiberry-digi-objs := hifiberry_digi.o
+ snd-soc-rpi-dac-objs := rpi-dac.o
++snd-soc-rpi-proto-objs := rpi-proto.o
+ snd-soc-iqaudio-dac-objs := iqaudio-dac.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o
+@@ -21,4 +22,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_D
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o
+ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
++obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
+ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
+--- /dev/null
++++ b/sound/soc/bcm/rpi-proto.c
+@@ -0,0 +1,154 @@
++/*
++ * ASoC driver for PROTO AudioCODEC (with a WM8731)
++ * connected to a Raspberry Pi
++ *
++ * Author:      Florian Meier, <koalo@koalo.de>
++ *          Copyright 2013
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/soc.h>
++#include <sound/jack.h>
++
++#include "../codecs/wm8731.h"
++
++static const unsigned int wm8731_rates_12288000[] = {
++      8000, 32000, 48000, 96000,
++};
++
++static struct snd_pcm_hw_constraint_list wm8731_constraints_12288000 = {
++      .list = wm8731_rates_12288000,
++      .count = ARRAY_SIZE(wm8731_rates_12288000),
++};
++
++static int snd_rpi_proto_startup(struct snd_pcm_substream *substream)
++{
++      /* Setup constraints, because there is a 12.288 MHz XTAL on the board */
++      snd_pcm_hw_constraint_list(substream->runtime, 0,
++                              SNDRV_PCM_HW_PARAM_RATE,
++                              &wm8731_constraints_12288000);
++      return 0;
++}
++
++static int snd_rpi_proto_hw_params(struct snd_pcm_substream *substream,
++                                     struct snd_pcm_hw_params *params)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++      struct snd_soc_dai *codec_dai = rtd->codec_dai;
++      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++      int sysclk = 12288000; /* This is fixed on this board */
++
++      /* Set proto bclk */
++      int ret = snd_soc_dai_set_bclk_ratio(cpu_dai,32*2);
++      if (ret < 0){
++              dev_err(codec->dev,
++                              "Failed to set BCLK ratio %d\n", ret);
++              return ret;
++      }
++
++      /* Set proto sysclk */
++      ret = snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK_XTAL,
++                      sysclk, SND_SOC_CLOCK_IN);
++      if (ret < 0) {
++              dev_err(codec->dev,
++                              "Failed to set WM8731 SYSCLK: %d\n", ret);
++              return ret;
++      }
++
++      return 0;
++}
++
++/* machine stream operations */
++static struct snd_soc_ops snd_rpi_proto_ops = {
++      .startup = snd_rpi_proto_startup,
++      .hw_params = snd_rpi_proto_hw_params,
++};
++
++static struct snd_soc_dai_link snd_rpi_proto_dai[] = {
++{
++      .name           = "WM8731",
++      .stream_name    = "WM8731 HiFi",
++      .cpu_dai_name   = "bcm2708-i2s.0",
++      .codec_dai_name = "wm8731-hifi",
++      .platform_name  = "bcm2708-i2s.0",
++      .codec_name     = "wm8731.1-001a",
++      .dai_fmt        = SND_SOC_DAIFMT_I2S
++                              | SND_SOC_DAIFMT_NB_NF
++                              | SND_SOC_DAIFMT_CBM_CFM,
++      .ops            = &snd_rpi_proto_ops,
++},
++};
++
++/* audio machine driver */
++static struct snd_soc_card snd_rpi_proto = {
++      .name           = "snd_rpi_proto",
++      .owner          = THIS_MODULE,
++      .dai_link       = snd_rpi_proto_dai,
++      .num_links      = ARRAY_SIZE(snd_rpi_proto_dai),
++};
++
++static int snd_rpi_proto_probe(struct platform_device *pdev)
++{
++      int ret = 0;
++
++      snd_rpi_proto.dev = &pdev->dev;
++
++      if (pdev->dev.of_node) {
++              struct device_node *i2s_node;
++              struct snd_soc_dai_link *dai = &snd_rpi_proto_dai[0];
++              i2s_node = of_parse_phandle(pdev->dev.of_node,
++                                          "i2s-controller", 0);
++
++              if (i2s_node) {
++                      dai->cpu_dai_name = NULL;
++                      dai->cpu_of_node = i2s_node;
++                      dai->platform_name = NULL;
++                      dai->platform_of_node = i2s_node;
++              }
++      }
++
++      ret = snd_soc_register_card(&snd_rpi_proto);
++      if (ret) {
++              dev_err(&pdev->dev,
++                              "snd_soc_register_card() failed: %d\n", ret);
++      }
++
++      return ret;
++}
++
++
++static int snd_rpi_proto_remove(struct platform_device *pdev)
++{
++      return snd_soc_unregister_card(&snd_rpi_proto);
++}
++
++static const struct of_device_id snd_rpi_proto_of_match[] = {
++      { .compatible = "rpi,rpi-proto", },
++      {},
++};
++MODULE_DEVICE_TABLE(of, snd_rpi_proto_of_match);
++
++static struct platform_driver snd_rpi_proto_driver = {
++      .driver = {
++              .name   = "snd-rpi-proto",
++              .owner  = THIS_MODULE,
++              .of_match_table = snd_rpi_proto_of_match,
++      },
++      .probe    = snd_rpi_proto_probe,
++      .remove  = snd_rpi_proto_remove,
++};
++
++module_platform_driver(snd_rpi_proto_driver);
++
++MODULE_AUTHOR("Florian Meier");
++MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)");
++MODULE_LICENSE("GPL");
diff --git a/target/linux/brcm2708/patches-4.9/0075-Update-ds1307-driver-for-device-tree-support.patch b/target/linux/brcm2708/patches-4.9/0075-Update-ds1307-driver-for-device-tree-support.patch
deleted file mode 100644 (file)
index 1dfed15..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From 682c095597876ff7d669f92dc2a0f1f49526444c Mon Sep 17 00:00:00 2001
-From: Ryan Coe <bluemrp9@gmail.com>
-Date: Sat, 31 Jan 2015 18:25:49 -0700
-Subject: [PATCH] Update ds1307 driver for device-tree support
-
-Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
----
- drivers/rtc/rtc-ds1307.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/drivers/rtc/rtc-ds1307.c
-+++ b/drivers/rtc/rtc-ds1307.c
-@@ -1675,6 +1675,14 @@ static int ds1307_remove(struct i2c_clie
-       return 0;
- }
-+#ifdef CONFIG_OF
-+static const struct of_device_id ds1307_of_match[] = {
-+      { .compatible = "maxim,ds1307" },
-+      { }
-+};
-+MODULE_DEVICE_TABLE(of, ds1307_of_match);
-+#endif
-+
- static struct i2c_driver ds1307_driver = {
-       .driver = {
-               .name   = "rtc-ds1307",
diff --git a/target/linux/brcm2708/patches-4.9/0076-Add-driver-for-rpi-proto.patch b/target/linux/brcm2708/patches-4.9/0076-Add-driver-for-rpi-proto.patch
deleted file mode 100644 (file)
index b23ff22..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-From 001f8b8dc231bf3e20fd6802e2664788891ed8c4 Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbrodkorb@conet.de>
-Date: Wed, 25 Mar 2015 09:26:17 +0100
-Subject: [PATCH] Add driver for rpi-proto
-
-Forward port of 3.10.x driver from https://github.com/koalo
-We are using a custom board and would like to use rpi 3.18.x
-kernel. Patch works fine for our embedded system.
-
-URL to the audio chip:
-http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto/
-
-Playback tested with devicetree enabled.
-
-Signed-off-by: Waldemar Brodkorb <wbrodkorb@conet.de>
----
- sound/soc/bcm/Kconfig     |   7 +++
- sound/soc/bcm/Makefile    |   2 +
- sound/soc/bcm/rpi-proto.c | 154 ++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 163 insertions(+)
- create mode 100644 sound/soc/bcm/rpi-proto.c
-
---- a/sound/soc/bcm/Kconfig
-+++ b/sound/soc/bcm/Kconfig
-@@ -45,6 +45,13 @@ config SND_BCM2708_SOC_RPI_DAC
-         help
-          Say Y or M if you want to add support for RPi-DAC.
-+config SND_BCM2708_SOC_RPI_PROTO
-+      tristate "Support for Rpi-PROTO"
-+      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
-+      select SND_SOC_WM8731
-+      help
-+        Say Y or M if you want to add support for Audio Codec Board PROTO (WM8731).
-+
- config SND_BCM2708_SOC_IQAUDIO_DAC
-       tristate "Support for IQaudIO-DAC"
-       depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
---- a/sound/soc/bcm/Makefile
-+++ b/sound/soc/bcm/Makefile
-@@ -13,10 +13,12 @@ snd-soc-hifiberry-dac-objs := hifiberry_
- snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o
- snd-soc-hifiberry-digi-objs := hifiberry_digi.o
- snd-soc-rpi-dac-objs := rpi-dac.o
-+snd-soc-rpi-proto-objs := rpi-proto.o
- snd-soc-iqaudio-dac-objs := iqaudio-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
-+obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
- obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
---- /dev/null
-+++ b/sound/soc/bcm/rpi-proto.c
-@@ -0,0 +1,154 @@
-+/*
-+ * ASoC driver for PROTO AudioCODEC (with a WM8731)
-+ * connected to a Raspberry Pi
-+ *
-+ * Author:      Florian Meier, <koalo@koalo.de>
-+ *          Copyright 2013
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+
-+#include <sound/core.h>
-+#include <sound/pcm.h>
-+#include <sound/soc.h>
-+#include <sound/jack.h>
-+
-+#include "../codecs/wm8731.h"
-+
-+static const unsigned int wm8731_rates_12288000[] = {
-+      8000, 32000, 48000, 96000,
-+};
-+
-+static struct snd_pcm_hw_constraint_list wm8731_constraints_12288000 = {
-+      .list = wm8731_rates_12288000,
-+      .count = ARRAY_SIZE(wm8731_rates_12288000),
-+};
-+
-+static int snd_rpi_proto_startup(struct snd_pcm_substream *substream)
-+{
-+      /* Setup constraints, because there is a 12.288 MHz XTAL on the board */
-+      snd_pcm_hw_constraint_list(substream->runtime, 0,
-+                              SNDRV_PCM_HW_PARAM_RATE,
-+                              &wm8731_constraints_12288000);
-+      return 0;
-+}
-+
-+static int snd_rpi_proto_hw_params(struct snd_pcm_substream *substream,
-+                                     struct snd_pcm_hw_params *params)
-+{
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      struct snd_soc_dai *codec_dai = rtd->codec_dai;
-+      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-+      int sysclk = 12288000; /* This is fixed on this board */
-+
-+      /* Set proto bclk */
-+      int ret = snd_soc_dai_set_bclk_ratio(cpu_dai,32*2);
-+      if (ret < 0){
-+              dev_err(codec->dev,
-+                              "Failed to set BCLK ratio %d\n", ret);
-+              return ret;
-+      }
-+
-+      /* Set proto sysclk */
-+      ret = snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK_XTAL,
-+                      sysclk, SND_SOC_CLOCK_IN);
-+      if (ret < 0) {
-+              dev_err(codec->dev,
-+                              "Failed to set WM8731 SYSCLK: %d\n", ret);
-+              return ret;
-+      }
-+
-+      return 0;
-+}
-+
-+/* machine stream operations */
-+static struct snd_soc_ops snd_rpi_proto_ops = {
-+      .startup = snd_rpi_proto_startup,
-+      .hw_params = snd_rpi_proto_hw_params,
-+};
-+
-+static struct snd_soc_dai_link snd_rpi_proto_dai[] = {
-+{
-+      .name           = "WM8731",
-+      .stream_name    = "WM8731 HiFi",
-+      .cpu_dai_name   = "bcm2708-i2s.0",
-+      .codec_dai_name = "wm8731-hifi",
-+      .platform_name  = "bcm2708-i2s.0",
-+      .codec_name     = "wm8731.1-001a",
-+      .dai_fmt        = SND_SOC_DAIFMT_I2S
-+                              | SND_SOC_DAIFMT_NB_NF
-+                              | SND_SOC_DAIFMT_CBM_CFM,
-+      .ops            = &snd_rpi_proto_ops,
-+},
-+};
-+
-+/* audio machine driver */
-+static struct snd_soc_card snd_rpi_proto = {
-+      .name           = "snd_rpi_proto",
-+      .owner          = THIS_MODULE,
-+      .dai_link       = snd_rpi_proto_dai,
-+      .num_links      = ARRAY_SIZE(snd_rpi_proto_dai),
-+};
-+
-+static int snd_rpi_proto_probe(struct platform_device *pdev)
-+{
-+      int ret = 0;
-+
-+      snd_rpi_proto.dev = &pdev->dev;
-+
-+      if (pdev->dev.of_node) {
-+              struct device_node *i2s_node;
-+              struct snd_soc_dai_link *dai = &snd_rpi_proto_dai[0];
-+              i2s_node = of_parse_phandle(pdev->dev.of_node,
-+                                          "i2s-controller", 0);
-+
-+              if (i2s_node) {
-+                      dai->cpu_dai_name = NULL;
-+                      dai->cpu_of_node = i2s_node;
-+                      dai->platform_name = NULL;
-+                      dai->platform_of_node = i2s_node;
-+              }
-+      }
-+
-+      ret = snd_soc_register_card(&snd_rpi_proto);
-+      if (ret) {
-+              dev_err(&pdev->dev,
-+                              "snd_soc_register_card() failed: %d\n", ret);
-+      }
-+
-+      return ret;
-+}
-+
-+
-+static int snd_rpi_proto_remove(struct platform_device *pdev)
-+{
-+      return snd_soc_unregister_card(&snd_rpi_proto);
-+}
-+
-+static const struct of_device_id snd_rpi_proto_of_match[] = {
-+      { .compatible = "rpi,rpi-proto", },
-+      {},
-+};
-+MODULE_DEVICE_TABLE(of, snd_rpi_proto_of_match);
-+
-+static struct platform_driver snd_rpi_proto_driver = {
-+      .driver = {
-+              .name   = "snd-rpi-proto",
-+              .owner  = THIS_MODULE,
-+              .of_match_table = snd_rpi_proto_of_match,
-+      },
-+      .probe    = snd_rpi_proto_probe,
-+      .remove  = snd_rpi_proto_remove,
-+};
-+
-+module_platform_driver(snd_rpi_proto_driver);
-+
-+MODULE_AUTHOR("Florian Meier");
-+MODULE_DESCRIPTION("ASoC Driver for Raspberry Pi connected to PROTO board (WM8731)");
-+MODULE_LICENSE("GPL");
diff --git a/target/linux/brcm2708/patches-4.9/0076-RaspiDAC3-support.patch b/target/linux/brcm2708/patches-4.9/0076-RaspiDAC3-support.patch
new file mode 100644 (file)
index 0000000..de68bbf
--- /dev/null
@@ -0,0 +1,238 @@
+From b545537294ffc7e21fcc5e0c78ea8ac20c9ecd3f Mon Sep 17 00:00:00 2001
+From: Jan Grulich <jan@grulich.eu>
+Date: Mon, 24 Aug 2015 16:03:47 +0100
+Subject: [PATCH] RaspiDAC3 support
+
+Signed-off-by: Jan Grulich <jan@grulich.eu>
+
+config: fix RaspiDAC Rev.3x dependencies
+
+Change depends to SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
+like the other I2S soundcard drivers.
+
+Signed-off-by: Matthias Reichl <hias@horus.com>
+---
+ sound/soc/bcm/Kconfig     |   8 ++
+ sound/soc/bcm/Makefile    |   2 +
+ sound/soc/bcm/raspidac3.c | 186 ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 196 insertions(+)
+ create mode 100644 sound/soc/bcm/raspidac3.c
+
+--- a/sound/soc/bcm/Kconfig
++++ b/sound/soc/bcm/Kconfig
+@@ -65,3 +65,11 @@ config SND_BCM2708_SOC_IQAUDIO_DAC
+       select SND_SOC_PCM512x_I2C
+       help
+         Say Y or M if you want to add support for IQaudIO-DAC.
++
++config SND_BCM2708_SOC_RASPIDAC3
++      tristate "Support for RaspiDAC Rev.3x"
++      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
++      select SND_SOC_PCM512x_I2C
++      select SND_SOC_TPA6130A2
++      help
++        Say Y or M if you want to add support for RaspiDAC Rev.3x.
+--- a/sound/soc/bcm/Makefile
++++ b/sound/soc/bcm/Makefile
+@@ -16,6 +16,7 @@ snd-soc-hifiberry-digi-objs := hifiberry
+ snd-soc-rpi-dac-objs := rpi-dac.o
+ snd-soc-rpi-proto-objs := rpi-proto.o
+ snd-soc-iqaudio-dac-objs := iqaudio-dac.o
++snd-soc-raspidac3-objs := raspidac3.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
+@@ -24,3 +25,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_D
+ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
+ obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
+ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
++obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o
+--- /dev/null
++++ b/sound/soc/bcm/raspidac3.c
+@@ -0,0 +1,186 @@
++/*
++ * ASoC Driver for RaspiDAC v3
++ *
++ * Author:    Jan Grulich <jan@grulich.eu>
++ *            Copyright 2015
++ *              based on code by Daniel Matuschek <daniel@hifiberry.com>
++ *            based on code by Florian Meier <florian.meier@koalo.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/pcm_params.h>
++#include <sound/soc.h>
++#include <sound/jack.h>
++#include <sound/soc-dapm.h>
++
++#include "../codecs/pcm512x.h"
++#include "../codecs/tpa6130a2.h"
++
++/* sound card init */
++static int snd_rpi_raspidac3_init(struct snd_soc_pcm_runtime *rtd)
++{
++      int ret;
++      struct snd_soc_card *card = rtd->card;
++      struct snd_soc_codec *codec = rtd->codec;
++      snd_soc_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08);
++      snd_soc_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0xf, 0x02);
++      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00);
++
++      ret = snd_soc_limit_volume(card, "Digital Playback Volume", 207);
++      if (ret < 0)
++              dev_warn(card->dev, "Failed to set volume limit: %d\n", ret);
++      else {
++              struct snd_kcontrol *kctl;
++
++              ret = snd_soc_limit_volume(card,
++                                         "TPA6130A2 Headphone Playback Volume",
++                                         54);
++              if (ret < 0)
++                      dev_warn(card->dev, "Failed to set TPA6130A2 volume limit: %d\n",
++                               ret);
++              kctl = snd_soc_card_get_kcontrol(card,
++                                               "TPA6130A2 Headphone Playback Volume");
++              if (kctl) {
++                      strcpy(kctl->id.name, "Headphones Playback Volume");
++                      /* disable the volume dB scale so alsamixer works */
++                      kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
++              }
++
++              kctl = snd_soc_card_get_kcontrol(card,
++                                               "TPA6130A2 Headphone Playback Switch");
++              if (kctl)
++                      strcpy(kctl->id.name, "Headphones Playback Switch");
++      }
++
++      return 0;
++}
++
++/* set hw parameters */
++static int snd_rpi_raspidac3_hw_params(struct snd_pcm_substream *substream,
++                                     struct snd_pcm_hw_params *params)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++
++      unsigned int sample_bits =
++              snd_pcm_format_physical_width(params_format(params));
++
++      return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2);
++}
++
++/* startup */
++static int snd_rpi_raspidac3_startup(struct snd_pcm_substream *substream) {
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08);
++      return 0;
++}
++
++/* shutdown */
++static void snd_rpi_raspidac3_shutdown(struct snd_pcm_substream *substream) {
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00);
++}
++
++/* machine stream operations */
++static struct snd_soc_ops snd_rpi_raspidac3_ops = {
++      .hw_params = snd_rpi_raspidac3_hw_params,
++      .startup = snd_rpi_raspidac3_startup,
++      .shutdown = snd_rpi_raspidac3_shutdown,
++};
++
++/* interface setup */
++static struct snd_soc_dai_link snd_rpi_raspidac3_dai[] = {
++{
++      .name           = "RaspiDAC Rev.3x",
++      .stream_name    = "RaspiDAC HiFi",
++      .cpu_dai_name   = "bcm2708-i2s.0",
++      .codec_dai_name = "pcm512x-hifi",
++      .platform_name  = "bcm2708-i2s.0",
++      .codec_name     = "pcm512x.1-004c",
++      .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
++                              SND_SOC_DAIFMT_CBS_CFS,
++      .ops            = &snd_rpi_raspidac3_ops,
++      .init           = snd_rpi_raspidac3_init,
++},
++};
++
++/* audio machine driver */
++static struct snd_soc_card snd_rpi_raspidac3 = {
++      .name         = "RaspiDAC Rev.3x HiFi Audio Card",
++      .owner        = THIS_MODULE,
++      .dai_link     = snd_rpi_raspidac3_dai,
++      .num_links    = ARRAY_SIZE(snd_rpi_raspidac3_dai),
++};
++
++/* sound card test */
++static int snd_rpi_raspidac3_probe(struct platform_device *pdev)
++{
++      int ret = 0;
++
++      snd_rpi_raspidac3.dev = &pdev->dev;
++
++      if (pdev->dev.of_node) {
++          struct device_node *i2s_node;
++          struct snd_soc_dai_link *dai = &snd_rpi_raspidac3_dai[0];
++          i2s_node = of_parse_phandle(pdev->dev.of_node,
++                                      "i2s-controller", 0);
++
++          if (i2s_node) {
++              dai->cpu_dai_name = NULL;
++              dai->cpu_of_node = i2s_node;
++              dai->platform_name = NULL;
++              dai->platform_of_node = i2s_node;
++          }
++      }
++
++      ret = snd_soc_register_card(&snd_rpi_raspidac3);
++      if (ret)
++              dev_err(&pdev->dev,
++                      "snd_soc_register_card() failed: %d\n", ret);
++
++      return ret;
++}
++
++/* sound card disconnect */
++static int snd_rpi_raspidac3_remove(struct platform_device *pdev)
++{
++      return snd_soc_unregister_card(&snd_rpi_raspidac3);
++}
++
++static const struct of_device_id raspidac3_of_match[] = {
++      { .compatible = "jg,raspidacv3", },
++      {},
++};
++MODULE_DEVICE_TABLE(of, raspidac3_of_match);
++
++/* sound card platform driver */
++static struct platform_driver snd_rpi_raspidac3_driver = {
++      .driver = {
++              .name   = "snd-rpi-raspidac3",
++              .owner  = THIS_MODULE,
++              .of_match_table = raspidac3_of_match,
++      },
++      .probe          = snd_rpi_raspidac3_probe,
++      .remove         = snd_rpi_raspidac3_remove,
++};
++
++module_platform_driver(snd_rpi_raspidac3_driver);
++
++MODULE_AUTHOR("Jan Grulich <jan@grulich.eu>");
++MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0077-Add-Support-for-JustBoom-Audio-boards.patch b/target/linux/brcm2708/patches-4.9/0077-Add-Support-for-JustBoom-Audio-boards.patch
new file mode 100644 (file)
index 0000000..9654587
--- /dev/null
@@ -0,0 +1,446 @@
+From 4a8ebf575ea143c14fd815ecd1f5398b6a6aee67 Mon Sep 17 00:00:00 2001
+From: Aaron Shaw <shawaj@gmail.com>
+Date: Thu, 7 Apr 2016 21:26:21 +0100
+Subject: [PATCH] Add Support for JustBoom Audio boards
+
+justboom-dac: Adjust for ALSA API change
+
+As of 4.4, snd_soc_limit_volume now takes a struct snd_soc_card *
+rather than a struct snd_soc_codec *.
+
+Signed-off-by: Phil Elwell <phil@raspberrypi.org>
+---
+ sound/soc/bcm/Kconfig         |  14 +++
+ sound/soc/bcm/Makefile        |   4 +
+ sound/soc/bcm/justboom-dac.c  | 162 +++++++++++++++++++++++++++++++
+ sound/soc/bcm/justboom-digi.c | 215 ++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 395 insertions(+)
+ create mode 100644 sound/soc/bcm/justboom-dac.c
+ create mode 100644 sound/soc/bcm/justboom-digi.c
+
+--- a/sound/soc/bcm/Kconfig
++++ b/sound/soc/bcm/Kconfig
+@@ -59,6 +59,20 @@ config SND_BCM2708_SOC_RPI_PROTO
+       help
+         Say Y or M if you want to add support for Audio Codec Board PROTO (WM8731).
++config SND_BCM2708_SOC_JUSTBOOM_DAC
++      tristate "Support for JustBoom DAC"
++      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
++      select SND_SOC_PCM512x
++      help
++        Say Y or M if you want to add support for JustBoom DAC.
++
++config SND_BCM2708_SOC_JUSTBOOM_DIGI
++      tristate "Support for JustBoom Digi"
++      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
++      select SND_SOC_WM8804
++      help
++        Say Y or M if you want to add support for JustBoom Digi.
++
+ config SND_BCM2708_SOC_IQAUDIO_DAC
+       tristate "Support for IQaudIO-DAC"
+       depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
+--- a/sound/soc/bcm/Makefile
++++ b/sound/soc/bcm/Makefile
+@@ -13,6 +13,8 @@ snd-soc-hifiberry-amp-objs := hifiberry_
+ snd-soc-hifiberry-dac-objs := hifiberry_dac.o
+ snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o
+ snd-soc-hifiberry-digi-objs := hifiberry_digi.o
++snd-soc-justboom-dac-objs := justboom-dac.o
++snd-soc-justboom-digi-objs := justboom-digi.o
+ snd-soc-rpi-dac-objs := rpi-dac.o
+ snd-soc-rpi-proto-objs := rpi-proto.o
+ snd-soc-iqaudio-dac-objs := iqaudio-dac.o
+@@ -22,6 +24,8 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_A
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o
++obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC) += snd-soc-justboom-dac.o
++obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o
+ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
+ obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
+ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
+--- /dev/null
++++ b/sound/soc/bcm/justboom-dac.c
+@@ -0,0 +1,162 @@
++/*
++ * ASoC Driver for JustBoom DAC Raspberry Pi HAT Sound Card
++ *
++ * Author:    Milan Neskovic
++ *            Copyright 2016
++ *            based on code by Daniel Matuschek <info@crazy-audio.com>
++ *            based on code by Florian Meier <florian.meier@koalo.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/pcm_params.h>
++#include <sound/soc.h>
++#include <sound/jack.h>
++
++#include "../codecs/pcm512x.h"
++
++static bool digital_gain_0db_limit = true;
++
++static int snd_rpi_justboom_dac_init(struct snd_soc_pcm_runtime *rtd)
++{
++      struct snd_soc_codec *codec = rtd->codec;
++      snd_soc_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08);
++      snd_soc_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0xf, 0x02);
++      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08);
++
++      if (digital_gain_0db_limit)
++      {
++              int ret;
++              struct snd_soc_card *card = rtd->card;
++
++              ret = snd_soc_limit_volume(card, "Digital Playback Volume", 207);
++              if (ret < 0)
++                      dev_warn(card->dev, "Failed to set volume limit: %d\n", ret);
++      }
++
++      return 0;
++}
++
++static int snd_rpi_justboom_dac_hw_params(struct snd_pcm_substream *substream,
++                                     struct snd_pcm_hw_params *params)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++      /*return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);*/
++      unsigned int sample_bits =
++              snd_pcm_format_physical_width(params_format(params));
++      return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2);
++}
++
++static int snd_rpi_justboom_dac_startup(struct snd_pcm_substream *substream) {
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08);
++      return 0;
++}
++
++static void snd_rpi_justboom_dac_shutdown(struct snd_pcm_substream *substream) {
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00);
++}
++
++/* machine stream operations */
++static struct snd_soc_ops snd_rpi_justboom_dac_ops = {
++      .hw_params = snd_rpi_justboom_dac_hw_params,
++      .startup = snd_rpi_justboom_dac_startup,
++      .shutdown = snd_rpi_justboom_dac_shutdown,
++};
++
++static struct snd_soc_dai_link snd_rpi_justboom_dac_dai[] = {
++{
++      .name           = "JustBoom DAC",
++      .stream_name    = "JustBoom DAC HiFi",
++      .cpu_dai_name   = "bcm2708-i2s.0",
++      .codec_dai_name = "pcm512x-hifi",
++      .platform_name  = "bcm2708-i2s.0",
++      .codec_name     = "pcm512x.1-004d",
++      .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
++                              SND_SOC_DAIFMT_CBS_CFS,
++      .ops            = &snd_rpi_justboom_dac_ops,
++      .init           = snd_rpi_justboom_dac_init,
++},
++};
++
++/* audio machine driver */
++static struct snd_soc_card snd_rpi_justboom_dac = {
++      .name         = "snd_rpi_justboom_dac",
++      .owner        = THIS_MODULE,
++      .dai_link     = snd_rpi_justboom_dac_dai,
++      .num_links    = ARRAY_SIZE(snd_rpi_justboom_dac_dai),
++};
++
++static int snd_rpi_justboom_dac_probe(struct platform_device *pdev)
++{
++      int ret = 0;
++
++      snd_rpi_justboom_dac.dev = &pdev->dev;
++
++      if (pdev->dev.of_node) {
++          struct device_node *i2s_node;
++          struct snd_soc_dai_link *dai = &snd_rpi_justboom_dac_dai[0];
++          i2s_node = of_parse_phandle(pdev->dev.of_node,
++                                      "i2s-controller", 0);
++
++          if (i2s_node) {
++                      dai->cpu_dai_name = NULL;
++                      dai->cpu_of_node = i2s_node;
++                      dai->platform_name = NULL;
++                      dai->platform_of_node = i2s_node;
++          }
++
++          digital_gain_0db_limit = !of_property_read_bool(
++                      pdev->dev.of_node, "justboom,24db_digital_gain");
++      }
++
++      ret = snd_soc_register_card(&snd_rpi_justboom_dac);
++      if (ret)
++              dev_err(&pdev->dev,
++                      "snd_soc_register_card() failed: %d\n", ret);
++
++      return ret;
++}
++
++static int snd_rpi_justboom_dac_remove(struct platform_device *pdev)
++{
++      return snd_soc_unregister_card(&snd_rpi_justboom_dac);
++}
++
++static const struct of_device_id snd_rpi_justboom_dac_of_match[] = {
++      { .compatible = "justboom,justboom-dac", },
++      {},
++};
++MODULE_DEVICE_TABLE(of, snd_rpi_justboom_dac_of_match);
++
++static struct platform_driver snd_rpi_justboom_dac_driver = {
++      .driver = {
++              .name   = "snd-rpi-justboom-dac",
++              .owner  = THIS_MODULE,
++              .of_match_table = snd_rpi_justboom_dac_of_match,
++      },
++      .probe          = snd_rpi_justboom_dac_probe,
++      .remove         = snd_rpi_justboom_dac_remove,
++};
++
++module_platform_driver(snd_rpi_justboom_dac_driver);
++
++MODULE_AUTHOR("Milan Neskovic <info@justboom.co>");
++MODULE_DESCRIPTION("ASoC Driver for JustBoom PI DAC HAT Sound Card");
++MODULE_LICENSE("GPL v2");
+--- /dev/null
++++ b/sound/soc/bcm/justboom-digi.c
+@@ -0,0 +1,215 @@
++/*
++ * ASoC Driver for JustBoom Raspberry Pi Digi HAT Sound Card
++ *
++ * Author:    Milan Neskovic
++ *            Copyright 2016
++ *            based on code by Daniel Matuschek <info@crazy-audio.com>
++ *            based on code by Florian Meier <florian.meier@koalo.de>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/pcm_params.h>
++#include <sound/soc.h>
++#include <sound/jack.h>
++
++#include "../codecs/wm8804.h"
++
++static int snd_rpi_justboom_digi_init(struct snd_soc_pcm_runtime *rtd)
++{
++      struct snd_soc_codec *codec = rtd->codec;
++
++      /* enable TX output */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
++
++      return 0;
++}
++
++static int snd_rpi_justboom_digi_startup(struct snd_pcm_substream *substream) {
++      /* turn on digital output */
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00);
++      return 0;
++}
++
++static void snd_rpi_justboom_digi_shutdown(struct snd_pcm_substream *substream) {
++      /* turn off output */
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c);
++}
++
++static int snd_rpi_justboom_digi_hw_params(struct snd_pcm_substream *substream,
++                                     struct snd_pcm_hw_params *params)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_dai *codec_dai = rtd->codec_dai;
++      struct snd_soc_codec *codec = rtd->codec;
++      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++
++      int sysclk = 27000000; /* This is fixed on this board */
++
++      long mclk_freq=0;
++      int mclk_div=1;
++      int sampling_freq=1;
++
++      int ret;
++
++      int samplerate = params_rate(params);
++
++      if (samplerate<=96000) {
++              mclk_freq=samplerate*256;
++              mclk_div=WM8804_MCLKDIV_256FS;
++      } else {
++              mclk_freq=samplerate*128;
++              mclk_div=WM8804_MCLKDIV_128FS;
++      }
++
++      switch (samplerate) {
++              case 32000:
++                      sampling_freq=0x03;
++                      break;
++              case 44100:
++                      sampling_freq=0x00;
++                      break;
++              case 48000:
++                      sampling_freq=0x02;
++                      break;
++              case 88200:
++                      sampling_freq=0x08;
++                      break;
++              case 96000:
++                      sampling_freq=0x0a;
++                      break;
++              case 176400:
++                      sampling_freq=0x0c;
++                      break;
++              case 192000:
++                      sampling_freq=0x0e;
++                      break;
++              default:
++                      dev_err(codec->dev,
++                      "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n",
++                      samplerate);
++      }
++
++      snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div);
++      snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq);
++
++      ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL,
++                                      sysclk, SND_SOC_CLOCK_OUT);
++      if (ret < 0) {
++              dev_err(codec->dev,
++              "Failed to set WM8804 SYSCLK: %d\n", ret);
++              return ret;
++      }
++
++      /* Enable TX output */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
++
++      /* Power on */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0);
++
++      /* set sampling frequency status bits */
++      snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq);
++
++      return snd_soc_dai_set_bclk_ratio(cpu_dai,64);
++}
++
++/* machine stream operations */
++static struct snd_soc_ops snd_rpi_justboom_digi_ops = {
++      .hw_params = snd_rpi_justboom_digi_hw_params,
++        .startup = snd_rpi_justboom_digi_startup,
++        .shutdown = snd_rpi_justboom_digi_shutdown,
++};
++
++static struct snd_soc_dai_link snd_rpi_justboom_digi_dai[] = {
++{
++      .name           = "JustBoom Digi",
++      .stream_name    = "JustBoom Digi HiFi",
++      .cpu_dai_name   = "bcm2708-i2s.0",
++      .codec_dai_name = "wm8804-spdif",
++      .platform_name  = "bcm2708-i2s.0",
++      .codec_name     = "wm8804.1-003b",
++      .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
++                              SND_SOC_DAIFMT_CBM_CFM,
++      .ops            = &snd_rpi_justboom_digi_ops,
++      .init           = snd_rpi_justboom_digi_init,
++},
++};
++
++/* audio machine driver */
++static struct snd_soc_card snd_rpi_justboom_digi = {
++      .name         = "snd_rpi_justboom_digi",
++      .owner        = THIS_MODULE,
++      .dai_link     = snd_rpi_justboom_digi_dai,
++      .num_links    = ARRAY_SIZE(snd_rpi_justboom_digi_dai),
++};
++
++static int snd_rpi_justboom_digi_probe(struct platform_device *pdev)
++{
++      int ret = 0;
++
++      snd_rpi_justboom_digi.dev = &pdev->dev;
++
++      if (pdev->dev.of_node) {
++          struct device_node *i2s_node;
++          struct snd_soc_dai_link *dai = &snd_rpi_justboom_digi_dai[0];
++          i2s_node = of_parse_phandle(pdev->dev.of_node,
++                                      "i2s-controller", 0);
++
++          if (i2s_node) {
++                      dai->cpu_dai_name = NULL;
++                      dai->cpu_of_node = i2s_node;
++                      dai->platform_name = NULL;
++                      dai->platform_of_node = i2s_node;
++          }
++      }
++
++      ret = snd_soc_register_card(&snd_rpi_justboom_digi);
++      if (ret)
++              dev_err(&pdev->dev,
++                      "snd_soc_register_card() failed: %d\n", ret);
++
++      return ret;
++}
++
++static int snd_rpi_justboom_digi_remove(struct platform_device *pdev)
++{
++      return snd_soc_unregister_card(&snd_rpi_justboom_digi);
++}
++
++static const struct of_device_id snd_rpi_justboom_digi_of_match[] = {
++      { .compatible = "justboom,justboom-digi", },
++      {},
++};
++MODULE_DEVICE_TABLE(of, snd_rpi_justboom_digi_of_match);
++
++static struct platform_driver snd_rpi_justboom_digi_driver = {
++      .driver = {
++              .name   = "snd-rpi-justboom-digi",
++              .owner  = THIS_MODULE,
++              .of_match_table = snd_rpi_justboom_digi_of_match,
++      },
++      .probe          = snd_rpi_justboom_digi_probe,
++      .remove         = snd_rpi_justboom_digi_remove,
++};
++
++module_platform_driver(snd_rpi_justboom_digi_driver);
++
++MODULE_AUTHOR("Milan Neskovic <info@justboom.co>");
++MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0077-RaspiDAC3-support.patch b/target/linux/brcm2708/patches-4.9/0077-RaspiDAC3-support.patch
deleted file mode 100644 (file)
index 32bc86a..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-From 26084a968083e88298416426576dbd4c006e5dea Mon Sep 17 00:00:00 2001
-From: Jan Grulich <jan@grulich.eu>
-Date: Mon, 24 Aug 2015 16:03:47 +0100
-Subject: [PATCH] RaspiDAC3 support
-
-Signed-off-by: Jan Grulich <jan@grulich.eu>
-
-config: fix RaspiDAC Rev.3x dependencies
-
-Change depends to SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
-like the other I2S soundcard drivers.
-
-Signed-off-by: Matthias Reichl <hias@horus.com>
----
- sound/soc/bcm/Kconfig     |   8 ++
- sound/soc/bcm/Makefile    |   2 +
- sound/soc/bcm/raspidac3.c | 186 ++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 196 insertions(+)
- create mode 100644 sound/soc/bcm/raspidac3.c
-
---- a/sound/soc/bcm/Kconfig
-+++ b/sound/soc/bcm/Kconfig
-@@ -58,3 +58,11 @@ config SND_BCM2708_SOC_IQAUDIO_DAC
-       select SND_SOC_PCM512x_I2C
-       help
-         Say Y or M if you want to add support for IQaudIO-DAC.
-+
-+config SND_BCM2708_SOC_RASPIDAC3
-+      tristate "Support for RaspiDAC Rev.3x"
-+      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
-+      select SND_SOC_PCM512x_I2C
-+      select SND_SOC_TPA6130A2
-+      help
-+        Say Y or M if you want to add support for RaspiDAC Rev.3x.
---- a/sound/soc/bcm/Makefile
-+++ b/sound/soc/bcm/Makefile
-@@ -15,6 +15,7 @@ snd-soc-hifiberry-digi-objs := hifiberry
- snd-soc-rpi-dac-objs := rpi-dac.o
- snd-soc-rpi-proto-objs := rpi-proto.o
- snd-soc-iqaudio-dac-objs := iqaudio-dac.o
-+snd-soc-raspidac3-objs := raspidac3.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
-@@ -22,3 +23,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_D
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
- obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
-+obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o
---- /dev/null
-+++ b/sound/soc/bcm/raspidac3.c
-@@ -0,0 +1,186 @@
-+/*
-+ * ASoC Driver for RaspiDAC v3
-+ *
-+ * Author:    Jan Grulich <jan@grulich.eu>
-+ *            Copyright 2015
-+ *              based on code by Daniel Matuschek <daniel@hifiberry.com>
-+ *            based on code by Florian Meier <florian.meier@koalo.de>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+
-+#include <sound/core.h>
-+#include <sound/pcm.h>
-+#include <sound/pcm_params.h>
-+#include <sound/soc.h>
-+#include <sound/jack.h>
-+#include <sound/soc-dapm.h>
-+
-+#include "../codecs/pcm512x.h"
-+#include "../codecs/tpa6130a2.h"
-+
-+/* sound card init */
-+static int snd_rpi_raspidac3_init(struct snd_soc_pcm_runtime *rtd)
-+{
-+      int ret;
-+      struct snd_soc_card *card = rtd->card;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      snd_soc_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08);
-+      snd_soc_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0xf, 0x02);
-+      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00);
-+
-+      ret = snd_soc_limit_volume(card, "Digital Playback Volume", 207);
-+      if (ret < 0)
-+              dev_warn(card->dev, "Failed to set volume limit: %d\n", ret);
-+      else {
-+              struct snd_kcontrol *kctl;
-+
-+              ret = snd_soc_limit_volume(card,
-+                                         "TPA6130A2 Headphone Playback Volume",
-+                                         54);
-+              if (ret < 0)
-+                      dev_warn(card->dev, "Failed to set TPA6130A2 volume limit: %d\n",
-+                               ret);
-+              kctl = snd_soc_card_get_kcontrol(card,
-+                                               "TPA6130A2 Headphone Playback Volume");
-+              if (kctl) {
-+                      strcpy(kctl->id.name, "Headphones Playback Volume");
-+                      /* disable the volume dB scale so alsamixer works */
-+                      kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
-+              }
-+
-+              kctl = snd_soc_card_get_kcontrol(card,
-+                                               "TPA6130A2 Headphone Playback Switch");
-+              if (kctl)
-+                      strcpy(kctl->id.name, "Headphones Playback Switch");
-+      }
-+
-+      return 0;
-+}
-+
-+/* set hw parameters */
-+static int snd_rpi_raspidac3_hw_params(struct snd_pcm_substream *substream,
-+                                     struct snd_pcm_hw_params *params)
-+{
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-+
-+      unsigned int sample_bits =
-+              snd_pcm_format_physical_width(params_format(params));
-+
-+      return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2);
-+}
-+
-+/* startup */
-+static int snd_rpi_raspidac3_startup(struct snd_pcm_substream *substream) {
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08);
-+      return 0;
-+}
-+
-+/* shutdown */
-+static void snd_rpi_raspidac3_shutdown(struct snd_pcm_substream *substream) {
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00);
-+}
-+
-+/* machine stream operations */
-+static struct snd_soc_ops snd_rpi_raspidac3_ops = {
-+      .hw_params = snd_rpi_raspidac3_hw_params,
-+      .startup = snd_rpi_raspidac3_startup,
-+      .shutdown = snd_rpi_raspidac3_shutdown,
-+};
-+
-+/* interface setup */
-+static struct snd_soc_dai_link snd_rpi_raspidac3_dai[] = {
-+{
-+      .name           = "RaspiDAC Rev.3x",
-+      .stream_name    = "RaspiDAC HiFi",
-+      .cpu_dai_name   = "bcm2708-i2s.0",
-+      .codec_dai_name = "pcm512x-hifi",
-+      .platform_name  = "bcm2708-i2s.0",
-+      .codec_name     = "pcm512x.1-004c",
-+      .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
-+                              SND_SOC_DAIFMT_CBS_CFS,
-+      .ops            = &snd_rpi_raspidac3_ops,
-+      .init           = snd_rpi_raspidac3_init,
-+},
-+};
-+
-+/* audio machine driver */
-+static struct snd_soc_card snd_rpi_raspidac3 = {
-+      .name         = "RaspiDAC Rev.3x HiFi Audio Card",
-+      .owner        = THIS_MODULE,
-+      .dai_link     = snd_rpi_raspidac3_dai,
-+      .num_links    = ARRAY_SIZE(snd_rpi_raspidac3_dai),
-+};
-+
-+/* sound card test */
-+static int snd_rpi_raspidac3_probe(struct platform_device *pdev)
-+{
-+      int ret = 0;
-+
-+      snd_rpi_raspidac3.dev = &pdev->dev;
-+
-+      if (pdev->dev.of_node) {
-+          struct device_node *i2s_node;
-+          struct snd_soc_dai_link *dai = &snd_rpi_raspidac3_dai[0];
-+          i2s_node = of_parse_phandle(pdev->dev.of_node,
-+                                      "i2s-controller", 0);
-+
-+          if (i2s_node) {
-+              dai->cpu_dai_name = NULL;
-+              dai->cpu_of_node = i2s_node;
-+              dai->platform_name = NULL;
-+              dai->platform_of_node = i2s_node;
-+          }
-+      }
-+
-+      ret = snd_soc_register_card(&snd_rpi_raspidac3);
-+      if (ret)
-+              dev_err(&pdev->dev,
-+                      "snd_soc_register_card() failed: %d\n", ret);
-+
-+      return ret;
-+}
-+
-+/* sound card disconnect */
-+static int snd_rpi_raspidac3_remove(struct platform_device *pdev)
-+{
-+      return snd_soc_unregister_card(&snd_rpi_raspidac3);
-+}
-+
-+static const struct of_device_id raspidac3_of_match[] = {
-+      { .compatible = "jg,raspidacv3", },
-+      {},
-+};
-+MODULE_DEVICE_TABLE(of, raspidac3_of_match);
-+
-+/* sound card platform driver */
-+static struct platform_driver snd_rpi_raspidac3_driver = {
-+      .driver = {
-+              .name   = "snd-rpi-raspidac3",
-+              .owner  = THIS_MODULE,
-+              .of_match_table = raspidac3_of_match,
-+      },
-+      .probe          = snd_rpi_raspidac3_probe,
-+      .remove         = snd_rpi_raspidac3_remove,
-+};
-+
-+module_platform_driver(snd_rpi_raspidac3_driver);
-+
-+MODULE_AUTHOR("Jan Grulich <jan@grulich.eu>");
-+MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x");
-+MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0078-ARM-adau1977-adc-Add-basic-machine-driver-for-adau19.patch b/target/linux/brcm2708/patches-4.9/0078-ARM-adau1977-adc-Add-basic-machine-driver-for-adau19.patch
new file mode 100644 (file)
index 0000000..1b87b13
--- /dev/null
@@ -0,0 +1,177 @@
+From 9bbd8a3c8378eac9e605e0f37f4005583e122527 Mon Sep 17 00:00:00 2001
+From: Andrey Grodzovsky <andrey2805@gmail.com>
+Date: Tue, 3 May 2016 22:10:59 -0400
+Subject: [PATCH] ARM: adau1977-adc: Add basic machine driver for adau1977
+ codec driver.
+
+This commit adds basic support for the codec usage including: Device tree overlay,
+binding I2S bus and setting I2S mode, clock source and frequency setting according
+to spec.
+
+Signed-off-by: Andrey Grodzovsky <andrey2805@gmail.com>
+---
+ sound/soc/bcm/Kconfig        |   7 +++
+ sound/soc/bcm/Makefile       |   2 +
+ sound/soc/bcm/adau1977-adc.c | 125 +++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 134 insertions(+)
+ create mode 100644 sound/soc/bcm/adau1977-adc.c
+
+--- a/sound/soc/bcm/Kconfig
++++ b/sound/soc/bcm/Kconfig
+@@ -87,3 +87,10 @@ config SND_BCM2708_SOC_RASPIDAC3
+       select SND_SOC_TPA6130A2
+       help
+         Say Y or M if you want to add support for RaspiDAC Rev.3x.
++
++config SND_BCM2708_SOC_ADAU1977_ADC
++      tristate "Support for ADAU1977 ADC"
++      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
++      select SND_SOC_ADAU1977_I2C
++      help
++        Say Y or M if you want to add support for ADAU1977 ADC.
+--- a/sound/soc/bcm/Makefile
++++ b/sound/soc/bcm/Makefile
+@@ -9,6 +9,7 @@ snd-soc-cygnus-objs := cygnus-pcm.o cygn
+ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o
+ # BCM2708 Machine Support
++snd-soc-adau1977-adc-objs := adau1977-adc.o
+ snd-soc-hifiberry-amp-objs := hifiberry_amp.o
+ snd-soc-hifiberry-dac-objs := hifiberry_dac.o
+ snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o
+@@ -20,6 +21,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o
+ snd-soc-iqaudio-dac-objs := iqaudio-dac.o
+ snd-soc-raspidac3-objs := raspidac3.o
++obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
+--- /dev/null
++++ b/sound/soc/bcm/adau1977-adc.c
+@@ -0,0 +1,125 @@
++/*
++ * ASoC Driver for ADAU1977 ADC
++ *
++ * Author:    Andrey Grodzovsky <andrey2805@gmail.com>
++ *            Copyright 2016
++ *
++ * This file is based on hifibery_dac driver by Florian Meier.
++ * 
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/pcm_params.h>
++#include <sound/soc.h>
++#include <sound/jack.h>
++
++enum adau1977_clk_id {
++    ADAU1977_SYSCLK,
++};
++ 
++enum adau1977_sysclk_src {
++    ADAU1977_SYSCLK_SRC_MCLK,
++    ADAU1977_SYSCLK_SRC_LRCLK,
++};
++
++static int eval_adau1977_init(struct snd_soc_pcm_runtime *rtd)
++{
++      int ret;
++      struct snd_soc_dai *codec_dai = rtd->codec_dai;
++      
++      ret = snd_soc_dai_set_tdm_slot(codec_dai, 0, 0, 0, 0);
++      if (ret < 0)
++              return ret;
++
++      return snd_soc_codec_set_sysclk(rtd->codec, ADAU1977_SYSCLK,
++                      ADAU1977_SYSCLK_SRC_MCLK, 11289600, SND_SOC_CLOCK_IN);
++}
++ 
++static struct snd_soc_dai_link snd_rpi_adau1977_dai[] = {
++      {
++      .name = "adau1977",
++      .stream_name = "ADAU1977", 
++      .cpu_dai_name = "bcm2708-i2s.0", 
++      .codec_dai_name = "adau1977-hifi",
++      .platform_name = "bcm2708-i2s.0",
++      .codec_name = "adau1977.1-0011",
++      .init = eval_adau1977_init,
++      .dai_fmt = SND_SOC_DAIFMT_I2S |
++              SND_SOC_DAIFMT_NB_NF |
++              SND_SOC_DAIFMT_CBM_CFM,
++      },
++};
++
++/* audio machine driver */
++static struct snd_soc_card snd_adau1977_adc = {
++      .name         = "snd_rpi_adau1977_adc",
++      .owner        = THIS_MODULE,
++      .dai_link     = snd_rpi_adau1977_dai,
++      .num_links    = ARRAY_SIZE(snd_rpi_adau1977_dai),
++};
++
++static int snd_adau1977_adc_probe(struct platform_device *pdev)
++{
++      int ret = 0;
++
++      snd_adau1977_adc.dev = &pdev->dev;
++      if (pdev->dev.of_node) {
++          struct device_node *i2s_node;
++          struct snd_soc_dai_link *dai = &snd_rpi_adau1977_dai[0];
++          i2s_node = of_parse_phandle(pdev->dev.of_node,
++                                      "i2s-controller", 0);
++
++          if (i2s_node) {
++              dai->cpu_dai_name = NULL;
++              dai->cpu_of_node = i2s_node;
++              dai->platform_name = NULL;
++              dai->platform_of_node = i2s_node;
++          }
++      }
++
++      ret = snd_soc_register_card(&snd_adau1977_adc);
++      if (ret)
++              dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);
++
++      return ret;
++}
++
++static int snd_adau1977_adc_remove(struct platform_device *pdev)
++{
++      return snd_soc_unregister_card(&snd_adau1977_adc);
++}
++
++static const struct of_device_id snd_adau1977_adc_of_match[] = {
++      { .compatible = "adi,adau1977-adc", },
++      {},
++};
++
++MODULE_DEVICE_TABLE(of, snd_adau1977_adc_of_match);
++
++static struct platform_driver snd_adau1977_adc_driver = {
++        .driver = {
++                .name   = "snd-adau1977-adc",
++                .owner  = THIS_MODULE,
++              .of_match_table = snd_adau1977_adc_of_match,
++        },
++        .probe          = snd_adau1977_adc_probe,
++        .remove         = snd_adau1977_adc_remove,
++};
++
++module_platform_driver(snd_adau1977_adc_driver);
++
++MODULE_AUTHOR("Andrey Grodzovsky <andrey2805@gmail.com>");
++MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0078-Add-Support-for-JustBoom-Audio-boards.patch b/target/linux/brcm2708/patches-4.9/0078-Add-Support-for-JustBoom-Audio-boards.patch
deleted file mode 100644 (file)
index 95bf9a5..0000000
+++ /dev/null
@@ -1,446 +0,0 @@
-From 16e3f935b10cbd118056806ebd3afe6eed4c0183 Mon Sep 17 00:00:00 2001
-From: Aaron Shaw <shawaj@gmail.com>
-Date: Thu, 7 Apr 2016 21:26:21 +0100
-Subject: [PATCH] Add Support for JustBoom Audio boards
-
-justboom-dac: Adjust for ALSA API change
-
-As of 4.4, snd_soc_limit_volume now takes a struct snd_soc_card *
-rather than a struct snd_soc_codec *.
-
-Signed-off-by: Phil Elwell <phil@raspberrypi.org>
----
- sound/soc/bcm/Kconfig         |  14 +++
- sound/soc/bcm/Makefile        |   4 +
- sound/soc/bcm/justboom-dac.c  | 162 +++++++++++++++++++++++++++++++
- sound/soc/bcm/justboom-digi.c | 215 ++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 395 insertions(+)
- create mode 100644 sound/soc/bcm/justboom-dac.c
- create mode 100644 sound/soc/bcm/justboom-digi.c
-
---- a/sound/soc/bcm/Kconfig
-+++ b/sound/soc/bcm/Kconfig
-@@ -52,6 +52,20 @@ config SND_BCM2708_SOC_RPI_PROTO
-       help
-         Say Y or M if you want to add support for Audio Codec Board PROTO (WM8731).
-+config SND_BCM2708_SOC_JUSTBOOM_DAC
-+      tristate "Support for JustBoom DAC"
-+      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
-+      select SND_SOC_PCM512x
-+      help
-+        Say Y or M if you want to add support for JustBoom DAC.
-+
-+config SND_BCM2708_SOC_JUSTBOOM_DIGI
-+      tristate "Support for JustBoom Digi"
-+      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
-+      select SND_SOC_WM8804
-+      help
-+        Say Y or M if you want to add support for JustBoom Digi.
-+
- config SND_BCM2708_SOC_IQAUDIO_DAC
-       tristate "Support for IQaudIO-DAC"
-       depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
---- a/sound/soc/bcm/Makefile
-+++ b/sound/soc/bcm/Makefile
-@@ -12,6 +12,8 @@ obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-
- snd-soc-hifiberry-dac-objs := hifiberry_dac.o
- snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o
- snd-soc-hifiberry-digi-objs := hifiberry_digi.o
-+snd-soc-justboom-dac-objs := justboom-dac.o
-+snd-soc-justboom-digi-objs := justboom-digi.o
- snd-soc-rpi-dac-objs := rpi-dac.o
- snd-soc-rpi-proto-objs := rpi-proto.o
- snd-soc-iqaudio-dac-objs := iqaudio-dac.o
-@@ -20,6 +22,8 @@ snd-soc-raspidac3-objs := raspidac3.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o
-+obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC) += snd-soc-justboom-dac.o
-+obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI) += snd-soc-justboom-digi.o
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
- obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
---- /dev/null
-+++ b/sound/soc/bcm/justboom-dac.c
-@@ -0,0 +1,162 @@
-+/*
-+ * ASoC Driver for JustBoom DAC Raspberry Pi HAT Sound Card
-+ *
-+ * Author:    Milan Neskovic
-+ *            Copyright 2016
-+ *            based on code by Daniel Matuschek <info@crazy-audio.com>
-+ *            based on code by Florian Meier <florian.meier@koalo.de>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+
-+#include <sound/core.h>
-+#include <sound/pcm.h>
-+#include <sound/pcm_params.h>
-+#include <sound/soc.h>
-+#include <sound/jack.h>
-+
-+#include "../codecs/pcm512x.h"
-+
-+static bool digital_gain_0db_limit = true;
-+
-+static int snd_rpi_justboom_dac_init(struct snd_soc_pcm_runtime *rtd)
-+{
-+      struct snd_soc_codec *codec = rtd->codec;
-+      snd_soc_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08);
-+      snd_soc_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0xf, 0x02);
-+      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08);
-+
-+      if (digital_gain_0db_limit)
-+      {
-+              int ret;
-+              struct snd_soc_card *card = rtd->card;
-+
-+              ret = snd_soc_limit_volume(card, "Digital Playback Volume", 207);
-+              if (ret < 0)
-+                      dev_warn(card->dev, "Failed to set volume limit: %d\n", ret);
-+      }
-+
-+      return 0;
-+}
-+
-+static int snd_rpi_justboom_dac_hw_params(struct snd_pcm_substream *substream,
-+                                     struct snd_pcm_hw_params *params)
-+{
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-+      /*return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);*/
-+      unsigned int sample_bits =
-+              snd_pcm_format_physical_width(params_format(params));
-+      return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2);
-+}
-+
-+static int snd_rpi_justboom_dac_startup(struct snd_pcm_substream *substream) {
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08);
-+      return 0;
-+}
-+
-+static void snd_rpi_justboom_dac_shutdown(struct snd_pcm_substream *substream) {
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00);
-+}
-+
-+/* machine stream operations */
-+static struct snd_soc_ops snd_rpi_justboom_dac_ops = {
-+      .hw_params = snd_rpi_justboom_dac_hw_params,
-+      .startup = snd_rpi_justboom_dac_startup,
-+      .shutdown = snd_rpi_justboom_dac_shutdown,
-+};
-+
-+static struct snd_soc_dai_link snd_rpi_justboom_dac_dai[] = {
-+{
-+      .name           = "JustBoom DAC",
-+      .stream_name    = "JustBoom DAC HiFi",
-+      .cpu_dai_name   = "bcm2708-i2s.0",
-+      .codec_dai_name = "pcm512x-hifi",
-+      .platform_name  = "bcm2708-i2s.0",
-+      .codec_name     = "pcm512x.1-004d",
-+      .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
-+                              SND_SOC_DAIFMT_CBS_CFS,
-+      .ops            = &snd_rpi_justboom_dac_ops,
-+      .init           = snd_rpi_justboom_dac_init,
-+},
-+};
-+
-+/* audio machine driver */
-+static struct snd_soc_card snd_rpi_justboom_dac = {
-+      .name         = "snd_rpi_justboom_dac",
-+      .owner        = THIS_MODULE,
-+      .dai_link     = snd_rpi_justboom_dac_dai,
-+      .num_links    = ARRAY_SIZE(snd_rpi_justboom_dac_dai),
-+};
-+
-+static int snd_rpi_justboom_dac_probe(struct platform_device *pdev)
-+{
-+      int ret = 0;
-+
-+      snd_rpi_justboom_dac.dev = &pdev->dev;
-+
-+      if (pdev->dev.of_node) {
-+          struct device_node *i2s_node;
-+          struct snd_soc_dai_link *dai = &snd_rpi_justboom_dac_dai[0];
-+          i2s_node = of_parse_phandle(pdev->dev.of_node,
-+                                      "i2s-controller", 0);
-+
-+          if (i2s_node) {
-+                      dai->cpu_dai_name = NULL;
-+                      dai->cpu_of_node = i2s_node;
-+                      dai->platform_name = NULL;
-+                      dai->platform_of_node = i2s_node;
-+          }
-+
-+          digital_gain_0db_limit = !of_property_read_bool(
-+                      pdev->dev.of_node, "justboom,24db_digital_gain");
-+      }
-+
-+      ret = snd_soc_register_card(&snd_rpi_justboom_dac);
-+      if (ret)
-+              dev_err(&pdev->dev,
-+                      "snd_soc_register_card() failed: %d\n", ret);
-+
-+      return ret;
-+}
-+
-+static int snd_rpi_justboom_dac_remove(struct platform_device *pdev)
-+{
-+      return snd_soc_unregister_card(&snd_rpi_justboom_dac);
-+}
-+
-+static const struct of_device_id snd_rpi_justboom_dac_of_match[] = {
-+      { .compatible = "justboom,justboom-dac", },
-+      {},
-+};
-+MODULE_DEVICE_TABLE(of, snd_rpi_justboom_dac_of_match);
-+
-+static struct platform_driver snd_rpi_justboom_dac_driver = {
-+      .driver = {
-+              .name   = "snd-rpi-justboom-dac",
-+              .owner  = THIS_MODULE,
-+              .of_match_table = snd_rpi_justboom_dac_of_match,
-+      },
-+      .probe          = snd_rpi_justboom_dac_probe,
-+      .remove         = snd_rpi_justboom_dac_remove,
-+};
-+
-+module_platform_driver(snd_rpi_justboom_dac_driver);
-+
-+MODULE_AUTHOR("Milan Neskovic <info@justboom.co>");
-+MODULE_DESCRIPTION("ASoC Driver for JustBoom PI DAC HAT Sound Card");
-+MODULE_LICENSE("GPL v2");
---- /dev/null
-+++ b/sound/soc/bcm/justboom-digi.c
-@@ -0,0 +1,215 @@
-+/*
-+ * ASoC Driver for JustBoom Raspberry Pi Digi HAT Sound Card
-+ *
-+ * Author:    Milan Neskovic
-+ *            Copyright 2016
-+ *            based on code by Daniel Matuschek <info@crazy-audio.com>
-+ *            based on code by Florian Meier <florian.meier@koalo.de>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+
-+#include <sound/core.h>
-+#include <sound/pcm.h>
-+#include <sound/pcm_params.h>
-+#include <sound/soc.h>
-+#include <sound/jack.h>
-+
-+#include "../codecs/wm8804.h"
-+
-+static int snd_rpi_justboom_digi_init(struct snd_soc_pcm_runtime *rtd)
-+{
-+      struct snd_soc_codec *codec = rtd->codec;
-+
-+      /* enable TX output */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
-+
-+      return 0;
-+}
-+
-+static int snd_rpi_justboom_digi_startup(struct snd_pcm_substream *substream) {
-+      /* turn on digital output */
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00);
-+      return 0;
-+}
-+
-+static void snd_rpi_justboom_digi_shutdown(struct snd_pcm_substream *substream) {
-+      /* turn off output */
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c);
-+}
-+
-+static int snd_rpi_justboom_digi_hw_params(struct snd_pcm_substream *substream,
-+                                     struct snd_pcm_hw_params *params)
-+{
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_dai *codec_dai = rtd->codec_dai;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-+
-+      int sysclk = 27000000; /* This is fixed on this board */
-+
-+      long mclk_freq=0;
-+      int mclk_div=1;
-+      int sampling_freq=1;
-+
-+      int ret;
-+
-+      int samplerate = params_rate(params);
-+
-+      if (samplerate<=96000) {
-+              mclk_freq=samplerate*256;
-+              mclk_div=WM8804_MCLKDIV_256FS;
-+      } else {
-+              mclk_freq=samplerate*128;
-+              mclk_div=WM8804_MCLKDIV_128FS;
-+      }
-+
-+      switch (samplerate) {
-+              case 32000:
-+                      sampling_freq=0x03;
-+                      break;
-+              case 44100:
-+                      sampling_freq=0x00;
-+                      break;
-+              case 48000:
-+                      sampling_freq=0x02;
-+                      break;
-+              case 88200:
-+                      sampling_freq=0x08;
-+                      break;
-+              case 96000:
-+                      sampling_freq=0x0a;
-+                      break;
-+              case 176400:
-+                      sampling_freq=0x0c;
-+                      break;
-+              case 192000:
-+                      sampling_freq=0x0e;
-+                      break;
-+              default:
-+                      dev_err(codec->dev,
-+                      "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n",
-+                      samplerate);
-+      }
-+
-+      snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div);
-+      snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq);
-+
-+      ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL,
-+                                      sysclk, SND_SOC_CLOCK_OUT);
-+      if (ret < 0) {
-+              dev_err(codec->dev,
-+              "Failed to set WM8804 SYSCLK: %d\n", ret);
-+              return ret;
-+      }
-+
-+      /* Enable TX output */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
-+
-+      /* Power on */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0);
-+
-+      /* set sampling frequency status bits */
-+      snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq);
-+
-+      return snd_soc_dai_set_bclk_ratio(cpu_dai,64);
-+}
-+
-+/* machine stream operations */
-+static struct snd_soc_ops snd_rpi_justboom_digi_ops = {
-+      .hw_params = snd_rpi_justboom_digi_hw_params,
-+        .startup = snd_rpi_justboom_digi_startup,
-+        .shutdown = snd_rpi_justboom_digi_shutdown,
-+};
-+
-+static struct snd_soc_dai_link snd_rpi_justboom_digi_dai[] = {
-+{
-+      .name           = "JustBoom Digi",
-+      .stream_name    = "JustBoom Digi HiFi",
-+      .cpu_dai_name   = "bcm2708-i2s.0",
-+      .codec_dai_name = "wm8804-spdif",
-+      .platform_name  = "bcm2708-i2s.0",
-+      .codec_name     = "wm8804.1-003b",
-+      .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
-+                              SND_SOC_DAIFMT_CBM_CFM,
-+      .ops            = &snd_rpi_justboom_digi_ops,
-+      .init           = snd_rpi_justboom_digi_init,
-+},
-+};
-+
-+/* audio machine driver */
-+static struct snd_soc_card snd_rpi_justboom_digi = {
-+      .name         = "snd_rpi_justboom_digi",
-+      .owner        = THIS_MODULE,
-+      .dai_link     = snd_rpi_justboom_digi_dai,
-+      .num_links    = ARRAY_SIZE(snd_rpi_justboom_digi_dai),
-+};
-+
-+static int snd_rpi_justboom_digi_probe(struct platform_device *pdev)
-+{
-+      int ret = 0;
-+
-+      snd_rpi_justboom_digi.dev = &pdev->dev;
-+
-+      if (pdev->dev.of_node) {
-+          struct device_node *i2s_node;
-+          struct snd_soc_dai_link *dai = &snd_rpi_justboom_digi_dai[0];
-+          i2s_node = of_parse_phandle(pdev->dev.of_node,
-+                                      "i2s-controller", 0);
-+
-+          if (i2s_node) {
-+                      dai->cpu_dai_name = NULL;
-+                      dai->cpu_of_node = i2s_node;
-+                      dai->platform_name = NULL;
-+                      dai->platform_of_node = i2s_node;
-+          }
-+      }
-+
-+      ret = snd_soc_register_card(&snd_rpi_justboom_digi);
-+      if (ret)
-+              dev_err(&pdev->dev,
-+                      "snd_soc_register_card() failed: %d\n", ret);
-+
-+      return ret;
-+}
-+
-+static int snd_rpi_justboom_digi_remove(struct platform_device *pdev)
-+{
-+      return snd_soc_unregister_card(&snd_rpi_justboom_digi);
-+}
-+
-+static const struct of_device_id snd_rpi_justboom_digi_of_match[] = {
-+      { .compatible = "justboom,justboom-digi", },
-+      {},
-+};
-+MODULE_DEVICE_TABLE(of, snd_rpi_justboom_digi_of_match);
-+
-+static struct platform_driver snd_rpi_justboom_digi_driver = {
-+      .driver = {
-+              .name   = "snd-rpi-justboom-digi",
-+              .owner  = THIS_MODULE,
-+              .of_match_table = snd_rpi_justboom_digi_of_match,
-+      },
-+      .probe          = snd_rpi_justboom_digi_probe,
-+      .remove         = snd_rpi_justboom_digi_remove,
-+};
-+
-+module_platform_driver(snd_rpi_justboom_digi_driver);
-+
-+MODULE_AUTHOR("Milan Neskovic <info@justboom.co>");
-+MODULE_DESCRIPTION("ASoC Driver for JustBoom PI Digi HAT Sound Card");
-+MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0079-ARM-adau1977-adc-Add-basic-machine-driver-for-adau19.patch b/target/linux/brcm2708/patches-4.9/0079-ARM-adau1977-adc-Add-basic-machine-driver-for-adau19.patch
deleted file mode 100644 (file)
index 54d659f..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-From 55bbfc45096c8046134a2062acb2dd0806f48250 Mon Sep 17 00:00:00 2001
-From: Andrey Grodzovsky <andrey2805@gmail.com>
-Date: Tue, 3 May 2016 22:10:59 -0400
-Subject: [PATCH] ARM: adau1977-adc: Add basic machine driver for adau1977
- codec driver.
-
-This commit adds basic support for the codec usage including: Device tree overlay,
-binding I2S bus and setting I2S mode, clock source and frequency setting according
-to spec.
-
-Signed-off-by: Andrey Grodzovsky <andrey2805@gmail.com>
----
- sound/soc/bcm/Kconfig        |   7 +++
- sound/soc/bcm/Makefile       |   2 +
- sound/soc/bcm/adau1977-adc.c | 125 +++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 134 insertions(+)
- create mode 100644 sound/soc/bcm/adau1977-adc.c
-
---- a/sound/soc/bcm/Kconfig
-+++ b/sound/soc/bcm/Kconfig
-@@ -80,3 +80,10 @@ config SND_BCM2708_SOC_RASPIDAC3
-       select SND_SOC_TPA6130A2
-       help
-         Say Y or M if you want to add support for RaspiDAC Rev.3x.
-+
-+config SND_BCM2708_SOC_ADAU1977_ADC
-+      tristate "Support for ADAU1977 ADC"
-+      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
-+      select SND_SOC_ADAU1977_I2C
-+      help
-+        Say Y or M if you want to add support for ADAU1977 ADC.
---- a/sound/soc/bcm/Makefile
-+++ b/sound/soc/bcm/Makefile
-@@ -9,6 +9,7 @@ snd-soc-cygnus-objs := cygnus-pcm.o cygn
- obj-$(CONFIG_SND_SOC_CYGNUS) += snd-soc-cygnus.o
- # BCM2708 Machine Support
-+snd-soc-adau1977-adc-objs := adau1977-adc.o
- snd-soc-hifiberry-dac-objs := hifiberry_dac.o
- snd-soc-hifiberry-dacplus-objs := hifiberry_dacplus.o
- snd-soc-hifiberry-digi-objs := hifiberry_digi.o
-@@ -19,6 +20,7 @@ snd-soc-rpi-proto-objs := rpi-proto.o
- snd-soc-iqaudio-dac-objs := iqaudio-dac.o
- snd-soc-raspidac3-objs := raspidac3.o
-+obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS) += snd-soc-hifiberry-dacplus.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o
---- /dev/null
-+++ b/sound/soc/bcm/adau1977-adc.c
-@@ -0,0 +1,125 @@
-+/*
-+ * ASoC Driver for ADAU1977 ADC
-+ *
-+ * Author:    Andrey Grodzovsky <andrey2805@gmail.com>
-+ *            Copyright 2016
-+ *
-+ * This file is based on hifibery_dac driver by Florian Meier.
-+ * 
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+
-+#include <sound/core.h>
-+#include <sound/pcm.h>
-+#include <sound/pcm_params.h>
-+#include <sound/soc.h>
-+#include <sound/jack.h>
-+
-+enum adau1977_clk_id {
-+    ADAU1977_SYSCLK,
-+};
-+ 
-+enum adau1977_sysclk_src {
-+    ADAU1977_SYSCLK_SRC_MCLK,
-+    ADAU1977_SYSCLK_SRC_LRCLK,
-+};
-+
-+static int eval_adau1977_init(struct snd_soc_pcm_runtime *rtd)
-+{
-+      int ret;
-+      struct snd_soc_dai *codec_dai = rtd->codec_dai;
-+      
-+      ret = snd_soc_dai_set_tdm_slot(codec_dai, 0, 0, 0, 0);
-+      if (ret < 0)
-+              return ret;
-+
-+      return snd_soc_codec_set_sysclk(rtd->codec, ADAU1977_SYSCLK,
-+                      ADAU1977_SYSCLK_SRC_MCLK, 11289600, SND_SOC_CLOCK_IN);
-+}
-+ 
-+static struct snd_soc_dai_link snd_rpi_adau1977_dai[] = {
-+      {
-+      .name = "adau1977",
-+      .stream_name = "ADAU1977", 
-+      .cpu_dai_name = "bcm2708-i2s.0", 
-+      .codec_dai_name = "adau1977-hifi",
-+      .platform_name = "bcm2708-i2s.0",
-+      .codec_name = "adau1977.1-0011",
-+      .init = eval_adau1977_init,
-+      .dai_fmt = SND_SOC_DAIFMT_I2S |
-+              SND_SOC_DAIFMT_NB_NF |
-+              SND_SOC_DAIFMT_CBM_CFM,
-+      },
-+};
-+
-+/* audio machine driver */
-+static struct snd_soc_card snd_adau1977_adc = {
-+      .name         = "snd_rpi_adau1977_adc",
-+      .owner        = THIS_MODULE,
-+      .dai_link     = snd_rpi_adau1977_dai,
-+      .num_links    = ARRAY_SIZE(snd_rpi_adau1977_dai),
-+};
-+
-+static int snd_adau1977_adc_probe(struct platform_device *pdev)
-+{
-+      int ret = 0;
-+
-+      snd_adau1977_adc.dev = &pdev->dev;
-+      if (pdev->dev.of_node) {
-+          struct device_node *i2s_node;
-+          struct snd_soc_dai_link *dai = &snd_rpi_adau1977_dai[0];
-+          i2s_node = of_parse_phandle(pdev->dev.of_node,
-+                                      "i2s-controller", 0);
-+
-+          if (i2s_node) {
-+              dai->cpu_dai_name = NULL;
-+              dai->cpu_of_node = i2s_node;
-+              dai->platform_name = NULL;
-+              dai->platform_of_node = i2s_node;
-+          }
-+      }
-+
-+      ret = snd_soc_register_card(&snd_adau1977_adc);
-+      if (ret)
-+              dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);
-+
-+      return ret;
-+}
-+
-+static int snd_adau1977_adc_remove(struct platform_device *pdev)
-+{
-+      return snd_soc_unregister_card(&snd_adau1977_adc);
-+}
-+
-+static const struct of_device_id snd_adau1977_adc_of_match[] = {
-+      { .compatible = "adi,adau1977-adc", },
-+      {},
-+};
-+
-+MODULE_DEVICE_TABLE(of, snd_adau1977_adc_of_match);
-+
-+static struct platform_driver snd_adau1977_adc_driver = {
-+        .driver = {
-+                .name   = "snd-adau1977-adc",
-+                .owner  = THIS_MODULE,
-+              .of_match_table = snd_adau1977_adc_of_match,
-+        },
-+        .probe          = snd_adau1977_adc_probe,
-+        .remove         = snd_adau1977_adc_remove,
-+};
-+
-+module_platform_driver(snd_adau1977_adc_driver);
-+
-+MODULE_AUTHOR("Andrey Grodzovsky <andrey2805@gmail.com>");
-+MODULE_DESCRIPTION("ASoC Driver for ADAU1977 ADC");
-+MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0079-New-AudioInjector.net-Pi-soundcard-with-low-jitter-a.patch b/target/linux/brcm2708/patches-4.9/0079-New-AudioInjector.net-Pi-soundcard-with-low-jitter-a.patch
new file mode 100644 (file)
index 0000000..71d4fef
--- /dev/null
@@ -0,0 +1,246 @@
+From 235989cb582a29be0bea6a7e306f7b839789053c Mon Sep 17 00:00:00 2001
+From: Matt Flax <flatmax@flatmax.org>
+Date: Mon, 16 May 2016 21:36:31 +1000
+Subject: [PATCH] New AudioInjector.net Pi soundcard with low jitter audio in
+ and out.
+
+Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile.
+Adds the dts overlay and updates the Makefile and README.
+Updates the relevant defconfig files to enable building for the Raspberry Pi.
+Thanks to Phil Elwell (pelwell) for the review, simple-card concepts and discussion. Thanks to Clive Messer for overlay naming suggestions.
+
+Added support for headphones, microphone and bclk_ratio settings.
+
+This patch adds headphone and microphone capability to the Audio Injector sound card. The patch also sets the bit clock ratio for use in the bcm2835-i2s driver. The bcm2835-i2s can't handle an 8 kHz sample rate when the bit clock is at 12 MHz because its register is only 10 bits wide which can't represent the ch2 offset of 1508. For that reason, the rate constraint is added.
+---
+ sound/soc/bcm/Kconfig                      |   7 ++
+ sound/soc/bcm/Makefile                     |   3 +
+ sound/soc/bcm/audioinjector-pi-soundcard.c | 193 +++++++++++++++++++++++++++++
+ 3 files changed, 203 insertions(+)
+ create mode 100644 sound/soc/bcm/audioinjector-pi-soundcard.c
+
+--- a/sound/soc/bcm/Kconfig
++++ b/sound/soc/bcm/Kconfig
+@@ -94,3 +94,10 @@ config SND_BCM2708_SOC_ADAU1977_ADC
+       select SND_SOC_ADAU1977_I2C
+       help
+         Say Y or M if you want to add support for ADAU1977 ADC.
++
++config SND_AUDIOINJECTOR_PI_SOUNDCARD
++      tristate "Support for audioinjector.net Pi add on soundcard"
++      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
++      select SND_SOC_WM8731
++      help
++        Say Y or M if you want to add support for audioinjector.net Pi Hat
+--- a/sound/soc/bcm/Makefile
++++ b/sound/soc/bcm/Makefile
+@@ -20,6 +20,7 @@ snd-soc-rpi-dac-objs := rpi-dac.o
+ snd-soc-rpi-proto-objs := rpi-proto.o
+ snd-soc-iqaudio-dac-objs := iqaudio-dac.o
+ snd-soc-raspidac3-objs := raspidac3.o
++snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
+ obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o
+@@ -32,3 +33,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) +=
+ obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
+ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
+ obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o
++obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o
++
+--- /dev/null
++++ b/sound/soc/bcm/audioinjector-pi-soundcard.c
+@@ -0,0 +1,193 @@
++/*
++ * ASoC Driver for AudioInjector Pi add on soundcard
++ *
++ *  Created on: 13-May-2016
++ *      Author: flatmax@flatmax.org
++ *              based on code by  Cliff Cai <Cliff.Cai@analog.com> for the ssm2602 machine blackfin.
++ *              with help from Lars-Peter Clausen for simplifying the original code to use the dai_fmt field.
++ *            i2s_node code taken from the other sound/soc/bcm machine drivers.
++ *
++ * Copyright (C) 2016 Flatmax Pty. Ltd.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ */
++
++#include <linux/module.h>
++#include <linux/types.h>
++
++#include <sound/core.h>
++#include <sound/soc.h>
++#include <sound/pcm_params.h>
++#include <sound/control.h>
++
++#include "../codecs/wm8731.h"
++
++static const unsigned int bcm2835_rates_12000000[] = {
++      8000, 16000, 32000, 44100, 48000, 96000, 88200,
++};
++
++static struct snd_pcm_hw_constraint_list bcm2835_constraints_12000000 = {
++      .list = bcm2835_rates_12000000,
++      .count = ARRAY_SIZE(bcm2835_rates_12000000),
++};
++
++static int snd_audioinjector_pi_soundcard_startup(struct snd_pcm_substream *substream)
++{
++      /* Setup constraints, because there is a 12 MHz XTAL on the board */
++      snd_pcm_hw_constraint_list(substream->runtime, 0,
++                              SNDRV_PCM_HW_PARAM_RATE,
++                              &bcm2835_constraints_12000000);
++      return 0;
++}
++
++static int snd_audioinjector_pi_soundcard_hw_params(struct snd_pcm_substream *substream,
++                                     struct snd_pcm_hw_params *params)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++
++      switch (params_rate(params)){
++              case 8000:
++                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 1);
++              case 16000:
++                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 750);
++              case 32000:
++                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 375);
++              case 44100:
++                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 272);
++              case 48000:
++                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 250);
++              case 88200:
++                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 136);
++              case 96000:
++                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 125);
++              default:
++                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 125);
++      }
++}
++
++/* machine stream operations */
++static struct snd_soc_ops snd_audioinjector_pi_soundcard_ops = {
++      .startup = snd_audioinjector_pi_soundcard_startup,
++      .hw_params = snd_audioinjector_pi_soundcard_hw_params,
++};
++
++static int audioinjector_pi_soundcard_dai_init(struct snd_soc_pcm_runtime *rtd)
++{
++      return snd_soc_dai_set_sysclk(rtd->codec_dai, WM8731_SYSCLK_XTAL, 12000000, SND_SOC_CLOCK_IN);
++}
++
++static struct snd_soc_dai_link audioinjector_pi_soundcard_dai[] = {
++      {
++              .name = "AudioInjector audio",
++              .stream_name = "AudioInjector audio",
++              .cpu_dai_name   = "bcm2708-i2s.0",
++              .codec_dai_name = "wm8731-hifi",
++              .platform_name  = "bcm2835-i2s.0",
++              .codec_name = "wm8731.1-001a",
++              .ops = &snd_audioinjector_pi_soundcard_ops,
++              .init = audioinjector_pi_soundcard_dai_init,
++              .dai_fmt = SND_SOC_DAIFMT_CBM_CFM|SND_SOC_DAIFMT_I2S|SND_SOC_DAIFMT_NB_NF,
++      },
++};
++
++static const struct snd_soc_dapm_widget wm8731_dapm_widgets[] = {
++      SND_SOC_DAPM_HP("Headphone Jack", NULL),
++      SND_SOC_DAPM_SPK("Ext Spk", NULL),
++      SND_SOC_DAPM_LINE("Line In Jacks", NULL),
++      SND_SOC_DAPM_MIC("Microphone", NULL),
++};
++
++static const struct snd_soc_dapm_route audioinjector_audio_map[] = {
++      /* headphone connected to LHPOUT, RHPOUT */
++      {"Headphone Jack", NULL, "LHPOUT"},
++      {"Headphone Jack", NULL, "RHPOUT"},
++
++      /* speaker connected to LOUT, ROUT */
++      {"Ext Spk", NULL, "ROUT"},
++      {"Ext Spk", NULL, "LOUT"},
++
++      /* line inputs */
++      {"Line In Jacks", NULL, "Line Input"},
++
++      /* mic is connected to Mic Jack, with WM8731 Mic Bias */
++      {"Microphone", NULL, "Mic Bias"},
++};
++
++static struct snd_soc_card snd_soc_audioinjector = {
++      .name = "audioinjector-pi-soundcard",
++      .dai_link = audioinjector_pi_soundcard_dai,
++      .num_links = ARRAY_SIZE(audioinjector_pi_soundcard_dai),
++
++      .dapm_widgets = wm8731_dapm_widgets,
++      .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets),
++      .dapm_routes = audioinjector_audio_map,
++      .num_dapm_routes = ARRAY_SIZE(audioinjector_audio_map),
++};
++
++static int audioinjector_pi_soundcard_probe(struct platform_device *pdev)
++{
++      struct snd_soc_card *card = &snd_soc_audioinjector;
++      int ret;
++      
++      card->dev = &pdev->dev;
++
++      if (pdev->dev.of_node) {
++              struct snd_soc_dai_link *dai = &audioinjector_pi_soundcard_dai[0];
++              struct device_node *i2s_node = of_parse_phandle(pdev->dev.of_node,
++                                                              "i2s-controller", 0);
++
++              if (i2s_node) {
++                      dai->cpu_dai_name = NULL;
++                      dai->cpu_of_node = i2s_node;
++                      dai->platform_name = NULL;
++                      dai->platform_of_node = i2s_node;
++              } else
++                      if (!dai->cpu_of_node) {
++                              dev_err(&pdev->dev, "Property 'i2s-controller' missing or invalid\n");
++                              return -EINVAL;
++                      }
++      }
++
++      if ((ret = snd_soc_register_card(card))) {
++              dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
++      }
++      return ret;
++}
++
++static int audioinjector_pi_soundcard_remove(struct platform_device *pdev)
++{
++      struct snd_soc_card *card = platform_get_drvdata(pdev);
++      return snd_soc_unregister_card(card);
++
++}
++
++static const struct of_device_id audioinjector_pi_soundcard_of_match[] = {
++      { .compatible = "ai,audioinjector-pi-soundcard", },
++      {},
++};
++MODULE_DEVICE_TABLE(of, audioinjector_pi_soundcard_of_match);
++
++static struct platform_driver audioinjector_pi_soundcard_driver = {
++       .driver         = {
++              .name   = "audioinjector-audio",
++              .owner  = THIS_MODULE,
++              .of_match_table = audioinjector_pi_soundcard_of_match,
++       },
++       .probe          = audioinjector_pi_soundcard_probe,
++       .remove         = audioinjector_pi_soundcard_remove,
++};
++
++module_platform_driver(audioinjector_pi_soundcard_driver);
++MODULE_AUTHOR("Matt Flax <flatmax@flatmax.org>");
++MODULE_DESCRIPTION("AudioInjector.net Pi Soundcard");
++MODULE_LICENSE("GPL v2");
++MODULE_ALIAS("platform:audioinjector-pi-soundcard");
++
diff --git a/target/linux/brcm2708/patches-4.9/0080-Add-IQAudIO-Digi-WM8804-board-support.patch b/target/linux/brcm2708/patches-4.9/0080-Add-IQAudIO-Digi-WM8804-board-support.patch
new file mode 100644 (file)
index 0000000..f6a23f9
--- /dev/null
@@ -0,0 +1,295 @@
+From 5d70e6012f390d6292ea8017cebb947a003fce00 Mon Sep 17 00:00:00 2001
+From: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
+Date: Thu, 30 Jun 2016 18:38:42 +0100
+Subject: [PATCH] Add IQAudIO Digi WM8804 board support
+
+Support IQAudIO Digi board with iqaudio_digi machine driver and
+ iqaudio-digi-wm8804-audio overlay.
+
+NB. Machine driver is a cut and paste of hifiberry_digi code, with format
+    and general cleanup to comply with kernel coding standards.
+
+Signed-off-by: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
+---
+ sound/soc/bcm/Kconfig        |   7 ++
+ sound/soc/bcm/Makefile       |   2 +
+ sound/soc/bcm/iqaudio_digi.c | 239 +++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 248 insertions(+)
+ create mode 100644 sound/soc/bcm/iqaudio_digi.c
+
+--- a/sound/soc/bcm/Kconfig
++++ b/sound/soc/bcm/Kconfig
+@@ -80,6 +80,13 @@ config SND_BCM2708_SOC_IQAUDIO_DAC
+       help
+         Say Y or M if you want to add support for IQaudIO-DAC.
++config SND_BCM2708_SOC_IQAUDIO_DIGI
++        tristate "Support for IQAudIO Digi"
++        depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
++        select SND_SOC_WM8804
++        help
++         Say Y or M if you want to add support for IQAudIO Digital IO board.
++
+ config SND_BCM2708_SOC_RASPIDAC3
+       tristate "Support for RaspiDAC Rev.3x"
+       depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
+--- a/sound/soc/bcm/Makefile
++++ b/sound/soc/bcm/Makefile
+@@ -19,6 +19,7 @@ snd-soc-justboom-digi-objs := justboom-d
+ snd-soc-rpi-dac-objs := rpi-dac.o
+ snd-soc-rpi-proto-objs := rpi-proto.o
+ snd-soc-iqaudio-dac-objs := iqaudio-dac.o
++snd-soc-iqaudio-digi-objs := iqaudio_digi.o
+ snd-soc-raspidac3-objs := raspidac3.o
+ snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
+@@ -32,6 +33,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DI
+ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
+ obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
+ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
++obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o
+ obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o
+ obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o
+--- /dev/null
++++ b/sound/soc/bcm/iqaudio_digi.c
+@@ -0,0 +1,239 @@
++/*
++ * ASoC Driver for IQAudIO WM8804 Digi
++ *
++ * Author: Daniel Matuschek <info@crazy-audio.com>
++ * based on the HifiBerry DAC driver by Florian Meier <florian.meier@koalo.de>
++ *    Copyright 2013
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/pcm_params.h>
++#include <sound/soc.h>
++#include <sound/jack.h>
++
++#include "../codecs/wm8804.h"
++
++static short int auto_shutdown_output;
++module_param(auto_shutdown_output, short,
++            S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
++MODULE_PARM_DESC(auto_shutdown_output, "Shutdown SP/DIF output if playback is stopped");
++
++static int snd_rpi_iqaudio_digi_init(struct snd_soc_pcm_runtime *rtd)
++{
++      struct snd_soc_codec *codec = rtd->codec;
++
++      /* enable TX output */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
++
++      return 0;
++}
++
++static int snd_rpi_iqaudio_digi_startup(struct snd_pcm_substream *substream)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++
++      /* turn on digital output */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00);
++
++      return 0;
++}
++
++static void snd_rpi_iqaudio_digi_shutdown(struct snd_pcm_substream *substream)
++{
++      if (auto_shutdown_output) {
++              struct snd_soc_pcm_runtime *rtd = substream->private_data;
++              struct snd_soc_codec *codec = rtd->codec;
++
++              /* turn off digital output */
++              snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c);
++      }
++}
++
++
++static int snd_rpi_iqaudio_digi_hw_params(struct snd_pcm_substream *substream,
++      struct snd_pcm_hw_params *params)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_dai *codec_dai = rtd->codec_dai;
++      struct snd_soc_codec *codec = rtd->codec;
++      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++
++      int sysclk = 27000000; /* This is fixed on this board */
++
++      long mclk_freq = 0;
++      int mclk_div = 1;
++      int sampling_freq = 1;
++
++      int ret;
++
++      int samplerate = params_rate(params);
++
++      if (samplerate <= 96000) {
++              mclk_freq = samplerate * 256;
++              mclk_div = WM8804_MCLKDIV_256FS;
++      } else {
++              mclk_freq = samplerate * 128;
++              mclk_div = WM8804_MCLKDIV_128FS;
++      }
++
++      switch (samplerate) {
++      case 32000:
++              sampling_freq = 0x03;
++              break;
++      case 44100:
++              sampling_freq = 0x00;
++              break;
++      case 48000:
++              sampling_freq = 0x02;
++              break;
++      case 88200:
++              sampling_freq = 0x08;
++              break;
++      case 96000:
++              sampling_freq = 0x0a;
++              break;
++      case 176400:
++              sampling_freq = 0x0c;
++              break;
++      case 192000:
++              sampling_freq = 0x0e;
++              break;
++      default:
++              dev_err(codec->dev, "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n",
++                      samplerate);
++      }
++
++      snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div);
++      snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq);
++
++      ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL,
++                                      sysclk, SND_SOC_CLOCK_OUT);
++      if (ret < 0) {
++              dev_err(codec->dev, "Failed to set WM8804 SYSCLK: %d\n", ret);
++              return ret;
++      }
++
++      /* Enable TX output */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
++
++      /* Power on */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0);
++
++      /* set sampling frequency status bits */
++      snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq);
++
++      return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);
++}
++
++/* machine stream operations */
++static struct snd_soc_ops snd_rpi_iqaudio_digi_ops = {
++      .hw_params      = snd_rpi_iqaudio_digi_hw_params,
++      .startup        = snd_rpi_iqaudio_digi_startup,
++      .shutdown       = snd_rpi_iqaudio_digi_shutdown,
++};
++
++static struct snd_soc_dai_link snd_rpi_iqaudio_digi_dai[] = {
++{
++      .name           = "IQAudIO Digi",
++      .stream_name    = "IQAudIO Digi HiFi",
++      .cpu_dai_name   = "bcm2708-i2s.0",
++      .codec_dai_name = "wm8804-spdif",
++      .platform_name  = "bcm2708-i2s.0",
++      .codec_name     = "wm8804.1-003b",
++      .dai_fmt        = SND_SOC_DAIFMT_I2S |
++                        SND_SOC_DAIFMT_NB_NF |
++                        SND_SOC_DAIFMT_CBM_CFM,
++      .ops            = &snd_rpi_iqaudio_digi_ops,
++      .init           = snd_rpi_iqaudio_digi_init,
++},
++};
++
++/* audio machine driver */
++static struct snd_soc_card snd_rpi_iqaudio_digi = {
++      .name           = "IQAudIODigi",
++      .owner          = THIS_MODULE,
++      .dai_link       = snd_rpi_iqaudio_digi_dai,
++      .num_links      = ARRAY_SIZE(snd_rpi_iqaudio_digi_dai),
++};
++
++static int snd_rpi_iqaudio_digi_probe(struct platform_device *pdev)
++{
++      struct snd_soc_card *card = &snd_rpi_iqaudio_digi;
++      char *prefix = "wm8804-digi,";
++      char prop[128];
++      struct device_node *np;
++      int ret = 0;
++
++      snd_rpi_iqaudio_digi.dev = &pdev->dev;
++
++      np = pdev->dev.of_node;
++      if (np) {
++              struct snd_soc_dai_link *dai = &snd_rpi_iqaudio_digi_dai[0];
++              struct device_node *i2s_node;
++
++              i2s_node = of_parse_phandle(np, "i2s-controller", 0);
++              if (i2s_node) {
++                      dai->cpu_dai_name = NULL;
++                      dai->cpu_of_node = i2s_node;
++                      dai->platform_name = NULL;
++                      dai->platform_of_node = i2s_node;
++              }
++
++              snprintf(prop, sizeof(prop), "%scard-name", prefix);
++              of_property_read_string(np, prop, &card->name);
++
++              snprintf(prop, sizeof(prop), "%sdai-name", prefix);
++              of_property_read_string(np, prop, &dai->name);
++
++              snprintf(prop, sizeof(prop), "%sdai-stream-name", prefix);
++              of_property_read_string(np, prop, &dai->stream_name);
++      }
++
++      ret = snd_soc_register_card(card);
++      if (ret)
++              dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
++                      ret);
++
++      return ret;
++}
++
++static int snd_rpi_iqaudio_digi_remove(struct platform_device *pdev)
++{
++      return snd_soc_unregister_card(&snd_rpi_iqaudio_digi);
++}
++
++static const struct of_device_id snd_rpi_iqaudio_digi_of_match[] = {
++      { .compatible = "iqaudio,wm8804-digi", },
++      {},
++};
++MODULE_DEVICE_TABLE(of, snd_rpi_iqaudio_digi_of_match);
++
++static struct platform_driver snd_rpi_iqaudio_digi_driver = {
++      .driver = {
++              .name           = "IQAudIODigi",
++              .owner          = THIS_MODULE,
++              .of_match_table = snd_rpi_iqaudio_digi_of_match,
++      },
++      .probe  = snd_rpi_iqaudio_digi_probe,
++      .remove = snd_rpi_iqaudio_digi_remove,
++};
++
++module_platform_driver(snd_rpi_iqaudio_digi_driver);
++
++MODULE_AUTHOR("Daniel Matuschek <info@crazy-audio.com>");
++MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0080-New-AudioInjector.net-Pi-soundcard-with-low-jitter-a.patch b/target/linux/brcm2708/patches-4.9/0080-New-AudioInjector.net-Pi-soundcard-with-low-jitter-a.patch
deleted file mode 100644 (file)
index 207cc66..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-From 14502b0564fc2e7181857de254a6f6bd07db4038 Mon Sep 17 00:00:00 2001
-From: Matt Flax <flatmax@flatmax.org>
-Date: Mon, 16 May 2016 21:36:31 +1000
-Subject: [PATCH] New AudioInjector.net Pi soundcard with low jitter audio in
- and out.
-
-Contains the sound/soc/bcm ALSA machine driver and necessary alterations to the Kconfig and Makefile.
-Adds the dts overlay and updates the Makefile and README.
-Updates the relevant defconfig files to enable building for the Raspberry Pi.
-Thanks to Phil Elwell (pelwell) for the review, simple-card concepts and discussion. Thanks to Clive Messer for overlay naming suggestions.
-
-Added support for headphones, microphone and bclk_ratio settings.
-
-This patch adds headphone and microphone capability to the Audio Injector sound card. The patch also sets the bit clock ratio for use in the bcm2835-i2s driver. The bcm2835-i2s can't handle an 8 kHz sample rate when the bit clock is at 12 MHz because its register is only 10 bits wide which can't represent the ch2 offset of 1508. For that reason, the rate constraint is added.
----
- sound/soc/bcm/Kconfig                      |   7 ++
- sound/soc/bcm/Makefile                     |   3 +
- sound/soc/bcm/audioinjector-pi-soundcard.c | 193 +++++++++++++++++++++++++++++
- 3 files changed, 203 insertions(+)
- create mode 100644 sound/soc/bcm/audioinjector-pi-soundcard.c
-
---- a/sound/soc/bcm/Kconfig
-+++ b/sound/soc/bcm/Kconfig
-@@ -87,3 +87,10 @@ config SND_BCM2708_SOC_ADAU1977_ADC
-       select SND_SOC_ADAU1977_I2C
-       help
-         Say Y or M if you want to add support for ADAU1977 ADC.
-+
-+config SND_AUDIOINJECTOR_PI_SOUNDCARD
-+      tristate "Support for audioinjector.net Pi add on soundcard"
-+      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
-+      select SND_SOC_WM8731
-+      help
-+        Say Y or M if you want to add support for audioinjector.net Pi Hat
---- a/sound/soc/bcm/Makefile
-+++ b/sound/soc/bcm/Makefile
-@@ -19,6 +19,7 @@ snd-soc-rpi-dac-objs := rpi-dac.o
- snd-soc-rpi-proto-objs := rpi-proto.o
- snd-soc-iqaudio-dac-objs := iqaudio-dac.o
- snd-soc-raspidac3-objs := raspidac3.o
-+snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
- obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
-@@ -30,3 +31,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) +=
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
- obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o
-+obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o
-+
---- /dev/null
-+++ b/sound/soc/bcm/audioinjector-pi-soundcard.c
-@@ -0,0 +1,193 @@
-+/*
-+ * ASoC Driver for AudioInjector Pi add on soundcard
-+ *
-+ *  Created on: 13-May-2016
-+ *      Author: flatmax@flatmax.org
-+ *              based on code by  Cliff Cai <Cliff.Cai@analog.com> for the ssm2602 machine blackfin.
-+ *              with help from Lars-Peter Clausen for simplifying the original code to use the dai_fmt field.
-+ *            i2s_node code taken from the other sound/soc/bcm machine drivers.
-+ *
-+ * Copyright (C) 2016 Flatmax Pty. Ltd.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/types.h>
-+
-+#include <sound/core.h>
-+#include <sound/soc.h>
-+#include <sound/pcm_params.h>
-+#include <sound/control.h>
-+
-+#include "../codecs/wm8731.h"
-+
-+static const unsigned int bcm2835_rates_12000000[] = {
-+      8000, 16000, 32000, 44100, 48000, 96000, 88200,
-+};
-+
-+static struct snd_pcm_hw_constraint_list bcm2835_constraints_12000000 = {
-+      .list = bcm2835_rates_12000000,
-+      .count = ARRAY_SIZE(bcm2835_rates_12000000),
-+};
-+
-+static int snd_audioinjector_pi_soundcard_startup(struct snd_pcm_substream *substream)
-+{
-+      /* Setup constraints, because there is a 12 MHz XTAL on the board */
-+      snd_pcm_hw_constraint_list(substream->runtime, 0,
-+                              SNDRV_PCM_HW_PARAM_RATE,
-+                              &bcm2835_constraints_12000000);
-+      return 0;
-+}
-+
-+static int snd_audioinjector_pi_soundcard_hw_params(struct snd_pcm_substream *substream,
-+                                     struct snd_pcm_hw_params *params)
-+{
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-+
-+      switch (params_rate(params)){
-+              case 8000:
-+                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 1);
-+              case 16000:
-+                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 750);
-+              case 32000:
-+                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 375);
-+              case 44100:
-+                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 272);
-+              case 48000:
-+                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 250);
-+              case 88200:
-+                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 136);
-+              case 96000:
-+                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 125);
-+              default:
-+                      return snd_soc_dai_set_bclk_ratio(cpu_dai, 125);
-+      }
-+}
-+
-+/* machine stream operations */
-+static struct snd_soc_ops snd_audioinjector_pi_soundcard_ops = {
-+      .startup = snd_audioinjector_pi_soundcard_startup,
-+      .hw_params = snd_audioinjector_pi_soundcard_hw_params,
-+};
-+
-+static int audioinjector_pi_soundcard_dai_init(struct snd_soc_pcm_runtime *rtd)
-+{
-+      return snd_soc_dai_set_sysclk(rtd->codec_dai, WM8731_SYSCLK_XTAL, 12000000, SND_SOC_CLOCK_IN);
-+}
-+
-+static struct snd_soc_dai_link audioinjector_pi_soundcard_dai[] = {
-+      {
-+              .name = "AudioInjector audio",
-+              .stream_name = "AudioInjector audio",
-+              .cpu_dai_name   = "bcm2708-i2s.0",
-+              .codec_dai_name = "wm8731-hifi",
-+              .platform_name  = "bcm2835-i2s.0",
-+              .codec_name = "wm8731.1-001a",
-+              .ops = &snd_audioinjector_pi_soundcard_ops,
-+              .init = audioinjector_pi_soundcard_dai_init,
-+              .dai_fmt = SND_SOC_DAIFMT_CBM_CFM|SND_SOC_DAIFMT_I2S|SND_SOC_DAIFMT_NB_NF,
-+      },
-+};
-+
-+static const struct snd_soc_dapm_widget wm8731_dapm_widgets[] = {
-+      SND_SOC_DAPM_HP("Headphone Jack", NULL),
-+      SND_SOC_DAPM_SPK("Ext Spk", NULL),
-+      SND_SOC_DAPM_LINE("Line In Jacks", NULL),
-+      SND_SOC_DAPM_MIC("Microphone", NULL),
-+};
-+
-+static const struct snd_soc_dapm_route audioinjector_audio_map[] = {
-+      /* headphone connected to LHPOUT, RHPOUT */
-+      {"Headphone Jack", NULL, "LHPOUT"},
-+      {"Headphone Jack", NULL, "RHPOUT"},
-+
-+      /* speaker connected to LOUT, ROUT */
-+      {"Ext Spk", NULL, "ROUT"},
-+      {"Ext Spk", NULL, "LOUT"},
-+
-+      /* line inputs */
-+      {"Line In Jacks", NULL, "Line Input"},
-+
-+      /* mic is connected to Mic Jack, with WM8731 Mic Bias */
-+      {"Microphone", NULL, "Mic Bias"},
-+};
-+
-+static struct snd_soc_card snd_soc_audioinjector = {
-+      .name = "audioinjector-pi-soundcard",
-+      .dai_link = audioinjector_pi_soundcard_dai,
-+      .num_links = ARRAY_SIZE(audioinjector_pi_soundcard_dai),
-+
-+      .dapm_widgets = wm8731_dapm_widgets,
-+      .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets),
-+      .dapm_routes = audioinjector_audio_map,
-+      .num_dapm_routes = ARRAY_SIZE(audioinjector_audio_map),
-+};
-+
-+static int audioinjector_pi_soundcard_probe(struct platform_device *pdev)
-+{
-+      struct snd_soc_card *card = &snd_soc_audioinjector;
-+      int ret;
-+      
-+      card->dev = &pdev->dev;
-+
-+      if (pdev->dev.of_node) {
-+              struct snd_soc_dai_link *dai = &audioinjector_pi_soundcard_dai[0];
-+              struct device_node *i2s_node = of_parse_phandle(pdev->dev.of_node,
-+                                                              "i2s-controller", 0);
-+
-+              if (i2s_node) {
-+                      dai->cpu_dai_name = NULL;
-+                      dai->cpu_of_node = i2s_node;
-+                      dai->platform_name = NULL;
-+                      dai->platform_of_node = i2s_node;
-+              } else
-+                      if (!dai->cpu_of_node) {
-+                              dev_err(&pdev->dev, "Property 'i2s-controller' missing or invalid\n");
-+                              return -EINVAL;
-+                      }
-+      }
-+
-+      if ((ret = snd_soc_register_card(card))) {
-+              dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
-+      }
-+      return ret;
-+}
-+
-+static int audioinjector_pi_soundcard_remove(struct platform_device *pdev)
-+{
-+      struct snd_soc_card *card = platform_get_drvdata(pdev);
-+      return snd_soc_unregister_card(card);
-+
-+}
-+
-+static const struct of_device_id audioinjector_pi_soundcard_of_match[] = {
-+      { .compatible = "ai,audioinjector-pi-soundcard", },
-+      {},
-+};
-+MODULE_DEVICE_TABLE(of, audioinjector_pi_soundcard_of_match);
-+
-+static struct platform_driver audioinjector_pi_soundcard_driver = {
-+       .driver         = {
-+              .name   = "audioinjector-audio",
-+              .owner  = THIS_MODULE,
-+              .of_match_table = audioinjector_pi_soundcard_of_match,
-+       },
-+       .probe          = audioinjector_pi_soundcard_probe,
-+       .remove         = audioinjector_pi_soundcard_remove,
-+};
-+
-+module_platform_driver(audioinjector_pi_soundcard_driver);
-+MODULE_AUTHOR("Matt Flax <flatmax@flatmax.org>");
-+MODULE_DESCRIPTION("AudioInjector.net Pi Soundcard");
-+MODULE_LICENSE("GPL v2");
-+MODULE_ALIAS("platform:audioinjector-pi-soundcard");
-+
diff --git a/target/linux/brcm2708/patches-4.9/0081-Add-IQAudIO-Digi-WM8804-board-support.patch b/target/linux/brcm2708/patches-4.9/0081-Add-IQAudIO-Digi-WM8804-board-support.patch
deleted file mode 100644 (file)
index e931c99..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-From 1b18f3be9f034c2e9aefab9b97c5100d5f914a89 Mon Sep 17 00:00:00 2001
-From: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
-Date: Thu, 30 Jun 2016 18:38:42 +0100
-Subject: [PATCH] Add IQAudIO Digi WM8804 board support
-
-Support IQAudIO Digi board with iqaudio_digi machine driver and
- iqaudio-digi-wm8804-audio overlay.
-
-NB. Machine driver is a cut and paste of hifiberry_digi code, with format
-    and general cleanup to comply with kernel coding standards.
-
-Signed-off-by: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
----
- sound/soc/bcm/Kconfig        |   7 ++
- sound/soc/bcm/Makefile       |   2 +
- sound/soc/bcm/iqaudio_digi.c | 239 +++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 248 insertions(+)
- create mode 100644 sound/soc/bcm/iqaudio_digi.c
-
---- a/sound/soc/bcm/Kconfig
-+++ b/sound/soc/bcm/Kconfig
-@@ -73,6 +73,13 @@ config SND_BCM2708_SOC_IQAUDIO_DAC
-       help
-         Say Y or M if you want to add support for IQaudIO-DAC.
-+config SND_BCM2708_SOC_IQAUDIO_DIGI
-+        tristate "Support for IQAudIO Digi"
-+        depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
-+        select SND_SOC_WM8804
-+        help
-+         Say Y or M if you want to add support for IQAudIO Digital IO board.
-+
- config SND_BCM2708_SOC_RASPIDAC3
-       tristate "Support for RaspiDAC Rev.3x"
-       depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
---- a/sound/soc/bcm/Makefile
-+++ b/sound/soc/bcm/Makefile
-@@ -18,6 +18,7 @@ snd-soc-justboom-digi-objs := justboom-d
- snd-soc-rpi-dac-objs := rpi-dac.o
- snd-soc-rpi-proto-objs := rpi-proto.o
- snd-soc-iqaudio-dac-objs := iqaudio-dac.o
-+snd-soc-iqaudio-digi-objs := iqaudio_digi.o
- snd-soc-raspidac3-objs := raspidac3.o
- snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
-@@ -30,6 +31,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_JUSTBOOM_DI
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
- obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o
- obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o
-+obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o
- obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o
- obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o
---- /dev/null
-+++ b/sound/soc/bcm/iqaudio_digi.c
-@@ -0,0 +1,239 @@
-+/*
-+ * ASoC Driver for IQAudIO WM8804 Digi
-+ *
-+ * Author: Daniel Matuschek <info@crazy-audio.com>
-+ * based on the HifiBerry DAC driver by Florian Meier <florian.meier@koalo.de>
-+ *    Copyright 2013
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+
-+#include <sound/core.h>
-+#include <sound/pcm.h>
-+#include <sound/pcm_params.h>
-+#include <sound/soc.h>
-+#include <sound/jack.h>
-+
-+#include "../codecs/wm8804.h"
-+
-+static short int auto_shutdown_output;
-+module_param(auto_shutdown_output, short,
-+            S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
-+MODULE_PARM_DESC(auto_shutdown_output, "Shutdown SP/DIF output if playback is stopped");
-+
-+static int snd_rpi_iqaudio_digi_init(struct snd_soc_pcm_runtime *rtd)
-+{
-+      struct snd_soc_codec *codec = rtd->codec;
-+
-+      /* enable TX output */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
-+
-+      return 0;
-+}
-+
-+static int snd_rpi_iqaudio_digi_startup(struct snd_pcm_substream *substream)
-+{
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+
-+      /* turn on digital output */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00);
-+
-+      return 0;
-+}
-+
-+static void snd_rpi_iqaudio_digi_shutdown(struct snd_pcm_substream *substream)
-+{
-+      if (auto_shutdown_output) {
-+              struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+              struct snd_soc_codec *codec = rtd->codec;
-+
-+              /* turn off digital output */
-+              snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c);
-+      }
-+}
-+
-+
-+static int snd_rpi_iqaudio_digi_hw_params(struct snd_pcm_substream *substream,
-+      struct snd_pcm_hw_params *params)
-+{
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_dai *codec_dai = rtd->codec_dai;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-+
-+      int sysclk = 27000000; /* This is fixed on this board */
-+
-+      long mclk_freq = 0;
-+      int mclk_div = 1;
-+      int sampling_freq = 1;
-+
-+      int ret;
-+
-+      int samplerate = params_rate(params);
-+
-+      if (samplerate <= 96000) {
-+              mclk_freq = samplerate * 256;
-+              mclk_div = WM8804_MCLKDIV_256FS;
-+      } else {
-+              mclk_freq = samplerate * 128;
-+              mclk_div = WM8804_MCLKDIV_128FS;
-+      }
-+
-+      switch (samplerate) {
-+      case 32000:
-+              sampling_freq = 0x03;
-+              break;
-+      case 44100:
-+              sampling_freq = 0x00;
-+              break;
-+      case 48000:
-+              sampling_freq = 0x02;
-+              break;
-+      case 88200:
-+              sampling_freq = 0x08;
-+              break;
-+      case 96000:
-+              sampling_freq = 0x0a;
-+              break;
-+      case 176400:
-+              sampling_freq = 0x0c;
-+              break;
-+      case 192000:
-+              sampling_freq = 0x0e;
-+              break;
-+      default:
-+              dev_err(codec->dev, "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n",
-+                      samplerate);
-+      }
-+
-+      snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div);
-+      snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq);
-+
-+      ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL,
-+                                      sysclk, SND_SOC_CLOCK_OUT);
-+      if (ret < 0) {
-+              dev_err(codec->dev, "Failed to set WM8804 SYSCLK: %d\n", ret);
-+              return ret;
-+      }
-+
-+      /* Enable TX output */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
-+
-+      /* Power on */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0);
-+
-+      /* set sampling frequency status bits */
-+      snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq);
-+
-+      return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);
-+}
-+
-+/* machine stream operations */
-+static struct snd_soc_ops snd_rpi_iqaudio_digi_ops = {
-+      .hw_params      = snd_rpi_iqaudio_digi_hw_params,
-+      .startup        = snd_rpi_iqaudio_digi_startup,
-+      .shutdown       = snd_rpi_iqaudio_digi_shutdown,
-+};
-+
-+static struct snd_soc_dai_link snd_rpi_iqaudio_digi_dai[] = {
-+{
-+      .name           = "IQAudIO Digi",
-+      .stream_name    = "IQAudIO Digi HiFi",
-+      .cpu_dai_name   = "bcm2708-i2s.0",
-+      .codec_dai_name = "wm8804-spdif",
-+      .platform_name  = "bcm2708-i2s.0",
-+      .codec_name     = "wm8804.1-003b",
-+      .dai_fmt        = SND_SOC_DAIFMT_I2S |
-+                        SND_SOC_DAIFMT_NB_NF |
-+                        SND_SOC_DAIFMT_CBM_CFM,
-+      .ops            = &snd_rpi_iqaudio_digi_ops,
-+      .init           = snd_rpi_iqaudio_digi_init,
-+},
-+};
-+
-+/* audio machine driver */
-+static struct snd_soc_card snd_rpi_iqaudio_digi = {
-+      .name           = "IQAudIODigi",
-+      .owner          = THIS_MODULE,
-+      .dai_link       = snd_rpi_iqaudio_digi_dai,
-+      .num_links      = ARRAY_SIZE(snd_rpi_iqaudio_digi_dai),
-+};
-+
-+static int snd_rpi_iqaudio_digi_probe(struct platform_device *pdev)
-+{
-+      struct snd_soc_card *card = &snd_rpi_iqaudio_digi;
-+      char *prefix = "wm8804-digi,";
-+      char prop[128];
-+      struct device_node *np;
-+      int ret = 0;
-+
-+      snd_rpi_iqaudio_digi.dev = &pdev->dev;
-+
-+      np = pdev->dev.of_node;
-+      if (np) {
-+              struct snd_soc_dai_link *dai = &snd_rpi_iqaudio_digi_dai[0];
-+              struct device_node *i2s_node;
-+
-+              i2s_node = of_parse_phandle(np, "i2s-controller", 0);
-+              if (i2s_node) {
-+                      dai->cpu_dai_name = NULL;
-+                      dai->cpu_of_node = i2s_node;
-+                      dai->platform_name = NULL;
-+                      dai->platform_of_node = i2s_node;
-+              }
-+
-+              snprintf(prop, sizeof(prop), "%scard-name", prefix);
-+              of_property_read_string(np, prop, &card->name);
-+
-+              snprintf(prop, sizeof(prop), "%sdai-name", prefix);
-+              of_property_read_string(np, prop, &dai->name);
-+
-+              snprintf(prop, sizeof(prop), "%sdai-stream-name", prefix);
-+              of_property_read_string(np, prop, &dai->stream_name);
-+      }
-+
-+      ret = snd_soc_register_card(card);
-+      if (ret)
-+              dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
-+                      ret);
-+
-+      return ret;
-+}
-+
-+static int snd_rpi_iqaudio_digi_remove(struct platform_device *pdev)
-+{
-+      return snd_soc_unregister_card(&snd_rpi_iqaudio_digi);
-+}
-+
-+static const struct of_device_id snd_rpi_iqaudio_digi_of_match[] = {
-+      { .compatible = "iqaudio,wm8804-digi", },
-+      {},
-+};
-+MODULE_DEVICE_TABLE(of, snd_rpi_iqaudio_digi_of_match);
-+
-+static struct platform_driver snd_rpi_iqaudio_digi_driver = {
-+      .driver = {
-+              .name           = "IQAudIODigi",
-+              .owner          = THIS_MODULE,
-+              .of_match_table = snd_rpi_iqaudio_digi_of_match,
-+      },
-+      .probe  = snd_rpi_iqaudio_digi_probe,
-+      .remove = snd_rpi_iqaudio_digi_remove,
-+};
-+
-+module_platform_driver(snd_rpi_iqaudio_digi_driver);
-+
-+MODULE_AUTHOR("Daniel Matuschek <info@crazy-audio.com>");
-+MODULE_DESCRIPTION("ASoC Driver for IQAudIO WM8804 Digi");
-+MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0081-New-driver-for-RRA-DigiDAC1-soundcard-using-WM8741-W.patch b/target/linux/brcm2708/patches-4.9/0081-New-driver-for-RRA-DigiDAC1-soundcard-using-WM8741-W.patch
new file mode 100644 (file)
index 0000000..45a5a37
--- /dev/null
@@ -0,0 +1,467 @@
+From e5d85d533e7ea8fd5c68d4601ff2b8034bc4aaa9 Mon Sep 17 00:00:00 2001
+From: escalator2015 <jmtasende@gmail.com>
+Date: Tue, 24 May 2016 16:20:09 +0100
+Subject: [PATCH] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804
+
+---
+ sound/soc/bcm/Kconfig              |   8 +
+ sound/soc/bcm/Makefile             |   2 +
+ sound/soc/bcm/digidac1-soundcard.c | 422 +++++++++++++++++++++++++++++++++++++
+ 3 files changed, 432 insertions(+)
+ create mode 100644 sound/soc/bcm/digidac1-soundcard.c
+
+--- a/sound/soc/bcm/Kconfig
++++ b/sound/soc/bcm/Kconfig
+@@ -108,3 +108,11 @@ config SND_AUDIOINJECTOR_PI_SOUNDCARD
+       select SND_SOC_WM8731
+       help
+         Say Y or M if you want to add support for audioinjector.net Pi Hat
++
++config SND_DIGIDAC1_SOUNDCARD
++        tristate "Support for Red Rocks Audio DigiDAC1"
++        depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
++        select SND_SOC_WM8804
++        select SND_SOC_WM8741
++        help
++         Say Y or M if you want to add support for Red Rocks Audio DigiDAC1 board.
+--- a/sound/soc/bcm/Makefile
++++ b/sound/soc/bcm/Makefile
+@@ -22,6 +22,7 @@ snd-soc-iqaudio-dac-objs := iqaudio-dac.
+ snd-soc-iqaudio-digi-objs := iqaudio_digi.o
+ snd-soc-raspidac3-objs := raspidac3.o
+ snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
++snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o
+ obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o
+@@ -36,4 +37,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC
+ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o
+ obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o
+ obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o
++obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o
+--- /dev/null
++++ b/sound/soc/bcm/digidac1-soundcard.c
+@@ -0,0 +1,422 @@
++/*
++ * ASoC Driver for RRA DigiDAC1
++ * Copyright 2016
++ * Author: José M. Tasende <vintage@redrocksaudio.es>
++ * based on the HifiBerry DAC driver by Florian Meier <florian.meier@koalo.de>
++ * and the Wolfson card driver by Nikesh Oswal, <Nikesh.Oswal@wolfsonmicro.com>
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/i2c.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/pcm_params.h>
++#include <sound/soc.h>
++#include <sound/jack.h>
++#include <sound/soc-dapm.h>
++#include <sound/tlv.h>
++#include <linux/regulator/consumer.h>
++
++#include "../codecs/wm8804.h"
++#include "../codecs/wm8741.h"
++
++#define WM8741_NUM_SUPPLIES 2
++
++/* codec private data */
++struct wm8741_priv {
++      struct wm8741_platform_data pdata;
++      struct regmap *regmap;
++      struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
++      unsigned int sysclk;
++      const struct snd_pcm_hw_constraint_list *sysclk_constraints;
++};
++
++static int samplerate = 44100;
++
++/* New Alsa Controls not exposed by original wm8741 codec driver      */
++/* in actual driver the att. adjustment is wrong because              */
++/* this DAC has a coarse attenuation register with 4dB steps          */
++/* and a fine level register with 0.125dB steps                               */
++/* each register has 32 steps so combining both we have       1024 steps      */
++/* of 0.125 dB.                                                               */
++/* The original level controls from driver are removed at startup     */
++/* and replaced by the corrected ones.                                        */
++/* The same wm8741 driver can be used for wm8741 and wm8742 devices   */
++
++static const DECLARE_TLV_DB_SCALE(dac_tlv_fine, 0, 13, 0);
++static const DECLARE_TLV_DB_SCALE(dac_tlv_coarse, -12700, 400, 1);
++static const char *w8741_dither[4] = {"Off", "RPDF", "TPDF", "HPDF"};
++static const char *w8741_filter[5] = {
++              "Type 1", "Type 2", "Type 3", "Type 4", "Type 5"};
++static const char *w8741_switch[2] = {"Off", "On"};
++static const struct soc_enum w8741_enum[] = {
++SOC_ENUM_SINGLE(WM8741_MODE_CONTROL_2, 0, 4, w8741_dither),/* dithering type */
++SOC_ENUM_SINGLE(WM8741_FILTER_CONTROL, 0, 5, w8741_filter),/* filter type */
++SOC_ENUM_SINGLE(WM8741_FORMAT_CONTROL, 6, 2, w8741_switch),/* phase invert */
++SOC_ENUM_SINGLE(WM8741_VOLUME_CONTROL, 0, 2, w8741_switch),/* volume ramp */
++SOC_ENUM_SINGLE(WM8741_VOLUME_CONTROL, 3, 2, w8741_switch),/* soft mute */
++};
++
++static const struct snd_kcontrol_new w8741_snd_controls_stereo[] = {
++SOC_DOUBLE_R_TLV("DAC Fine Playback Volume", WM8741_DACLLSB_ATTENUATION,
++              WM8741_DACRLSB_ATTENUATION, 0, 31, 1, dac_tlv_fine),
++SOC_DOUBLE_R_TLV("Digital Playback Volume", WM8741_DACLMSB_ATTENUATION,
++              WM8741_DACRMSB_ATTENUATION, 0, 31, 1, dac_tlv_coarse),
++SOC_ENUM("DAC Dither", w8741_enum[0]),
++SOC_ENUM("DAC Digital Filter", w8741_enum[1]),
++SOC_ENUM("DAC Phase Invert", w8741_enum[2]),
++SOC_ENUM("DAC Volume Ramp", w8741_enum[3]),
++SOC_ENUM("DAC Soft Mute", w8741_enum[4]),
++};
++
++static const struct snd_kcontrol_new w8741_snd_controls_mono_left[] = {
++SOC_SINGLE_TLV("DAC Fine Playback Volume", WM8741_DACLLSB_ATTENUATION,
++              0, 31, 0, dac_tlv_fine),
++SOC_SINGLE_TLV("Digital Playback Volume", WM8741_DACLMSB_ATTENUATION,
++              0, 31, 1, dac_tlv_coarse),
++SOC_ENUM("DAC Dither", w8741_enum[0]),
++SOC_ENUM("DAC Digital Filter", w8741_enum[1]),
++SOC_ENUM("DAC Phase Invert", w8741_enum[2]),
++SOC_ENUM("DAC Volume Ramp", w8741_enum[3]),
++SOC_ENUM("DAC Soft Mute", w8741_enum[4]),
++};
++
++static const struct snd_kcontrol_new w8741_snd_controls_mono_right[] = {
++SOC_SINGLE_TLV("DAC Fine Playback Volume", WM8741_DACRLSB_ATTENUATION,
++      0, 31, 0, dac_tlv_fine),
++SOC_SINGLE_TLV("Digital Playback Volume", WM8741_DACRMSB_ATTENUATION,
++      0, 31, 1, dac_tlv_coarse),
++SOC_ENUM("DAC Dither", w8741_enum[0]),
++SOC_ENUM("DAC Digital Filter", w8741_enum[1]),
++SOC_ENUM("DAC Phase Invert", w8741_enum[2]),
++SOC_ENUM("DAC Volume Ramp", w8741_enum[3]),
++SOC_ENUM("DAC Soft Mute", w8741_enum[4]),
++};
++
++static int w8741_add_controls(struct snd_soc_codec *codec)
++{
++      struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
++
++      switch (wm8741->pdata.diff_mode) {
++      case WM8741_DIFF_MODE_STEREO:
++      case WM8741_DIFF_MODE_STEREO_REVERSED:
++              snd_soc_add_codec_controls(codec,
++                              w8741_snd_controls_stereo,
++                              ARRAY_SIZE(w8741_snd_controls_stereo));
++              break;
++      case WM8741_DIFF_MODE_MONO_LEFT:
++              snd_soc_add_codec_controls(codec,
++                              w8741_snd_controls_mono_left,
++                              ARRAY_SIZE(w8741_snd_controls_mono_left));
++              break;
++      case WM8741_DIFF_MODE_MONO_RIGHT:
++              snd_soc_add_codec_controls(codec,
++                              w8741_snd_controls_mono_right,
++                              ARRAY_SIZE(w8741_snd_controls_mono_right));
++              break;
++      default:
++              return -EINVAL;
++      }
++
++      return 0;
++}
++
++static int digidac1_soundcard_init(struct snd_soc_pcm_runtime *rtd)
++{
++      struct snd_soc_codec *codec = rtd->codec;
++      struct snd_soc_card *card = rtd->card;
++      struct snd_soc_pcm_runtime *wm8741_rtd;
++      struct snd_soc_codec *wm8741_codec;
++      struct snd_card *sound_card = card->snd_card;
++      struct snd_kcontrol *kctl;
++      int ret;
++
++      wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
++      if (!wm8741_rtd) {
++              dev_warn(card->dev, "digidac1_soundcard_init: couldn't get wm8741 rtd\n");
++              return -EFAULT;
++      }
++      wm8741_codec = wm8741_rtd->codec;
++      ret = w8741_add_controls(wm8741_codec);
++      if (ret < 0)
++              dev_warn(card->dev, "Failed to add new wm8741 controls: %d\n",
++              ret);
++
++      /* enable TX output */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
++
++      kctl = snd_soc_card_get_kcontrol(card,
++              "Playback Volume");
++      if (kctl) {
++              kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
++              snd_ctl_remove(sound_card, kctl);
++              }
++      kctl = snd_soc_card_get_kcontrol(card,
++              "Fine Playback Volume");
++      if (kctl) {
++              kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
++              snd_ctl_remove(sound_card, kctl);
++              }
++      return 0;
++}
++
++static int digidac1_soundcard_startup(struct snd_pcm_substream *substream)
++{
++      /* turn on wm8804 digital output */
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++      struct snd_soc_card *card = rtd->card;
++      struct snd_soc_pcm_runtime *wm8741_rtd;
++      struct snd_soc_codec *wm8741_codec;
++
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00);
++      wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
++      if (!wm8741_rtd) {
++              dev_warn(card->dev, "digidac1_soundcard_startup: couldn't get WM8741 rtd\n");
++              return -EFAULT;
++      }
++      wm8741_codec = wm8741_rtd->codec;
++
++      /* latch wm8741 level */
++      snd_soc_update_bits(wm8741_codec, WM8741_DACLLSB_ATTENUATION,
++              WM8741_UPDATELL, WM8741_UPDATELL);
++      snd_soc_update_bits(wm8741_codec, WM8741_DACLMSB_ATTENUATION,
++              WM8741_UPDATELM, WM8741_UPDATELM);
++      snd_soc_update_bits(wm8741_codec, WM8741_DACRLSB_ATTENUATION,
++              WM8741_UPDATERL, WM8741_UPDATERL);
++      snd_soc_update_bits(wm8741_codec, WM8741_DACRMSB_ATTENUATION,
++              WM8741_UPDATERM, WM8741_UPDATERM);
++
++      return 0;
++}
++
++static void digidac1_soundcard_shutdown(struct snd_pcm_substream *substream)
++{
++      /* turn off wm8804 digital output */
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_codec *codec = rtd->codec;
++
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c);
++}
++
++static int digidac1_soundcard_hw_params(struct snd_pcm_substream *substream,
++                                     struct snd_pcm_hw_params *params)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_dai *codec_dai = rtd->codec_dai;
++      struct snd_soc_codec *codec = rtd->codec;
++      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++      struct snd_soc_card *card = rtd->card;
++      struct snd_soc_pcm_runtime *wm8741_rtd;
++      struct snd_soc_codec *wm8741_codec;
++
++      int sysclk = 27000000;
++      long mclk_freq = 0;
++      int mclk_div = 1;
++      int sampling_freq = 1;
++      int ret;
++
++      wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
++      if (!wm8741_rtd) {
++              dev_warn(card->dev, "digidac1_soundcard_hw_params: couldn't get WM8741 rtd\n");
++              return -EFAULT;
++      }
++      wm8741_codec = wm8741_rtd->codec;
++      samplerate = params_rate(params);
++
++      if (samplerate <= 96000) {
++              mclk_freq = samplerate*256;
++              mclk_div = WM8804_MCLKDIV_256FS;
++      } else {
++              mclk_freq = samplerate*128;
++              mclk_div = WM8804_MCLKDIV_128FS;
++              }
++
++      switch (samplerate) {
++      case 32000:
++              sampling_freq = 0x03;
++              break;
++      case 44100:
++              sampling_freq = 0x00;
++              break;
++      case 48000:
++              sampling_freq = 0x02;
++              break;
++      case 88200:
++              sampling_freq = 0x08;
++              break;
++      case 96000:
++              sampling_freq = 0x0a;
++              break;
++      case 176400:
++              sampling_freq = 0x0c;
++              break;
++      case 192000:
++              sampling_freq = 0x0e;
++              break;
++      default:
++              dev_err(codec->dev,
++              "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n",
++              samplerate);
++      }
++
++      snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div);
++      snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq);
++
++      ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL,
++              sysclk, SND_SOC_CLOCK_OUT);
++      if (ret < 0) {
++              dev_err(codec->dev,
++              "Failed to set WM8804 SYSCLK: %d\n", ret);
++              return ret;
++      }
++      /* Enable wm8804 TX output */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
++
++      /* wm8804 Power on */
++      snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0);
++
++      /* wm8804 set sampling frequency status bits */
++      snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq);
++
++      /* Now update wm8741 registers for the correct oversampling */
++      if (samplerate <= 48000)
++              snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1,
++               WM8741_OSR_MASK, 0x00);
++      else if (samplerate <= 96000)
++              snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1,
++               WM8741_OSR_MASK, 0x20);
++      else
++              snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1,
++               WM8741_OSR_MASK, 0x40);
++
++      /* wm8741 bit size */
++      switch (params_width(params)) {
++      case 16:
++              snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL,
++               WM8741_IWL_MASK, 0x00);
++              break;
++      case 20:
++              snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL,
++               WM8741_IWL_MASK, 0x01);
++              break;
++      case 24:
++              snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL,
++               WM8741_IWL_MASK, 0x02);
++              break;
++      case 32:
++              snd_soc_update_bits(wm8741_codec, WM8741_FORMAT_CONTROL,
++               WM8741_IWL_MASK, 0x03);
++              break;
++      default:
++              dev_dbg(codec->dev, "wm8741_hw_params:    Unsupported bit size param = %d",
++                      params_width(params));
++              return -EINVAL;
++      }
++
++      return snd_soc_dai_set_bclk_ratio(cpu_dai, 64);
++}
++/* machine stream operations */
++static struct snd_soc_ops digidac1_soundcard_ops = {
++      .hw_params      = digidac1_soundcard_hw_params,
++      .startup        = digidac1_soundcard_startup,
++      .shutdown       = digidac1_soundcard_shutdown,
++};
++
++static struct snd_soc_dai_link digidac1_soundcard_dai[] = {
++      {
++      .name           = "RRA DigiDAC1",
++      .stream_name    = "RRA DigiDAC1 HiFi",
++      .cpu_dai_name   = "bcm2708-i2s.0",
++      .codec_dai_name = "wm8804-spdif",
++      .platform_name  = "bcm2708-i2s.0",
++      .codec_name     = "wm8804.1-003b",
++      .dai_fmt        = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
++                              SND_SOC_DAIFMT_CBM_CFM,
++      .ops            = &digidac1_soundcard_ops,
++      .init           = digidac1_soundcard_init,
++      },
++      {
++      .name           = "RRA DigiDAC11",
++      .stream_name    = "RRA DigiDAC11 HiFi",
++      .cpu_dai_name   = "wm8804-spdif",
++      .codec_dai_name = "wm8741",
++      .codec_name     = "wm8741.1-001a",
++      .dai_fmt        = SND_SOC_DAIFMT_I2S
++                      | SND_SOC_DAIFMT_NB_NF
++                      | SND_SOC_DAIFMT_CBS_CFS,
++      },
++};
++
++/* audio machine driver */
++static struct snd_soc_card digidac1_soundcard = {
++      .name           = "digidac1-soundcard",
++      .owner          = THIS_MODULE,
++      .dai_link       = digidac1_soundcard_dai,
++      .num_links      = ARRAY_SIZE(digidac1_soundcard_dai),
++};
++
++static int digidac1_soundcard_probe(struct platform_device *pdev)
++{
++      int ret = 0;
++
++      digidac1_soundcard.dev = &pdev->dev;
++
++      if (pdev->dev.of_node) {
++              struct device_node *i2s_node;
++              struct snd_soc_dai_link *dai = &digidac1_soundcard_dai[0];
++
++              i2s_node = of_parse_phandle(pdev->dev.of_node,
++                                      "i2s-controller", 0);
++
++              if (i2s_node) {
++                      dai->cpu_dai_name = NULL;
++                      dai->cpu_of_node = i2s_node;
++                      dai->platform_name = NULL;
++                      dai->platform_of_node = i2s_node;
++              }
++      }
++
++      ret = snd_soc_register_card(&digidac1_soundcard);
++      if (ret)
++              dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
++               ret);
++
++      return ret;
++}
++
++static int digidac1_soundcard_remove(struct platform_device *pdev)
++{
++      return snd_soc_unregister_card(&digidac1_soundcard);
++}
++
++static const struct of_device_id digidac1_soundcard_of_match[] = {
++      { .compatible = "rra,digidac1-soundcard", },
++      {},
++};
++MODULE_DEVICE_TABLE(of, digidac1_soundcard_of_match);
++
++static struct platform_driver digidac1_soundcard_driver = {
++      .driver = {
++                      .name           = "digidac1-audio",
++                      .owner          = THIS_MODULE,
++                      .of_match_table = digidac1_soundcard_of_match,
++      },
++      .probe          = digidac1_soundcard_probe,
++      .remove         = digidac1_soundcard_remove,
++};
++
++module_platform_driver(digidac1_soundcard_driver);
++
++MODULE_AUTHOR("José M. Tasende <vintage@redrocksaudio.es>");
++MODULE_DESCRIPTION("ASoC Driver for RRA DigiDAC1");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0082-Add-support-for-Dion-Audio-LOCO-DAC-AMP-HAT.patch b/target/linux/brcm2708/patches-4.9/0082-Add-support-for-Dion-Audio-LOCO-DAC-AMP-HAT.patch
new file mode 100644 (file)
index 0000000..b06cd35
--- /dev/null
@@ -0,0 +1,168 @@
+From 999d3e615247d1921d245f7084194efbc697bb66 Mon Sep 17 00:00:00 2001
+From: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
+Date: Sat, 2 Jul 2016 16:26:19 +0100
+Subject: [PATCH] Add support for Dion Audio LOCO DAC-AMP HAT
+
+Using dedicated machine driver and pcm5102a codec driver.
+
+Signed-off-by: DigitalDreamtime <clive.messer@digitaldreamtime.co.uk>
+---
+ sound/soc/bcm/Kconfig          |   7 +++
+ sound/soc/bcm/Makefile         |   3 +-
+ sound/soc/bcm/dionaudio_loco.c | 121 +++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 130 insertions(+), 1 deletion(-)
+ create mode 100644 sound/soc/bcm/dionaudio_loco.c
+
+--- a/sound/soc/bcm/Kconfig
++++ b/sound/soc/bcm/Kconfig
+@@ -116,3 +116,10 @@ config SND_DIGIDAC1_SOUNDCARD
+         select SND_SOC_WM8741
+         help
+          Say Y or M if you want to add support for Red Rocks Audio DigiDAC1 board.
++
++config SND_BCM2708_SOC_DIONAUDIO_LOCO
++      tristate "Support for Dion Audio LOCO DAC-AMP"
++      depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
++      select SND_SOC_PCM5102a
++      help
++        Say Y or M if you want to add support for Dion Audio LOCO.
+--- a/sound/soc/bcm/Makefile
++++ b/sound/soc/bcm/Makefile
+@@ -23,6 +23,7 @@ snd-soc-iqaudio-digi-objs := iqaudio_dig
+ snd-soc-raspidac3-objs := raspidac3.o
+ snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
+ snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o
++snd-soc-dionaudio-loco-objs := dionaudio_loco.o
+ obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o
+ obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP) += snd-soc-hifiberry-amp.o
+@@ -38,4 +39,4 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIG
+ obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o
+ obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o
+ obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o
+-
++obj-$(CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO) += snd-soc-dionaudio-loco.o
+--- /dev/null
++++ b/sound/soc/bcm/dionaudio_loco.c
+@@ -0,0 +1,121 @@
++/*
++ * ASoC Driver for Dion Audio LOCO DAC-AMP
++ *
++ * Author:      Miquel Blauw <info@dionaudio.nl>
++ *              Copyright 2016
++ *
++ * Based on the software of the RPi-DAC writen by Florian Meier
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/pcm_params.h>
++#include <sound/soc.h>
++#include <sound/jack.h>
++
++static int snd_rpi_dionaudio_loco_hw_params(
++      struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params)
++{
++      struct snd_soc_pcm_runtime *rtd = substream->private_data;
++      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
++
++      unsigned int sample_bits =
++              snd_pcm_format_physical_width(params_format(params));
++
++      return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2);
++}
++
++/* machine stream operations */
++static struct snd_soc_ops snd_rpi_dionaudio_loco_ops = {
++      .hw_params = snd_rpi_dionaudio_loco_hw_params,
++};
++
++static struct snd_soc_dai_link snd_rpi_dionaudio_loco_dai[] = {
++{
++      .name           = "DionAudio LOCO",
++      .stream_name    = "DionAudio LOCO DAC-AMP",
++      .cpu_dai_name   = "bcm2708-i2s.0",
++      .codec_dai_name = "pcm5102a-hifi",
++      .platform_name  = "bcm2708-i2s.0",
++      .codec_name     = "pcm5102a-codec",
++      .dai_fmt        = SND_SOC_DAIFMT_I2S |
++                        SND_SOC_DAIFMT_NB_NF |
++                        SND_SOC_DAIFMT_CBS_CFS,
++      .ops            = &snd_rpi_dionaudio_loco_ops,
++},
++};
++
++/* audio machine driver */
++static struct snd_soc_card snd_rpi_dionaudio_loco = {
++      .name           = "snd_rpi_dionaudio_loco",
++      .dai_link       = snd_rpi_dionaudio_loco_dai,
++      .num_links      = ARRAY_SIZE(snd_rpi_dionaudio_loco_dai),
++};
++
++static int snd_rpi_dionaudio_loco_probe(struct platform_device *pdev)
++{
++      struct device_node *np;
++      int ret = 0;
++
++      snd_rpi_dionaudio_loco.dev = &pdev->dev;
++
++      np = pdev->dev.of_node;
++      if (np) {
++              struct snd_soc_dai_link *dai = &snd_rpi_dionaudio_loco_dai[0];
++              struct device_node *i2s_np;
++
++              i2s_np = of_parse_phandle(np, "i2s-controller", 0);
++              if (i2s_np) {
++                      dai->cpu_dai_name = NULL;
++                      dai->cpu_of_node = i2s_np;
++                      dai->platform_name = NULL;
++                      dai->platform_of_node = i2s_np;
++              }
++      }
++
++      ret = snd_soc_register_card(&snd_rpi_dionaudio_loco);
++      if (ret)
++              dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
++                      ret);
++
++      return ret;
++}
++
++static int snd_rpi_dionaudio_loco_remove(struct platform_device *pdev)
++{
++      return snd_soc_unregister_card(&snd_rpi_dionaudio_loco);
++}
++
++static const struct of_device_id snd_rpi_dionaudio_loco_of_match[] = {
++      { .compatible = "dionaudio,loco-pcm5242-tpa3118", },
++      { /* sentinel */ },
++};
++MODULE_DEVICE_TABLE(of, snd_rpi_dionaudio_loco_of_match);
++
++static struct platform_driver snd_rpi_dionaudio_loco_driver = {
++      .driver = {
++              .name           = "snd-dionaudio-loco",
++              .owner          = THIS_MODULE,
++              .of_match_table = snd_rpi_dionaudio_loco_of_match,
++      },
++      .probe  = snd_rpi_dionaudio_loco_probe,
++      .remove = snd_rpi_dionaudio_loco_remove,
++};
++
++module_platform_driver(snd_rpi_dionaudio_loco_driver);
++
++MODULE_AUTHOR("Miquel Blauw <info@dionaudio.nl>");
++MODULE_DESCRIPTION("ASoC Driver for DionAudio LOCO");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/brcm2708/patches-4.9/0082-New-driver-for-RRA-DigiDAC1-soundcard-using-WM8741-W.patch b/target/linux/brcm2708/patches-4.9/0082-New-driver-for-RRA-DigiDAC1-soundcard-using-WM8741-W.patch
deleted file mode 100644 (file)
index 55d32df..0000000
+++ /dev/null
@@ -1,467 +0,0 @@
-From 6daac5c03a5a96f6ae711e90d46e3d5de3ba1298 Mon Sep 17 00:00:00 2001
-From: escalator2015 <jmtasende@gmail.com>
-Date: Tue, 24 May 2016 16:20:09 +0100
-Subject: [PATCH] New driver for RRA DigiDAC1 soundcard using WM8741 + WM8804
-
----
- sound/soc/bcm/Kconfig              |   8 +
- sound/soc/bcm/Makefile             |   2 +
- sound/soc/bcm/digidac1-soundcard.c | 422 +++++++++++++++++++++++++++++++++++++
- 3 files changed, 432 insertions(+)
- create mode 100644 sound/soc/bcm/digidac1-soundcard.c
-
---- a/sound/soc/bcm/Kconfig
-+++ b/sound/soc/bcm/Kconfig
-@@ -101,3 +101,11 @@ config SND_AUDIOINJECTOR_PI_SOUNDCARD
-       select SND_SOC_WM8731
-       help
-         Say Y or M if you want to add support for audioinjector.net Pi Hat
-+
-+config SND_DIGIDAC1_SOUNDCARD
-+        tristate "Support for Red Rocks Audio DigiDAC1"
-+        depends on SND_BCM2708_SOC_I2S || SND_BCM2835_SOC_I2S
-+        select SND_SOC_WM8804
-+        select SND_SOC_WM8741
-+        help
-+         Say Y or M if you want to add support for Red Rocks Audio DigiDAC1 board.
---- a/sound/soc/bcm/Makefile
-+++ b/sound/soc/bcm/Makefile
-@@ -21,6 +21,7 @@ snd-soc-iqaudio-dac-objs := iqaudio-dac.
- snd-soc-iqaudio-digi-objs := iqaudio_digi.o
- snd-soc-raspidac3-objs := raspidac3.o
- snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o
-+snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o
- obj-$(CONFIG_SND_BCM2708_SOC_ADAU1977_ADC) += snd-soc-adau1977-adc.o
- obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o
-@@ -34,4 +35,5 @@ obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC
- obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o
- obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o
- obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o
-+obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o
---- /dev/null
-+++ b/sound/soc/bcm/digidac1-soundcard.c
-@@ -0,0 +1,422 @@
-+/*
-+ * ASoC Driver for RRA DigiDAC1
-+ * Copyright 2016
-+ * Author: José M. Tasende <vintage@redrocksaudio.es>
-+ * based on the HifiBerry DAC driver by Florian Meier <florian.meier@koalo.de>
-+ * and the Wolfson card driver by Nikesh Oswal, <Nikesh.Oswal@wolfsonmicro.com>
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/i2c.h>
-+#include <sound/core.h>
-+#include <sound/pcm.h>
-+#include <sound/pcm_params.h>
-+#include <sound/soc.h>
-+#include <sound/jack.h>
-+#include <sound/soc-dapm.h>
-+#include <sound/tlv.h>
-+#include <linux/regulator/consumer.h>
-+
-+#include "../codecs/wm8804.h"
-+#include "../codecs/wm8741.h"
-+
-+#define WM8741_NUM_SUPPLIES 2
-+
-+/* codec private data */
-+struct wm8741_priv {
-+      struct wm8741_platform_data pdata;
-+      struct regmap *regmap;
-+      struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
-+      unsigned int sysclk;
-+      const struct snd_pcm_hw_constraint_list *sysclk_constraints;
-+};
-+
-+static int samplerate = 44100;
-+
-+/* New Alsa Controls not exposed by original wm8741 codec driver      */
-+/* in actual driver the att. adjustment is wrong because              */
-+/* this DAC has a coarse attenuation register with 4dB steps          */
-+/* and a fine level register with 0.125dB steps                               */
-+/* each register has 32 steps so combining both we have       1024 steps      */
-+/* of 0.125 dB.                                                               */
-+/* The original level controls from driver are removed at startup     */
-+/* and replaced by the corrected ones.                                        */
-+/* The same wm8741 driver can be used for wm8741 and wm8742 devices   */
-+
-+static const DECLARE_TLV_DB_SCALE(dac_tlv_fine, 0, 13, 0);
-+static const DECLARE_TLV_DB_SCALE(dac_tlv_coarse, -12700, 400, 1);
-+static const char *w8741_dither[4] = {"Off", "RPDF", "TPDF", "HPDF"};
-+static const char *w8741_filter[5] = {
-+              "Type 1", "Type 2", "Type 3", "Type 4", "Type 5"};
-+static const char *w8741_switch[2] = {"Off", "On"};
-+static const struct soc_enum w8741_enum[] = {
-+SOC_ENUM_SINGLE(WM8741_MODE_CONTROL_2, 0, 4, w8741_dither),/* dithering type */
-+SOC_ENUM_SINGLE(WM8741_FILTER_CONTROL, 0, 5, w8741_filter),/* filter type */
-+SOC_ENUM_SINGLE(WM8741_FORMAT_CONTROL, 6, 2, w8741_switch),/* phase invert */
-+SOC_ENUM_SINGLE(WM8741_VOLUME_CONTROL, 0, 2, w8741_switch),/* volume ramp */
-+SOC_ENUM_SINGLE(WM8741_VOLUME_CONTROL, 3, 2, w8741_switch),/* soft mute */
-+};
-+
-+static const struct snd_kcontrol_new w8741_snd_controls_stereo[] = {
-+SOC_DOUBLE_R_TLV("DAC Fine Playback Volume", WM8741_DACLLSB_ATTENUATION,
-+              WM8741_DACRLSB_ATTENUATION, 0, 31, 1, dac_tlv_fine),
-+SOC_DOUBLE_R_TLV("Digital Playback Volume", WM8741_DACLMSB_ATTENUATION,
-+              WM8741_DACRMSB_ATTENUATION, 0, 31, 1, dac_tlv_coarse),
-+SOC_ENUM("DAC Dither", w8741_enum[0]),
-+SOC_ENUM("DAC Digital Filter", w8741_enum[1]),
-+SOC_ENUM("DAC Phase Invert", w8741_enum[2]),
-+SOC_ENUM("DAC Volume Ramp", w8741_enum[3]),
-+SOC_ENUM("DAC Soft Mute", w8741_enum[4]),
-+};
-+
-+static const struct snd_kcontrol_new w8741_snd_controls_mono_left[] = {
-+SOC_SINGLE_TLV("DAC Fine Playback Volume", WM8741_DACLLSB_ATTENUATION,
-+              0, 31, 0, dac_tlv_fine),
-+SOC_SINGLE_TLV("Digital Playback Volume", WM8741_DACLMSB_ATTENUATION,
-+              0, 31, 1, dac_tlv_coarse),
-+SOC_ENUM("DAC Dither", w8741_enum[0]),
-+SOC_ENUM("DAC Digital Filter", w8741_enum[1]),
-+SOC_ENUM("DAC Phase Invert", w8741_enum[2]),
-+SOC_ENUM("DAC Volume Ramp", w8741_enum[3]),
-+SOC_ENUM("DAC Soft Mute", w8741_enum[4]),
-+};
-+
-+static const struct snd_kcontrol_new w8741_snd_controls_mono_right[] = {
-+SOC_SINGLE_TLV("DAC Fine Playback Volume", WM8741_DACRLSB_ATTENUATION,
-+      0, 31, 0, dac_tlv_fine),
-+SOC_SINGLE_TLV("Digital Playback Volume", WM8741_DACRMSB_ATTENUATION,
-+      0, 31, 1, dac_tlv_coarse),
-+SOC_ENUM("DAC Dither", w8741_enum[0]),
-+SOC_ENUM("DAC Digital Filter", w8741_enum[1]),
-+SOC_ENUM("DAC Phase Invert", w8741_enum[2]),
-+SOC_ENUM("DAC Volume Ramp", w8741_enum[3]),
-+SOC_ENUM("DAC Soft Mute", w8741_enum[4]),
-+};
-+
-+static int w8741_add_controls(struct snd_soc_codec *codec)
-+{
-+      struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
-+
-+      switch (wm8741->pdata.diff_mode) {
-+      case WM8741_DIFF_MODE_STEREO:
-+      case WM8741_DIFF_MODE_STEREO_REVERSED:
-+              snd_soc_add_codec_controls(codec,
-+                              w8741_snd_controls_stereo,
-+                              ARRAY_SIZE(w8741_snd_controls_stereo));
-+              break;
-+      case WM8741_DIFF_MODE_MONO_LEFT:
-+              snd_soc_add_codec_controls(codec,
-+                              w8741_snd_controls_mono_left,
-+                              ARRAY_SIZE(w8741_snd_controls_mono_left));
-+              break;
-+      case WM8741_DIFF_MODE_MONO_RIGHT:
-+              snd_soc_add_codec_controls(codec,
-+                              w8741_snd_controls_mono_right,
-+                              ARRAY_SIZE(w8741_snd_controls_mono_right));
-+              break;
-+      default:
-+              return -EINVAL;
-+      }
-+
-+      return 0;
-+}
-+
-+static int digidac1_soundcard_init(struct snd_soc_pcm_runtime *rtd)
-+{
-+      struct snd_soc_codec *codec = rtd->codec;
-+      struct snd_soc_card *card = rtd->card;
-+      struct snd_soc_pcm_runtime *wm8741_rtd;
-+      struct snd_soc_codec *wm8741_codec;
-+      struct snd_card *sound_card = card->snd_card;
-+      struct snd_kcontrol *kctl;
-+      int ret;
-+
-+      wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
-+      if (!wm8741_rtd) {
-+              dev_warn(card->dev, "digidac1_soundcard_init: couldn't get wm8741 rtd\n");
-+              return -EFAULT;
-+      }
-+      wm8741_codec = wm8741_rtd->codec;
-+      ret = w8741_add_controls(wm8741_codec);
-+      if (ret < 0)
-+              dev_warn(card->dev, "Failed to add new wm8741 controls: %d\n",
-+              ret);
-+
-+      /* enable TX output */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
-+
-+      kctl = snd_soc_card_get_kcontrol(card,
-+              "Playback Volume");
-+      if (kctl) {
-+              kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
-+              snd_ctl_remove(sound_card, kctl);
-+              }
-+      kctl = snd_soc_card_get_kcontrol(card,
-+              "Fine Playback Volume");
-+      if (kctl) {
-+              kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
-+              snd_ctl_remove(sound_card, kctl);
-+              }
-+      return 0;
-+}
-+
-+static int digidac1_soundcard_startup(struct snd_pcm_substream *substream)
-+{
-+      /* turn on wm8804 digital output */
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      struct snd_soc_card *card = rtd->card;
-+      struct snd_soc_pcm_runtime *wm8741_rtd;
-+      struct snd_soc_codec *wm8741_codec;
-+
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x00);
-+      wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
-+      if (!wm8741_rtd) {
-+              dev_warn(card->dev, "digidac1_soundcard_startup: couldn't get WM8741 rtd\n");
-+              return -EFAULT;
-+      }
-+      wm8741_codec = wm8741_rtd->codec;
-+
-+      /* latch wm8741 level */
-+      snd_soc_update_bits(wm8741_codec, WM8741_DACLLSB_ATTENUATION,
-+              WM8741_UPDATELL, WM8741_UPDATELL);
-+      snd_soc_update_bits(wm8741_codec, WM8741_DACLMSB_ATTENUATION,
-+              WM8741_UPDATELM, WM8741_UPDATELM);
-+      snd_soc_update_bits(wm8741_codec, WM8741_DACRLSB_ATTENUATION,
-+              WM8741_UPDATERL, WM8741_UPDATERL);
-+      snd_soc_update_bits(wm8741_codec, WM8741_DACRMSB_ATTENUATION,
-+              WM8741_UPDATERM, WM8741_UPDATERM);
-+
-+      return 0;
-+}
-+
-+static void digidac1_soundcard_shutdown(struct snd_pcm_substream *substream)
-+{
-+      /* turn off wm8804 digital output */
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_codec *codec = rtd->codec;
-+
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x3c, 0x3c);
-+}
-+
-+static int digidac1_soundcard_hw_params(struct snd_pcm_substream *substream,
-+                                     struct snd_pcm_hw_params *params)
-+{
-+      struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+      struct snd_soc_dai *codec_dai = rtd->codec_dai;
-+      struct snd_soc_codec *codec = rtd->codec;
-+      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-+      struct snd_soc_card *card = rtd->card;
-+      struct snd_soc_pcm_runtime *wm8741_rtd;
-+      struct snd_soc_codec *wm8741_codec;
-+
-+      int sysclk = 27000000;
-+      long mclk_freq = 0;
-+      int mclk_div = 1;
-+      int sampling_freq = 1;
-+      int ret;
-+
-+      wm8741_rtd = snd_soc_get_pcm_runtime(card, card->dai_link[1].name);
-+      if (!wm8741_rtd) {
-+              dev_warn(card->dev, "digidac1_soundcard_hw_params: couldn't get WM8741 rtd\n");
-+              return -EFAULT;
-+      }
-+      wm8741_codec = wm8741_rtd->codec;
-+      samplerate = params_rate(params);
-+
-+      if (samplerate <= 96000) {
-+              mclk_freq = samplerate*256;
-+              mclk_div = WM8804_MCLKDIV_256FS;
-+      } else {
-+              mclk_freq = samplerate*128;
-+              mclk_div = WM8804_MCLKDIV_128FS;
-+              }
-+
-+      switch (samplerate) {
-+      case 32000:
-+              sampling_freq = 0x03;
-+              break;
-+      case 44100:
-+              sampling_freq = 0x00;
-+              break;
-+      case 48000:
-+              sampling_freq = 0x02;
-+              break;
-+      case 88200:
-+              sampling_freq = 0x08;
-+              break;
-+      case 96000:
-+              sampling_freq = 0x0a;
-+              break;
-+      case 176400:
-+              sampling_freq = 0x0c;
-+              break;
-+      case 192000:
-+              sampling_freq = 0x0e;
-+              break;
-+      default:
-+              dev_err(codec->dev,
-+              "Failed to set WM8804 SYSCLK, unsupported samplerate %d\n",
-+              samplerate);
-+      }
-+
-+      snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div);
-+      snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq);
-+
-+      ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL,
-+              sysclk, SND_SOC_CLOCK_OUT);
-+      if (ret < 0) {
-+              dev_err(codec->dev,
-+              "Failed to set WM8804 SYSCLK: %d\n", ret);
-+              return ret;
-+      }
-+      /* Enable wm8804 TX output */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x0);
-+
-+      /* wm8804 Power on */
-+      snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0);
-+
-+      /* wm8804 set sampling frequency status bits */
-+      snd_soc_update_bits(codec, WM8804_SPDTX4, 0x0f, sampling_freq);
-+
-+      /* Now update wm8741 registers for the correct oversampling */
-+      if (samplerate <= 48000)
-+              snd_soc_update_bits(wm8741_codec, WM8741_MODE_CONTROL_1,
-+       &nbs