ASoC: hifiberry-studio: add AES CS Mode control (channel status format) - #7527
Conversation
| #define CARD_CLK_OVRWR 0x38 | ||
| #define CARD_STREAM_STATUS 0x39 | ||
| #define CARD_DIR_FS 0x3A | ||
| #define CARD_CS_FORMAT 0x73 /* AES channel status format */ |
There was a problem hiding this comment.
Are you sure this is correct? All the other values in this block are in ascending order and unique.
There was a problem hiding this comment.
Yes, as this is a special control only to be used for the Studio Digi, we moved it to a higher range.
There was a problem hiding this comment.
BUt let me rename it, the CARD_ prefix is a bit misleading here.
There was a problem hiding this comment.
And perhaps put it next to the other 0x73 value (ADC_SAMPLE_FORMAT) to make it clear that this is intentional.
There was a problem hiding this comment.
Let me move it to a completely different block that it doesn't overlap with the ADC range at all. I'll send an update soon.
There was a problem hiding this comment.
Moved it now to a seperate block and a seperate address. The firmware on the board has been updated too to match this (still on my bench here)
2ce5fa4 to
dc496e7
Compare
Add an enum control on AES cards to select the channel status format
transmitted by the DIT, backed by card register 0x90
(DIGI_CS_FORMAT in the card firmware register map):
Consumer - IEC 60958-3 channel status (no CRCC defined)
Professional - AES3, byte 5 = 0 (spec-literal; the CRCC in byte
23 is invalid since the DIX9211 can only program
channel status bytes 0-5 and transmits 6-23 as 0)
Professional CRC - AES3, byte 5 carries the CRC fixup value that
makes the CRCC over bytes 0-22 come out 0x00,
matching the zero byte 23 the chip transmits
(firmware default)
Verified on a Studio Digi I/O: channel status decode and CRC validity
checked on an Audio Precision analyzer in all three modes.
Signed-off-by: Daniel Matuschek <info@hifiberry.com>
dc496e7 to
c494d5d
Compare
|
Thanks for merging so fast |
kernel: overlays: Add ramoops-pi5 See: raspberrypi/linux#7518 kernel: input: goodix: Include I2C details in names for the devices See: raspberrypi/linux#7506 kernel: misc: rp1-pio: release DMA channel outside pio->lock See: raspberrypi/linux#7519 kernel: ASoC: hifiberry-studio: add AES CS Mode control (channel status format) See: raspberrypi/linux#7527 kernel: pinctrl: rp1: Make IRQ usage set a pin to an input See: raspberrypi/linux#7526 kernel: drm/vc4: Support frame packed stereo modes See: raspberrypi/linux#7524
kernel: overlays: Add ramoops-pi5 See: raspberrypi/linux#7518 kernel: input: goodix: Include I2C details in names for the devices See: raspberrypi/linux#7506 kernel: misc: rp1-pio: release DMA channel outside pio->lock See: raspberrypi/linux#7519 kernel: ASoC: hifiberry-studio: add AES CS Mode control (channel status format) See: raspberrypi/linux#7527 kernel: pinctrl: rp1: Make IRQ usage set a pin to an input See: raspberrypi/linux#7526 kernel: drm/vc4: Support frame packed stereo modes See: raspberrypi/linux#7524
Adds an enum control on HiFiBerry Studio Digi (AES) cards to select the channel status format transmitted by the DIT, backed by controller register 0x90 (DIGI_CS_FORMAT in the card firmware register map):
The control is registered only for the AES card type (same gating as the existing Clock mode / Current Sample Rate controls); DAC8x cards are unaffected.
Verified on a Studio Digi I/O on CM5: channel status decode and CRC validity confirmed on an Audio Precision analyzer in all three modes (Professional CRC validates, Professional raw shows the expected invalid CRCC, Consumer decodes as consumer format), audio pass-through unaffected at 44.1-192 kHz.