Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
This is a preliminary merge before the upcoming merge of generic parser
branch.
|
|
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>
|
|
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>
|
|
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>
|
|
The current iobox detection code reportedly fails for various users, so
simply do what the Win32 driver does instead.
Patch originally by Karl Grill <kgrill@chello.at> and then modified to
comply with kernel coding guidelines + current HEAD.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
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>
|
|
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
With HDSPM_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>
|
|
HDSPM_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>
|
|
The driver contains at least six 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>
|
|
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
As the recent firmware code tries to reread and cache the firmware by
itself, it's even better to keep the struct firmware data instead of
keeping a local copy. Also, it makes little sense to disable the fw
loader for this driver, so added the explicit dependency, too.
Last, but not least, allocate the firmware data loaded via ioctl in
vmalloc'ed buffer instead, as the firmware size isn't that small.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
The RayDAT reports the sync status of its inputs in consecutive bit
positions, so all we do in hdspm_s1_sync_check is to iterate over idx:
status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
lock = (status & (0x1<<idx)) ? 1 : 0;
sync = (status & (0x100<<idx)) ? 1 : 0;
The index is given in kcontrol->private_value:
HDSPM_SYNC_CHECK("WC SyncCheck", 0),
HDSPM_SYNC_CHECK("AES SyncCheck", 1),
HDSPM_SYNC_CHECK("SPDIF SyncCheck", 2),
HDSPM_SYNC_CHECK("ADAT1 SyncCheck", 3),
HDSPM_SYNC_CHECK("ADAT2 SyncCheck", 4),
HDSPM_SYNC_CHECK("ADAT3 SyncCheck", 5),
HDSPM_SYNC_CHECK("ADAT4 SyncCheck", 6),
HDSPM_SYNC_CHECK("TCO SyncCheck", 7),
HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 8),
The patch corrects the indicated sync flags by passing the proper index
value to hdspm_s1_sync_check().
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Correct spelling typo in debug messages within drivers/sound
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
checkpatch.pl discourages the use of spaces at the beginning of lines.
Some of the CTL_ELEM defines were not properly indented.
This patch replaces the leading spaces by tabs. No functionality is
changed, the commit is purely cosmetic.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
According to the documentation, AES32 cards use a different bit position
for reporting the sync_in status.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
In contrast to AES32, MADI uses the first status register to report the
sync_in status.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
MADI and MADIface used to report the autosync_sample_rate. This
functionality was lost in commit
0dca1793063c28dde8f6c49c9c72203fe5cb6efc, this commit now adds it back.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|