summaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hdspm - Use enums in hdspm_tco_ltc_frames()Adrian Knoth2013-08-191-5/+5
| | | | | | | | This patch doesn't change functionality, it only improves readability and fixes a copy&paste error in a comment. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Fix default value in SNDRV_HDSPM_IOCTL_GET_LTCAdrian Knoth2013-08-191-1/+1
| | | | | | | | | | | | Use enum hdspm_ltc_format's fps_30 (corresponds to 4) instead of 30, Other case branches return 1, 2 or 3 respectively, so 30 obviously is wrong. Since SNDRV_HDSPM_IOCTL_GET_LTC had never been working due to a copy&paste error in hdspm.h, this change doesn't break userspace. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - remove unneeded semicolonFengguang Wu2013-07-151-1/+1
| | | | | | | | | sound/pci/rme9652/hdspm.c:1110:2-3: Unneeded semicolon Generated by: coccinelle/misc/semicolon.cocci Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Added some comments and control register documentationMartin Dausel2013-07-051-7/+99
| | | | | | Signed-off-by: Martin Dausel <martin.dausel@iosono-sound.com> Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Use snd_ctl_enum_info() in snd_hdspm_info_autosync_refAdrian Knoth2013-07-051-20/+4Star
| | | | | | | | Also use snd_ctl_enum_info() to fill the autosync text fields on AES32 and MADI cards (only users of snd_hdspm_info_autosync_ref). Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Use snd_ctl_enum_info() for texts_autosyncAdrian Knoth2013-07-051-19/+10Star
| | | | | | | Also use snd_ctl_enum_info() to fill the autosync enumerated controls. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Use snd_ctl_enum_info for most text arraysAdrian Knoth2013-07-051-31/+19Star
| | | | | | | | Use snd_ctl_enum_info() to fill most of the enumerated controls. More non-trivial occurrences will follow in separate commits. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - AES32: Enable TCO supportAdrian Knoth2013-07-051-0/+1
| | | | | | | This patch finally enables TCO support on RME AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - AES32: Report external sample rate to userspaceAdrian Knoth2013-07-051-3/+8
| | | | | | | | This patch adds a new ALSA control to read the external sample rate from userspace on RME AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Introduce hdspm_external_rate_to_enum() helper functionAdrian Knoth2013-07-051-11/+17
| | | | | | | | | | | This patch refactors the code to query the external sample rate and its translation into the corresponding enum into a helper function to prevent future code duplication. A later commit will make use of this new helper function. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - AES32: Include TCO and Sync-In in proc outputAdrian Knoth2013-07-051-0/+7
| | | | | | | Also report TCO status and Sync-In via /proc/ on AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - AES32: Enable TCO/Sync-In in snd_hdspm_put_sync_ref()Adrian Knoth2013-07-051-7/+8
| | | | | | | | This patch enables the user to select "TCO" and "Sync In" as a preferred sync reference on RME AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - AES32: Enable TCO input in hdspm_external_sample_rate()Adrian Knoth2013-07-051-9/+28
| | | | | | | | This patch adds support to read the TCO sample rate in hdspm_external_sample_rate() on RME AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - AES32: Ignore float/int format bitAdrian Knoth2013-07-051-0/+10
| | | | | | | | | | As mentioned in the comment, the AES32 cards must not set the format bit, since it is used to indicate the preferred sync setting instead. We hence simply skip the corresponding part in the hw_params function. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Enable AES32 in hdspm_get_tco_sample_rateAdrian Knoth2013-07-051-0/+3
| | | | | | | | This patch adds AES32 specific code to hdspm_get_tco_sample_rate to query the TCO sample rate. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Enable AES32 in hdspm_get_wc_sample_rateAdrian Knoth2013-07-051-0/+3
| | | | | | | | This patch adds AES32 specific code to hdspm_get_wc_sample_rate() to query the wordclock frequency. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Add prototype declarationsAdrian Knoth2013-07-051-4/+12
| | | | | | | | This patch only introduces prototype declarations, no real change. The functions themselves are already present. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Introduce hdspm_get_aes_sample_rate()Adrian Knoth2013-07-051-0/+17
| | | | | | | | | Helper function to return the AES sample rate class. This class needs to be translated via HDSPM_bit2freq() to get the more common representation. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - AES32: Add TCO and Sync-In text entriesAdrian Knoth2013-07-051-4/+7
| | | | | | | | Provide the text for the two new clock options "TCO" and "Sync In" on AES32 cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - AIO: Drop superfluous HDSPM_AUTOSYNC_REFAdrian Knoth2013-07-051-1/+0Star
| | | | | | | | The HDSPM_AUTOSYNC_REF macro is only implemented for MADI and AES32 cards, so it doesn't make sense to call it on AIO boards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Cosmetics, no real changeAdrian Knoth2013-07-051-5/+7
| | | | | | | This patch does nothing, it's sole intent is to clean up the code. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - AES32: Fix TCO sync check reportingAdrian Knoth2013-07-051-7/+18
| | | | | | | | | | | HDSPM_tco_lock and HDSPM_tcoLock were too close, so the previous code didn't honour the difference between the two. Let's be more verbose and use HDSPM_tcoLockMadi for MADI cards, HDSPM_tcoLockAes for AES(32) and fix the code that makes use of both. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Create TCO readout functionAdrian Knoth2013-07-051-60/+77
| | | | | | | | | | This patch separates the TCO bits from snd_hdspm_proc_read_madi(), so the new function can later be shared between MADI and AES32 cards. It's essentially only moving code around, no new functionality. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Fix S/PDIF Sync status and frequency on RME AIOAdrian Knoth2013-07-051-2/+3
| | | | | | | | | This is a left-over mistake from old code, the correct register offset is provided in kcontrol->private_value, not in the index. Cf. RayDAT case, where it has already been corrected. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Add support for AEBs on RME AIOAdrian Knoth2013-07-051-17/+37
| | | | | | | | | | | AIO cards allow to use AEB (Analogue Expansion Boards) to add four input and/or output channels. This patch adds the necessary code to detect and enable the additional I/O channels. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Enable AD/DA/PH gains and S/PDIF-Input select on AIOAdrian Knoth2013-07-051-1/+5
| | | | | | | | | | | This patch uses the newly introduced HDSPM_CONTROL_TRISTATE functions to create and expose the following ALSA controls: - Gain selection for Input, Output and Phones (HiGain, +4dBu, -10dbV) - S/PDIF Input select (Coaxial, Optical, Internal) Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Introduce generic AIO tristate controlAdrian Knoth2013-07-051-0/+78
| | | | | | | | | | | | | | | | | | AIO cards offer at least four individual settings options with three states each. Those settings are represented as two bits in the settings register with the following meaning: 0*some_base_bit --> Option value 0 1*some_base_bit --> Option value 1 2*some_base_bit --> Option value 2 3*some_base_bit --> mask to select the two involved bits This patch adds a generic ALSA control macro for such a value-to-bit pattern mapping. It will be used in a later commit to expose four new controls. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Refactor ENUMERATED_CTL_INFO into functionAdrian Knoth2013-07-051-8/+14
| | | | | | | | | ENUMERATED_CTL_INFO is a macro, so the binary code is generated multiple times. To avoid code duplication, refactor the involved functionality into a function and make ENUMERATED_CTL_INFO a call to this function. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Add S/PDIF, XLR, WCK48 and ADAT-in controls for RME AIO cardsAdrian Knoth2013-07-051-1/+6
| | | | | | | | | | | | | | This commit adds the following ALSA controls: - S/PDIF Out Optical to switch S/PDIF Out from coaxial to optical - S/PDIF Out Professional to send the Pro bit in the output stream - ADAT-Internal to enable ADAT/TDIF Expansion Board (AEB/TEB) - XLR Breakout Cable if analogue I/O uses the XLR breakout cable - WCK48 to force WordClock to the 32-48kHz range (single speed) if the card is operating at higher frequencies Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Add S/PDIF and WCK48 controls for RME RayDATAdrian Knoth2013-07-051-1/+3
| | | | | | | | This commit adds new ALSA controls to send single-speed WordClock and S/PDIF-Professional on RME RayDAT cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Drop duplicate code in hdspm_set_system_clock_mode()Adrian Knoth2013-07-051-20/+5Star
| | | | | | | | | hdspm_set_system_clock_mode() is almost a one-by-one copy of hdspm_set_toggle_setting(). To improve code quality, remove the duplication. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Augment HDSPM_TOGGLE_SETTING for AIO/RayDATAdrian Knoth2013-07-051-4/+23
| | | | | | | | | | | The HDSPM_TOGGLE_SETTING functions alter the control_register on older cards. On newer cards (AIO/RayDAT), they have to operate on the settings_register instead. This patch augments the existing functions to work with AIO/RayDAT, too. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Introduce hdspm_is_raydat_or_aio()Adrian Knoth2013-07-051-2/+7
| | | | | | | | | | | RME RayDAT and AIO cards are new designs with different register settings. Since we need to distinguish them from older cards multiple times in the driver, refactor the code into a separate helper function. No functional change intended. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Add missing defines for RME AIO and RayDATAdrian Knoth2013-07-051-0/+19
| | | | | | | | The driver did not support all possible configurations. These defines will be used by later commits to add the missing functionality. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Allow SingleSpeed WordClock when in DS/QS modeAdrian Knoth2013-05-311-1/+1
| | | | | | | | | Similarly to MADI, WordClock can also be at SingleSpeed while the card is actually working at twice or four times this rate. If so, multiply the base rate accordingly. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Refactor SS/DS/QS clock multiplier into functionAdrian Knoth2013-05-311-15/+22
| | | | | | | | | | | | When the DoubleSpeed or QuadSpeed bit is set, the SingleSpeed frequency has to be multiplied accordingly. Since this functionality will be required at least twice, refactor it into a separate function. The second reference to the newly introduced hdspm_rate_multiplier() will be in a separate commit. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Add support for 128-192kHz WordClock inputAdrian Knoth2013-05-311-3/+16
| | | | | | | Allow WordClock input rates of 128, 176.4 and 192kHz. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at removeTakashi Iwai2013-05-293-3/+0Star
| | | | | | | | | | | | | As drvdata is cleared to NULL at probe failure or at removal by the driver core, we don't have to call pci_set_drvdata(pci, NULL) any longer in each driver. The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in hda_intel.c. Since this function itself releases the card instance, we need to clear drvdata here as well, so that it won't be released doubly in the remove callback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Enable new TCO ALSA controlsAdrian Knoth2013-03-111-1/+5
| | | | | | | Expose the newly added TCO LTC and sync check functions to userspace. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Add ALSA controls to read the TCO LTC stateAdrian Knoth2013-03-111-0/+106
| | | | | | | This patch adds new ALSA controls to query the LTC state from userspace. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Also check for TCO sync statesAdrian Knoth2013-03-111-0/+42
| | | | | | | | | This patch prepares snd_hdspm_get_sync_check() to also check the TCO sync state. The added feature will be exposed to the user in a later commit. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Remove duplicate code from ALSA controlsAdrian Knoth2013-03-111-124/+22Star
| | | | | | | | Considerably shorten the code by using a macro. Though this won't lower the binary size, it makes the source more readable. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Provide ALSA control to disable 96K framesAdrian Knoth2013-03-111-0/+1
| | | | | | | | | | For 96kHz, MADI allows to multiplex the samples (SMUX) or to use a dedicated 96K mode. The RME cards default to 96K mode, but since not all external MADI equipment supports this, provide a switch to users that changes the on-wire protocol to SMUX. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Allow the TCO and SYNC-IN to be used in slave modeAdrian Knoth2013-03-111-14/+51
| | | | | | | | | | | | | | When using the additional Time Code Option module in slave mode or the SYNC-In wordclock connector, the sample rate needs to be returned by hdspm_external_sample_rate(). Since this sample rate may contain any value with 1Hz granularity, we need to round it to a common rate as done by the OSX driver. [Fixed missing function declarations by tiwai] Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Refactor sample rate acquisitionAdrian Knoth2013-03-111-3/+13
| | | | | | | | | This commit introduces hdspm_get_pll_freq() to avoid code duplication. Reading the sample rate from the DDS register will be required by upcoming code. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2013-01-231-5/+12
|\ | | | | | | | | This is a preliminary merge before the upcoming merge of generic parser branch.
| * ALSA: hdspm - Fix wordclock status on AES32Andre Schramm2013-01-091-5/+12
| | | | | | | | | | | | | | | | | | | | Use correct bitmask for AES32 cards to determine wordclock lock state, add missing bitmask for sync check and make output of the corresponding control and /proc coherent. Signed-off-by: Andre Schramm <andre.schramm@iosono-sound.com> Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hdsp - Remove obsolete settings functionsAdrian Knoth2013-01-161-339/+0Star
| | | | | | | | | | | | | | | | With HDSP_TOGGLE_SETTING in place, these functions are no longer required. Removing them makes the code DRY and considerably shorter. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hdsp - Use HDSP_TOGGLE_SETTING to alter settingsAdrian Knoth2013-01-161-15/+28
| | | | | | | | | | | | | | | | | | HDSP_TOGGLE_SETTING and its corresponding functions allow to change settings in the control register. Instead of using the specialised functions, use the generic code to make the code DRY. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hdsp - Implement generic function to toggle settingsAdrian Knoth2013-01-161-0/+59
| | | | | | | | | | | | | | | | | | | | | | The driver contains multiple similar functions that change only a single bit in the control register, only the bit position varies. This patch implements a generic function to toggle a certain bit position that will be used to replace the old code. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>